(()=>{var t={14:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(191),o=i.n(n),s=i(261),r=i.n(s),a=i(160),d=i.n(a),l=new URL(i(240),i.b),c=r()(o()),u=d()(l);c.push([t.id,`.wordads-ad-wrapper {\n    position: absolute;\n    visibility: hidden;\n    font: 11px Arial, sans-serif;\n    letter-spacing: 1px;\n    text-decoration: none;\n    max-width: 100%;\n    margin: 25px auto;\n    padding: 0;\n    display: flex;\n    justify-content: center;\n}\n\n.wordads-ad-wrapper--sidebar,\n.wordads-ad-wrapper--gutenberg_skyscraper,\n.wordads-ad-wrapper--gutenberg_mobile_leaderboard {\n    font-size: 8px;\n}\n\n.wordads-ad-title {\n    margin: 0 auto 5px\n}\n\n.wordads-ad-controls {\n    margin: 5px auto 0;\n    text-align: right\n}\n\n.wordads-ad-controls span {\n    cursor: pointer\n}\n\n.wordads-ad {\n    margin: 0 auto;\n    width: fit-content;\n    max-width: 100%;\n    overflow: hidden;\n}\n\n.wordads-ad iframe {\n    margin: 0;\n    padding: 0\n}\n\n.wordads-ad.wordads-ad-responsive {\n    width: 100%;\n    max-width: unset\n}\n\n.wordads-ad-sticky-wrapper {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin: auto;\n    position: fixed;\n    transition: transform .2s ease-in-out;\n    user-select: none;\n    padding: 5px 0;\n    z-index: 49999\n}\n.wordads-ad-wrapper--bottom_sticky.wordads-ad-sticky-wrapper {\n    right: 0;\n    left: 0;\n    bottom: 0;\n    background: #f1f1f1;\n    transform: translate(0, 0);\n}\n.wordads-ad-wrapper--sidebar_sticky_right.wordads-ad-sticky-wrapper {\n    width: fit-content;\n    min-width: 120px;\n    top: max(calc(var(--wp-admin--admin-bar--height, 0px) + 24px), 10%);\n    right: 20px;\n}\n\n.wordads-ad-wrapper--sidebar_sticky_right .wordads-ad-content {\n    border: 1px solid #f1f1f1;\n}\n\n.wordads-ad-sticky-close-btn {\n    width: 28px;\n    height: 28px;\n    position: absolute;\n    box-sizing: content-box;\n    cursor: pointer;\n    overflow: hidden;\n    background-size: 28px;\n    background-repeat: no-repeat;\n    background-position: center;\n    background-image: url(${u})\n}\n\n.wordads-ad-wrapper--bottom_sticky .wordads-ad-sticky-close-btn {\n    top: -14px;\n    left: .75rem;\n}\n\n.wordads-ad-wrapper--sidebar_sticky_right .wordads-ad-sticky-close-btn {\n    top: -14px;\n    right: 0;\n}\n\n.wordads-ad-sticky {\n    width: auto;\n    max-width: initial;\n    max-height: inherit;\n}\n\n.wordads-ad-sticky .wordads-ad-title,\n.wordads-ad-sticky .wordads-ad-controls {\n    color: #333\n}\n\n.wordads-ad-hidden {\n    visibility: hidden;\n}\n\n.wordads-ad-wrapper--bottom_sticky.wordads-ad-hidden {\n    transform: translate(0, 1000px);\n}`,""]);const h=c},261:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,o,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var d=this[a][0];null!=d&&(r[d]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&r[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},160:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},191:t=>{"use strict";t.exports=function(t){return t[1]}},546:function(t){t.exports=function(){"use strict";function t(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}return function e(i,n){function o(e,o,s){if("undefined"!=typeof document){"number"==typeof(s=t({},n,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var a in s)s[a]&&(r+="; "+a,!0!==s[a]&&(r+="="+s[a].split(";")[0]));return document.cookie=e+"="+i.write(o,e)+r}}return Object.create({set:o,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],n={},o=0;o<e.length;o++){var s=e[o].split("="),r=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(n[a]=i.read(r,a),t===a)break}catch(t){}}return t?n[t]:n}},remove:function(e,i){o(e,"",t({},i,{expires:-1}))},withAttributes:function(i){return e(this.converter,t({},this.attributes,i))},withConverter:function(i){return e(t({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(i)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},462:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>w});var n=i(157),o=i.n(n),s=i(869),r=i.n(s),a=i(318),d=i.n(a),l=i(825),c=i.n(l),u=i(597),h=i.n(u),g=i(770),p=i.n(g),m=i(14),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=d().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=h(),o()(m.Z,f);const w=m.Z&&m.Z.locals?m.Z.locals:void 0},157:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var d=t[a],l=n.base?d[0]+n.base:d[0],c=s[l]||0,u="".concat(l," ").concat(c);s[l]=c+1;var h=i(u),g={css:d[1],media:d[2],sourceMap:d[3],supports:d[4],layer:d[5]};if(-1!==h)e[h].references++,e[h].updater(g);else{var p=o(g,n);n.byIndex=a,e.splice(a,0,{identifier:u,updater:p,references:1})}r.push(u)}return r}function o(t,e){var i=e.domAPI(e);return i.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,o){var s=n(t=t||[],o=o||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=i(s[r]);e[a].references--}for(var d=n(t,o),l=0;l<s.length;l++){var c=i(s[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}s=d}}},318:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},597:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},825:(t,e,i)=>{"use strict";t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},869:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,o&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},770:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},858:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=i(639),s=n(i(539)),r=i(444),a=i(501);class d extends s.default{constructor(t,e){super(t,e),this.config={},this.adFlowUrl="https://af.pubmine.com?api_version=2"}insertAdBefore(t,e,i){const n=this.getRandomTagId(),o=this.createAdSnippet(n,i),s=this.wrapSnippet(o,e);t.insertAdjacentElement("beforebegin",s),this.slots.push({tagId:n,type:e,sizes:i,element:s,isLazy:!0})}getAdFlowRequestBody(t){const{maxHeight:e,maxWidth:i}=(0,r.getMaxSlotDimension)(t.sizes),n={site:{id:String(this.config.blog_id),is_wordads:this.config.is_wordads,page:window.location.href,language:this.config.blog_language},ad:{tag:t.tagId,format:t.type,max_width:i,max_height:e},user:{uid:this.consent.getOrCreateUID(),gdpr:!1}};return this.consent.usPrivacy&&(n.user.us_privacy=this.consent.usPrivacy),this.consent.tcData&&(n.user.gdpr=!0,n.user.gdpr_consent=this.consent.tcData.tcString),n}shouldShowInlineAds(){var t;return!!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.inline)}getMaxSlots(){return a.MAX_INLINE_SLOTS}getMaxBlazeSlots(){return a.MAX_INLINE_BLAZE_SLOTS}shouldShowBottomStickyAds(){var t;return!!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.bottom_sticky)}shouldShowSidebarStickyRightAds(){var t;return!!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.sidebar_sticky_right)}shouldShowTopAds(){var t;return!!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.top)}isSlotTypeEnabled(t){var e,i;return!!(null===(i=null===(e=this.config)||void 0===e?void 0:e.enabled_formats)||void 0===i?void 0:i[t])}getSlotFormatId(t){}getBottomStickySlots(){return(0,a.getSortedSlotSizes)(o.SlotType.BOTTOM_STICKY)}convertFormatsToObject(t){return t.reduce(((t,e)=>(t[e]=!0,t)),{})}initAdNetwork(){this.initAditude(),super.initAdNetwork()}mergeConfig(){var t;const e=this.getServerConfig();e&&(this.config=this.deepMerge(e,this.config)),this.config.enabled_formats=this.convertFormatsToObject(this.config.formats),this.log("Merged config:"),this.log(null!==(t=this.config)&&void 0!==t?t:{})}handleAdResponse(t,e){const i=!!(null==t?void 0:t.content),n=!!(null==t?void 0:t.pixel);if(i){const e=document.createElement("script");e.type="application/javascript",e.innerHTML=t.content,document.body.appendChild(e)}if(n){const e=new XMLHttpRequest;e.open("GET",t.pixel),e.send()}this.trackAdFlowRequestLatency(i,e.tagId,e.type)}initAditude(){this.log("Initializing Aditude"),window.tude=window.tude||{cmd:[]},window.Raven=window.Raven||{cmd:[]},window.Raven.cmd.push((({config:t})=>{const e={param1:String(this.config.blog_id),param2:String(this.config.is_wordads),param3:String(this.config.hosting_type),param4:this.config.theme};t.setCustom(e),this.log("Aditude debug: custom dimensions set "+JSON.stringify(e))})),window.tude.cmd.push((()=>{window.tude.events.addEventListener("tude_ad_filled",(t=>{this.log("aditude debug event: tude_ad_filled "+JSON.stringify(t)),this.handleAd({tagId:t.detail.id,adNetwork:"Aditude"})})),window.tude.events.addEventListener("tude_ad_unfilled",(t=>{this.log(`Aditude debug event: tude_ad_unfilled (${t.detail.id})`),this.handleNoAd({tagId:t.detail.id,adNetwork:"Aditude"})})),window.tude.events.addEventListener("tude_no_ad_sizes",(t=>{this.log(`Aditude debug event: tude_no_ad_sizes ${t.detail.id}`),this.handleNoAd({tagId:t.detail.id,adNetwork:"Aditude"})}))}))}getLibrariesToFetch(){return Object.assign(Object.assign({},super.getLibrariesToFetch()),{prebid:{loaded:!1,url:"https://dn0qt3r0xannq.cloudfront.net/wordpress-2Pvwql52OT/wordpress-longform/prebid-load.js",isInitialized:()=>void 0!==window.tude,init:()=>{window.tude=window.tude||{cmd:[]}}}})}getServerConfig(){const t=super.getServerConfig();if(void 0!==window.wa_smart){let[,e]=window.wa_smart.target.split(";");e=e.replace("language=","").split("_")[0];const i=[];for(const t of Object.values(o.SlotType)){const e=window.wa_smart[t];(null==e?void 0:e.enabled)&&i.push(t)}return Object.assign(Object.assign({},t),{blog_language:e,hosting_type:2,theme:window.wa_smart.theme,formats:i})}return t}}e.default=d},12:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(i(202));i(462),e.default=class{constructor(){this.listenersController=new AbortController,this.signal=this.listenersController.signal,this.consent=new o.default}getConsent(){return this.consent}getListenersController(){return this.listenersController}init(t){t.preInit(),this.signal.onabort=()=>t.log("Event listeners removed"),document.addEventListener("scroll",t.throttle((()=>{t.processAds()}),250),{signal:this.signal}),document.addEventListener("resize",t.throttle((()=>{t.processAds()}),250),{signal:this.signal}),window.addEventListener("message",(e=>{t.handlePostMessage(e)}),{signal:this.signal})}}},501:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSortedSlotSizes=e.getFilteredSlotSizesByWidthAndHeight=e.getFilteredSlotSizesByWidth=e.MAX_INLINE_BLAZE_SLOTS=e.MAX_INLINE_SLOTS=void 0;const n=i(639);e.MAX_INLINE_SLOTS=20,e.MAX_INLINE_BLAZE_SLOTS=20,e.getFilteredSlotSizesByWidth=(t,e)=>(s[t]||[]).filter((([t])=>t<=e)),e.getFilteredSlotSizesByWidthAndHeight=(t,e,i)=>(s[t]||[]).filter((([t,n])=>t<=e&&n<=i));const o=document.documentElement.clientWidth<800,s=Object.freeze({[n.SlotType.TOP]:o?[[320,50]]:[[970,250],[970,90],[728,90]],[n.SlotType.INLINE]:o?[[300,250],[320,50]]:[[970,250],[728,90],[300,250]],[n.SlotType.BELOW_POST]:o?[[300,250]]:[[300,250],[728,90]],[n.SlotType.BOTTOM_STICKY]:o?[[320,50],[468,60]]:[[728,90],[970,90]],[n.SlotType.SIDEBAR]:o?[[120,600],[160,600],[300,250],[300,400],[300,600]]:[[120,600],[160,600],[300,600]],[n.SlotType.SIDEBAR_STICKY_RIGHT]:o?[]:[[120,600],[160,600],[300,250],[300,600],[400,600]],[n.SlotType.GUTENBERG_RECTANGLE]:[[300,250]],[n.SlotType.GUTENBERG_LEADERBOARD]:[[728,90]],[n.SlotType.GUTENBERG_MOBILE_LEADERBOARD]:[[320,50]],[n.SlotType.GUTENBERG_SKYSCRAPER]:[[160,600]],[n.SlotType.SIDEBAR_WIDGET_MEDIUMRECTANGLE]:[[300,250]],[n.SlotType.SIDEBAR_WIDGET_LEADERBOARD]:[[728,90]],[n.SlotType.SIDEBAR_WIDGET_WIDESKYSCRAPER]:[[160,600]],[n.SlotType.SHORTCODE]:[[300,250]]});e.getSortedSlotSizes=t=>s[t].sort(((t,e)=>{const i=e[0]-t[0];return 0!==i?i:e[1]-t[1]}))},586:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SMART_NETWORK_ID=void 0,e.SMART_NETWORK_ID=3905},506:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(i(12)),s=n(i(858)),r=new o.default,a=new s.default(r.getConsent(),r.getListenersController());r.init(a)},313:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDirection=void 0,function(t){t.UP="up",t.DOWN="down"}(i||(e.ScrollDirection=i={}))},639:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.StickySlotTypes=e.SlotType=void 0,function(t){t.TOP="top",t.INLINE="inline",t.BELOW_POST="belowpost",t.BOTTOM_STICKY="bottom_sticky",t.SIDEBAR="sidebar",t.SIDEBAR_STICKY_RIGHT="sidebar_sticky_right",t.GUTENBERG_RECTANGLE="gutenberg_rectangle",t.GUTENBERG_LEADERBOARD="gutenberg_leaderboard",t.GUTENBERG_MOBILE_LEADERBOARD="gutenberg_mobile_leaderboard",t.GUTENBERG_SKYSCRAPER="gutenberg_skyscraper",t.SIDEBAR_WIDGET_MEDIUMRECTANGLE="sidebar_widget_mediumrectangle",t.SIDEBAR_WIDGET_LEADERBOARD="sidebar_widget_leaderboard",t.SIDEBAR_WIDGET_WIDESKYSCRAPER="sidebar_widget_wideskyscraper",t.SHORTCODE="shortcode"}(i||(e.SlotType=i={})),e.StickySlotTypes=[i.BOTTOM_STICKY,i.SIDEBAR_STICKY_RIGHT]},202:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(i(546)),s=i(586);e.default=class{constructor(){this.logging=!1,this.tcData=null,this.usPrivacy=null,this.uid=null}setLogging(t){this.logging=t}log(t){this.logging&&console.log(t)}init(){this.log("Initializing consent..."),window.__uspapi?(this.log("Querying USP API..."),window.__uspapi("getUSPData",1,((t,e)=>{e&&t.uspString&&(this.usPrivacy=t.uspString,this.log("USP API data found. Setting consent: "+this.usPrivacy))}))):this.log("USP API not found"),window.__tcfapi?(this.log("Querying TCF API..."),window.__tcfapi("addEventListener",2,((t,e)=>{var i;e&&t.gdprApplies?(this.tcData=t,this.log("TCF API data found. Setting consent: "+(null===(i=this.tcData)||void 0===i?void 0:i.tcString)),this.initCookieSync()):this.log("TCF API data found. GDPR does not apply")}))):this.log("TCF API not found")}createUIDFromCookies(t,e,i){const n={expires:e,domain:i||window.location.hostname};this.log(`Created UID from Cookies on ${n.domain}`);const s=o.default.withAttributes(n),r=this.generateUIDValue();return s.set(t,r),r}generateUIDValue(){return Math.random().toString(36).substring(2,10)+(new Date).getTime().toString()}getOrCreateUIDFromLocalStorage(t,e){this.log("UID from localStorage");const i=(localStorage.getItem(t)||"").split(":");let n=i[0];const o=(new Date).getTime();let s=parseInt(i[1]);return(!n||o>s)&&(n=this.generateUIDValue(),s=o+24*e*60*60*1e3,localStorage.setItem(t,n+":"+s)),n}getOrCreateUID(){if(null!==this.uid)return this.uid;if(!this.hasUserConsent())return this.uid="",this.uid;const t="wordads_uid",e=o.default.get(t);if(e)return this.log(`Reused UID value ${e}`),this.uid=e,this.uid;const i=this.getCookiesSharedDomain(t,window.location.hostname);return window.localStorage&&!i||(this.uid=this.createUIDFromCookies(t,30,i)),this.uid=this.uid||this.getOrCreateUIDFromLocalStorage(t,30),this.log(`UID value: ${this.uid}`),this.uid}getCookiesSharedDomain(t,e){const i=e.split(".");if(i.length<=2)return null;let n=null,s=0;for(const r of i){if(s+=r.length,n=e.substring(s),s>=e.length)return null;const i=o.default.withAttributes({domain:n});if(i.set(t,"1")&&i.get(t))return i.remove(t),n;s++}return null}hasUserConsent(){return!this.tcData||!0===this.tcData.vendor.consents[496]&&!0===this.tcData.purpose.consents[1]}initCookieSync(){this.log("Initializing Cookie Sync");let t=`https://sync.smartadserver.com/getuid?nwid=${s.SMART_NETWORK_ID}&url=https://af.pubmine.com/user-sync?pid=[sas_uid]`;this.tcData&&(t+=`&gdpr=1&gdpr_consent=${this.tcData.tcString}`),document.createElement("img").src=t}}},444:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertFormatsToObject=e.getMaxSlotDimension=void 0,e.getMaxSlotDimension=t=>{let e=0,i=0;return t.forEach((([t,n])=>{t>e&&(e=t),n>i&&(i=n)})),{maxWidth:e,maxHeight:i}},e.convertFormatsToObject=t=>t.reduce(((t,e)=>(t[e]=!0,t)),{})},539:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=i(501),o=i(639),s=i(313),r=i(586),a=i(444);e.default=class{constructor(t,e){this.logging="function"==typeof URLSearchParams&&"true"===new URLSearchParams(window.location.search).get("wordads-logging"),this.consent=t,this.consent.setLogging(this.logging),this.adFlowUrl="https://af.pubmine.com",this.slots=[],this.initialized=!1,this.config={},this.scroll={lastDirection:s.ScrollDirection.DOWN,lastY:window.scrollY},this.listenersController=e}log(t){this.logging&&console.log(t)}logSlot(t,e){if(!this.logging)return;const i=t.sizes.map((([t,e])=>t+"x"+e)).join(","),n=[t.type,t.tagId,i].join("|");this.log(`[${n}] ${e}`)}trackStat(t){window._stq=window._stq||[],window._stq.push(["extra",{x_wordads_smart:t}])}recordTracksEvent(t,e){e=e||{},window._tkq=window._tkq||[],window._tkq.push(["recordEvent",t,e])}getServerConfig(){var t,e;const i=document.getElementById("adflow-configuration"),n=i?JSON.parse(i.innerText):{},o=null!==(e=null===(t=null===window||void 0===window?void 0:window.wa_client)||void 0===t?void 0:t.config)&&void 0!==e?e:null===window||void 0===window?void 0:window.wa_smart;return this.deepMerge(n,o)}createAdSnippet(t,e){let i=document.createElement("div"),n=document.createElement("div"),o=document.createElement("div"),s=document.createElement("div");if(i.classList.add("wordads-ad"),n.classList.add("wordads-ad-title"),o.classList.add("wordads-ad-content"),s.classList.add("wordads-ad-controls"),n.innerText=this.config._.title,o.id=t,e){const{maxHeight:t,maxWidth:i}=(0,a.getMaxSlotDimension)(e);o.setAttribute("data-ad-height",t.toString()),o.setAttribute("data-ad-width",i.toString())}return s.innerHTML=this.consent.tcData?`<span onclick="__tcfapi( 'showUi' )">${this.config._.privacy_settings}</span>`:"",i.appendChild(n),i.appendChild(o),i.appendChild(s),i}getBottomStickySlots(){}createBottomStickyAdSnippet(t){const e=this.getBottomStickySlots(),i=this.createAdSnippet(t,e);i.classList.add("wordads-ad-sticky");const n=this.wrapSnippet(i,o.SlotType.BOTTOM_STICKY);n.classList.add("wordads-ad-sticky-wrapper");const r=()=>{this.toggleVisibility(n,s.ScrollDirection.DOWN)},a=document.createElement("div");return a.classList.add("wordads-ad-sticky-close-btn"),a.onclick=function(){n.remove(),document.removeEventListener("scroll",r)},n.insertBefore(a,i),{event:r,snippet:n}}createSidebarStickyAdSnippet(t,e){const i=this.createAdSnippet(t);i.classList.add("wordads-ad-sticky");const n=this.wrapSnippet(i,e);n.classList.add("wordads-ad-sticky-wrapper");const o=this.throttle((()=>{this.updateSidebarStickyVisibility(n)}),150),s=document.createElement("div");return s.classList.add("wordads-ad-sticky-close-btn"),s.onclick=function(){n.remove(),window.removeEventListener("resize",o),document.removeEventListener("scroll",o)},n.insertBefore(s,i),{event:o,snippet:n,adContent:i.querySelector(".wordads-ad-content")}}toggleVisibility(t,e){const i=window.scrollY>this.scroll.lastY?s.ScrollDirection.DOWN:s.ScrollDirection.UP,n=this.scroll.lastDirection===i;if(this.scroll.lastDirection=i,this.scroll.lastY=window.scrollY,n)return;const o="wordads-ad-hidden";e===i?t.classList.remove(o):t.classList.add(o)}wrapSnippet(t,e){const i=document.createElement("div");return i.classList.add("wordads-ad-wrapper"),i.classList.add(`wordads-ad-wrapper--${e}`),i.appendChild(t),i}checkBrandSafety(t,e){}handleNotOkayResponse(t,e){this.log(`Site unable to show ads: ${e.tagId}`),204===t&&this.listenersController.abort()}callAdFlow(t){this.logSlot(t,"calling AdFlow");const e=new XMLHttpRequest;e.onreadystatechange=()=>{if(XMLHttpRequest.DONE===e.readyState){if(performance.mark(`${t.tagId}-end`),200!==e.status)return void this.handleNotOkayResponse(e.status,t);const i=JSON.parse(e.response);this.handleAdResponse(i,t)}},e.open("POST",this.adFlowUrl),e.setRequestHeader("Accept","application/json"),e.withCredentials=!0,performance.mark(`${t.tagId}-start`);const i=this.getAdFlowRequestBody(t);e.send(JSON.stringify(i))}trackAdFlowRequestLatency(t,e,i){let n=performance.measure(`${e}-duration`,`${e}-start`,`${e}-end`),o={has_ad:t,ad_type:i,request_time:Math.round(n.duration),theme:this.config.theme};navigator.connection&&(o.connection_effective_type=navigator.connection.effectiveType,o.connection_downlink=navigator.connection.downlink),this.recordTracksEvent("wpcom_wordads_adflow",o)}insertFallbackAd(t,e){let i=(window.sas_fallback||[]).filter((function(t){return t.type===e}));if(0===i.length)return t.remove(),void this.log(`No fallback found for ${e}, snippet removed`);let n=i[0].tag.replaceAll("{{unique_id}}",Math.trunc(1e6*Math.random())),o=document.createElement("div");o.innerHTML=n,n=o.childNodes[0].nodeValue;let s=document.createElement("div");s.innerHTML=n,t.style.position="relative",t.style.visibility="visible",t.innerHTML=s.innerHTML,s.querySelectorAll("script").forEach((function(t){t.parentNode&&t.parentNode.removeChild(t);let e=document.createElement("script");t.src?e.src=t.src:t.textContent?e.textContent=t.textContent:t.innerText&&(e.innerText=t.innerText),document.body.appendChild(e)})),this.trackStat("fallback_"+e)}getChildrenByTag(t,e){let i=[];for(let n=0;n<t.children.length;n++){let o=t.children[n];o.nodeName===e.toUpperCase()&&i.push(o)}return i}getFloatingElements(t){let e=[],i=t.getElementsByTagName("*");for(let t=0;t<i.length;t++){let n=i[t],o=getComputedStyle(n),s=o.getPropertyValue("position"),r=o.getPropertyValue("float");"relative"!==s&&"absolute"!==s&&"none"===r||e.push(n)}return e}getElementGlobalPosition(t){let e=t.getBoundingClientRect();return{top:e.top+window.scrollY,left:e.left+window.scrollX,bottom:e.top+window.scrollY+e.height,right:e.left+window.scrollX+e.width}}collidesWithElements(t,e){let i=this.getElementGlobalPosition(t),n=!1;return e.forEach((t=>{let e=this.getElementGlobalPosition(t);i.bottom<e.top||i.top>e.bottom||i.right<e.left||i.left>e.left||(n=!0)})),n}getInlineFormatId(){}initInlineAds(){if(!this.shouldShowInlineAds())return;this.log(`Initializing ${o.SlotType.INLINE}`);let t=document.getElementById("wordads-inline-marker");if(!t)return void this.trackStat("inline_no_marker");let e=t.parentElement;if(!e)return;const i=this.getAvailableWidth(e),s=(0,n.getFilteredSlotSizesByWidth)(o.SlotType.INLINE,i);t.remove();let r=this.getMaxSlots(),a=this.getMaxBlazeSlots(),d=0;const l=window.innerHeight,c=Math.ceil(1.35*l),u=Math.ceil(2.5*l);let h=e.getBoundingClientRect().top+window.scrollY+c;const g=this.getChildrenByTag(e,"p"),p=this.getFloatingElements(e);g.forEach((t=>{const e=t.getBoundingClientRect().top+window.scrollY,i=t.previousElementSibling;if(e>h&&d<r&&i&&"P"===i.nodeName&&i.textContent&&i.textContent.length>=140&&!this.collidesWithElements(t,p)){if(a>d){if(!this.shouldShowInlineAds())return;this.insertAdBefore(t,o.SlotType.INLINE,s,this.getInlineFormatId()),this.trackStat("render_inline")}else{let e=document.createElement("div");e.className="wordads-ad-wrapper",t.insertAdjacentElement("beforebegin",e),this.insertFallbackAd(e,o.SlotType.INLINE),this.trackStat("render_inline_fallback")}h=e+u,d++}})),0===d&&this.trackStat("inline_no_insert")}getBottomStickyFormatId(){}initBottomSticky(){if(!this.shouldShowBottomStickyAds())return;this.log(`Initializing ${o.SlotType.BOTTOM_STICKY}`);const t=this.getRandomTagId(),{event:e,snippet:i}=this.createBottomStickyAdSnippet(t);document.body.append(i);const s=document.documentElement.clientWidth,r=(0,n.getFilteredSlotSizesByWidth)(o.SlotType.BOTTOM_STICKY,s),a=this.getBottomStickyFormatId();this.slots.push(Object.assign({tagId:t,type:o.SlotType.BOTTOM_STICKY,sizes:r,element:i,isLazy:!1,onAd:function(){document.addEventListener("scroll",e,{passive:!0})}},a?{formatId:a}:{}))}getSidebarStickyRightFormatId(){}initSidebarStickyRight(){if(!this.shouldShowSidebarStickyRightAds())return;this.log(`Initializing ${o.SlotType.SIDEBAR_STICKY_RIGHT}`);const t=this.getRandomTagId(),{event:e,snippet:i,adContent:s}=this.createSidebarStickyAdSnippet(t,o.SlotType.SIDEBAR_STICKY_RIGHT);document.body.append(i);const{maxWidth:r,maxHeight:a}=this.getMaxAvailableSidebarStickySize(i);null==s||s.setAttribute("data-ad-height",a.toString()),null==s||s.setAttribute("data-ad-width",r.toString());const d=(0,n.getFilteredSlotSizesByWidthAndHeight)(o.SlotType.SIDEBAR_STICKY_RIGHT,r,a);if(!d.length)return;const l=this.getSidebarStickyRightFormatId();this.slots.push(Object.assign({tagId:t,type:o.SlotType.SIDEBAR_STICKY_RIGHT,sizes:d,element:i,isLazy:!1,onAd:()=>{this.updateSidebarStickyVisibility(i),window.addEventListener("resize",e,{passive:!0}),document.addEventListener("scroll",e,{passive:!0})}},l?{formatId:l}:{}))}initTop(){if(!this.shouldShowTopAds())return;this.log(`Initializing ${o.SlotType.TOP}`);const t=Array.from(document.getElementsByClassName("wordads-tag"));let[e]=t.filter((t=>t.dataset.slotType===o.SlotType.TOP));if(!e)return void this.log(`${o.SlotType.TOP} tag not found`);if(e.style.display="",screen.availHeight>=e.getBoundingClientRect().y)return;this.log(`${o.SlotType.TOP} tag relocated to the top`);const i=document.getElementById("wpcom-gifting-banner");i?i.insertAdjacentElement("afterend",e):document.body.prepend(e)}updateSidebarStickyVisibility(t){const e=t.offsetHeight;this.isWithinViewportHeight(e)&&!this.checkIfAdIsOverlappingContent(t)?(this.log("sidebar_sticky_right: ad slot can fit"),t.style.visibility="visible"):(this.log("sidebar_sticky_right: ad slot CANNOT fit"),t.style.visibility="hidden")}isWithinViewportHeight(t){return t<=.8*window.innerHeight}isElemOverlappingAtPoint(t,e,i){return document.elementsFromPoint(t,e).filter((t=>{return!((e=t)===document.body||e===document.documentElement||i.contains(e));var e})).length>0}checkIfAdIsOverlappingContent(t){const e=t.getBoundingClientRect();return this.isElemOverlappingAtPoint(e.left,e.top,t)||this.isElemOverlappingAtPoint(e.left,e.bottom,t)}getMaxAvailableSidebarStickySize(t){const e=(0,n.getSortedSlotSizes)(o.SlotType.SIDEBAR_STICKY_RIGHT);for(const[i,n]of e){t.style.width=`${i}px`,t.style.height=`${n}px`;const e=this.checkIfAdIsOverlappingContent(t);if(t.style.width="",t.style.height="",!e&&this.isWithinViewportHeight(n))return this.log(`sidebar_sticky_right: max available size without overlap, [${i}, ${n}]`),{maxWidth:i,maxHeight:n}}return this.log("sidebar_sticky_right: no slot size fits available space"),{maxWidth:0,maxHeight:0}}initAdTags(){var t;this.log("Initializing ad tags");const e=Array.from(document.getElementsByClassName("wordads-tag"));for(let i=0;i<e.length;i++){const o=e[i],s=null!==(t=o.dataset.slotType)&&void 0!==t?t:"",r=this.getSlotFormatId(s),a=this.getAvailableWidth(o.parentElement),d=(0,n.getFilteredSlotSizesByWidth)(s,a);this.log(`Initializing ad tag ${i+1}: ${s}, format id: ${r}`),s?this.isSlotTypeEnabled(s)?null!==r?d.length?(this.insertAdBefore(o,s,d,r),o.remove()):(this.log(`No available sizes for slot type: ${s}`),o.remove()):(this.log(`Invalid slot type: ${s}`),o.remove()):(this.log(`Disabled slot type: ${s}`),o.remove()):(this.log(`Slot type not provided: ${s}`),o.remove())}}getAvailableWidth(t){if(!t)return 0;const e=window.getComputedStyle(t),i=parseFloat(e.paddingLeft),n=parseFloat(e.paddingRight);return t.getBoundingClientRect().width-(i+n)}getFormat(t){}handleNoAdWithSmart(){}handleNoAd(t){let e=this.getSlotByTagId(t.tagId);e?((null==t?void 0:t.adNetwork)?this.logSlot(e,`Got NoAd from ${null==t?void 0:t.adNetwork}, requesting a fallback`):this.logSlot(e,"Got NoAd, requesting a fallback"),this.insertFallbackAd(e.element,e.type),this.checkBrandSafety(t,e),this.trackStat("noad_"+e.type)):this.log(`NoAd: no slot found for tag id: ${t.tagId}, format: ${this.getFormat(t)}`)}handleAd(t){let e=this.getSlotByTagId(t.tagId);e?((null==t?void 0:t.adNetwork)?this.logSlot(e,`Got an Ad from ${null==t?void 0:t.adNetwork}`):this.logSlot(e,"Got an Ad"),o.StickySlotTypes.indexOf(e.type)>-1?e.element.style.position="fixed":e.element.style.position="relative",e.element.style.visibility="visible",e.onAd&&e.onAd(),this.trackStat("ad_"+e.type)):this.log(`Ad: no slot found for tag id: ${t.tagId}, format: ${this.getFormat(t)}`)}handlePostMessage(t){if("object"!=typeof t.data)return;if("wa-inline-frame"!==t.data.type)return;const e=t;let i=document.getElementsByTagName("iframe");for(let t=0;t<i.length;t++)if(i[t].contentWindow===e.source){i[t].style.height=Math.ceil(e.data.height)+"px";let n=i[t].closest(".wordads-ad");n&&(n.classList.contains("wordads-ad-responsive")||n.classList.add("wordads-ad-responsive"),e.data.maxWidth&&n.querySelectorAll(".wordads-ad-title, .wordads-ad-controls").forEach((t=>{t.style.maxWidth=e.data.maxWidth})));break}}getSlotByTagId(t){return this.slots.find((e=>e.tagId===t))}getRandomTagId(){return"wordads-ad-"+Math.trunc(1e6*Math.random())}initAdNetwork(){this.log("Initializing Smart"),window.sas.cmd.push((()=>{window.sas.setup({networkid:r.SMART_NETWORK_ID,domain:"https://www15.smartadserver.com",async:!0})})),this.handleNoAdWithSmart(),window.sas.cmd.push((()=>{window.sas.events.on("ad",(t=>{this.handleAd(Object.assign(Object.assign({},t),{adNetwork:"Smart"}))}))}))}throttle(t,e){let i=!1;return(...n)=>{i||(t(...n),i=!0,setTimeout((()=>{i=!1}),e))}}isElementInLazyViewport(t){let e=window.innerHeight,i=window.scrollY,n=i-e,o=i+2*e,s=this.getElementGlobalPosition(t);return!(s.bottom<=n||s.top>=o)}processAds(){this.log("processAds: "+this.slots.length),0!==this.slots.length&&this.slots.forEach((t=>{t.isLoaded||(!t.isLazy||this.isElementInLazyViewport(t.element))&&(this.logSlot(t,"in view"),t.isLoaded=!0,this.callAdFlow(t))}))}getLibrariesToFetch(){return{smart:{loaded:!1,url:"https://ced.sascdn.com/tag/3905/smart.js",isInitialized:()=>void 0!==window.sas,init:()=>{window.sas={cmd:[]}}}}}tryInit(t){const e=Object.values(t).map((t=>t.loaded&&t.isInitialized())).filter(Boolean);Object.keys(t).length===e.length&&(this.log("All scripts loaded, initializing..."),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{this.init()})):this.init())}preInit(){this.log("Running Pre Init");const t=this.getLibrariesToFetch();for(const[e,i]of Object.entries(t)){if(i.isInitialized())continue;this.log(`Fetching ${e} script`),i.init();const n=document.createElement("script");n.src=i.url,n.async=!0,n.addEventListener("load",(()=>{this.log(`${e} is loaded`),t[e]=Object.assign(Object.assign({},i),{loaded:!0}),this.tryInit(t)})),document.head.appendChild(n)}}init(){this.log("Init..."),this.mergeConfig(),this.consent.init(),this.initAdNetwork(),this.consent.initCookieSync(),this.initAds()}initAds(){this.initialized||(this.initialized=!0,this.initInlineAds(),this.initTop(),this.initBottomSticky(),this.initSidebarStickyRight(),this.initAdTags(),this.processAds())}deepMerge(t,e){for(let i in e)e.hasOwnProperty(i)&&(e[i]instanceof Object&&t[i]instanceof Object?t[i]=this.deepMerge(t[i],e[i]):t[i]=e[i]);return t}}},240:t=>{"use strict";t.exports="data:image/svg+xml,%3Csvg width=%2730%27 height=%2730%27 viewBox=%270 0 30 30%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect x=%270.5%27 y=%270.5%27 width=%2729%27 height=%2729%27 rx=%2714.5%27 fill=%27white%27/%3E%3Crect x=%270.5%27 y=%270.5%27 width=%2729%27 height=%2729%27 rx=%2714.5%27 stroke=%27%23DDDDDF%27/%3E%3Cpath d=%27M19 11L15 15L19 19%27 stroke=%27%237C7F83%27 stroke-width=%271.5%27/%3E%3Cpath d=%27M11 19L15 15L11 11%27 stroke=%27%237C7F83%27 stroke-width=%271.5%27/%3E%3C/svg%3E"}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.exports}i.m=t,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href,i.nc=void 0,i(506)})();;
/* global wpcom_reblog */

var jetpackLikesWidgetBatch = [];
var jetpackLikesMasterReady = false;

// Due to performance problems on pages with a large number of widget iframes that need to be loaded,
// we are limiting the processing at any instant to unloaded widgets that are currently in viewport,
// plus this constant that will allow processing of widgets above and bellow the current fold.
// This aim of it is to improve the UX and hide the transition from unloaded to loaded state from users.
var jetpackLikesLookAhead = 2000; // pixels

// Keeps track of loaded comment likes widget so we can unload them when they are scrolled out of view.
var jetpackCommentLikesLoadedWidgets = [];

var jetpackLikesDocReadyPromise = new Promise( resolve => {
	if ( document.readyState !== 'loading' ) {
		resolve();
	} else {
		window.addEventListener( 'DOMContentLoaded', () => resolve() );
	}
} );

function JetpackLikesPostMessage( message, target ) {
	if ( typeof message === 'string' ) {
		try {
			message = JSON.parse( message );
		} catch ( e ) {
			return;
		}
	}

	if ( target && typeof target.postMessage === 'function' ) {
		try {
			target.postMessage(
				JSON.stringify( {
					type: 'likesMessage',
					data: message,
				} ),
				'*'
			);
		} catch ( e ) {
			return;
		}
	}
}

function JetpackLikesBatchHandler() {
	const requests = [];
	document.querySelectorAll( 'div.jetpack-likes-widget-unloaded' ).forEach( widget => {
		if ( jetpackLikesWidgetBatch.indexOf( widget.id ) > -1 ) {
			return;
		}

		if ( ! jetpackIsScrolledIntoView( widget ) ) {
			return;
		}

		jetpackLikesWidgetBatch.push( widget.id );

		var regex = /like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/,
			match = regex.exec( widget.id ),
			info;

		if ( ! match || match.length !== 5 ) {
			return;
		}

		info = {
			blog_id: match[ 2 ],
			width: widget.width,
		};

		if ( 'post' === match[ 1 ] ) {
			info.post_id = match[ 3 ];
		} else if ( 'comment' === match[ 1 ] ) {
			info.comment_id = match[ 3 ];
		}

		info.obj_id = match[ 4 ];

		requests.push( info );
	} );

	if ( requests.length > 0 ) {
		JetpackLikesPostMessage(
			{ event: 'initialBatch', requests: requests },
			window.frames[ 'likes-master' ]
		);
	}
}

function JetpackLikesMessageListener( event ) {
	let message = event && event.data;
	if ( typeof message === 'string' ) {
		try {
			message = JSON.parse( message );
		} catch ( err ) {
			return;
		}
	}

	const type = message && message.type;
	const data = message && message.data;

	if ( type !== 'likesMessage' || typeof data.event === 'undefined' ) {
		return;
	}

	// We only allow messages from one origin
	const allowedOrigin = 'https://widgets.wp.com';
	if ( allowedOrigin !== event.origin ) {
		return;
	}

	switch ( data.event ) {
		case 'masterReady':
			jetpackLikesDocReadyPromise.then( () => {
				jetpackLikesMasterReady = true;

				const stylesData = {
					event: 'injectStyles',
				};
				const sdTextColor = document.querySelector( '.sd-text-color' );
				const sdLinkColor = document.querySelector( '.sd-link-color' );
				const sdTextColorStyles = ( sdTextColor && getComputedStyle( sdTextColor ) ) || {};
				const sdLinkColorStyles = ( sdLinkColor && getComputedStyle( sdLinkColor ) ) || {};

				// enable reblogs if they are enabled for the page
				if ( document.body.classList.contains( 'jetpack-reblog-enabled' ) ) {
					JetpackLikesPostMessage( { event: 'reblogsEnabled' }, window.frames[ 'likes-master' ] );
				}

				stylesData.textStyles = {
					color: sdTextColorStyles[ 'color' ],
					fontFamily: sdTextColorStyles[ 'font-family' ],
					fontSize: sdTextColorStyles[ 'font-size' ],
					direction: sdTextColorStyles[ 'direction' ],
					fontWeight: sdTextColorStyles[ 'font-weight' ],
					fontStyle: sdTextColorStyles[ 'font-style' ],
					textDecoration: sdTextColorStyles[ 'text-decoration' ],
				};

				stylesData.linkStyles = {
					color: sdLinkColorStyles[ 'color' ],
					fontFamily: sdLinkColorStyles[ 'font-family' ],
					fontSize: sdLinkColorStyles[ 'font-size' ],
					textDecoration: sdLinkColorStyles[ 'text-decoration' ],
					fontWeight: sdLinkColorStyles[ 'font-weight' ],
					fontStyle: sdLinkColorStyles[ 'font-style' ],
				};

				JetpackLikesPostMessage( stylesData, window.frames[ 'likes-master' ] );

				JetpackLikesBatchHandler();
			} );

			break;

		// We're keeping this for planned future follow ups.
		// @see: https://github.com/Automattic/jetpack/pull/42361#discussion_r1995338815
		case 'showLikeWidget':
			break;

		// We're keeping this for planned future follow ups.
		// @see: https://github.com/Automattic/jetpack/pull/42361#discussion_r1995338815
		case 'showCommentLikeWidget':
			break;

		case 'killCommentLikes':
			// If kill switch for comment likes is enabled remove all widgets wrappers and `Loading...` placeholders.
			document
				.querySelectorAll( '.jetpack-comment-likes-widget-wrapper' )
				.forEach( wrapper => wrapper.remove() );
			break;

		case 'clickReblogFlair':
			if ( wpcom_reblog && typeof wpcom_reblog.toggle_reblog_box_flair === 'function' ) {
				wpcom_reblog.toggle_reblog_box_flair( data.obj_id, data.post_id );
			}
			break;

		case 'hideOtherGravatars': {
			hideLikersPopover();
			break;
		}

		case 'showOtherGravatars': {
			const container = document.querySelector( '#likes-other-gravatars' );

			if ( ! container ) {
				break;
			}

			const list = container.querySelector( 'ul' );

			container.style.display = 'none';
			list.innerHTML = '';

			container
				.querySelectorAll( '.likes-text span' )
				.forEach( item => ( item.textContent = data.totalLikesLabel ) );

			( data.likers || [] ).forEach( async ( liker, index ) => {
				if ( liker.profile_URL.substr( 0, 4 ) !== 'http' ) {
					// We only display gravatars with http or https schema
					return;
				}

				const element = document.createElement( 'li' );
				list.append( element );

				element.innerHTML = `
				<a href="${ encodeURI( liker.profile_URL ) }" rel="nofollow" target="_parent" class="wpl-liker">
					<img src="${ encodeURI( liker.avatar_URL ) }"
						alt=""
						style="width: 28px; height: 28px;" />
					<span></span>
				</a>
				`;


				// Add some extra attributes through native methods, to ensure strings are sanitized.
				element.classList.add( liker.css_class );
				element.querySelector( 'img' ).alt = data.avatarAltTitle.replace( '%s', liker.name );
				element.querySelector( 'span' ).innerText = liker.name;

				if ( index === data.likers.length - 1 ) {
					element.addEventListener( 'keydown', ( e ) => {
						if ( e.key === 'Tab' && ! e.shiftKey ) {
							e.preventDefault();
							hideLikersPopover();

							JetpackLikesPostMessage(
								{ event: 'focusLikesCount', parent: data.parent },
								window.frames[ 'likes-master' ]
							);
						}
					} );
				}
			} );

			const positionPopup = function() {
				const containerStyle = getComputedStyle(container);
				const isRtl = containerStyle.direction === 'rtl';

				const el = document.querySelector( `*[name='${ data.parent }']` );
				const rect = el.getBoundingClientRect();
				const win = el.ownerDocument.defaultView;

				const offset = {
					top: rect.top + win.pageYOffset,
					left: rect.left + win.pageXOffset,
				};

				// don't display yet or we get skewed window.innerWidth later
				container.style.display = 'none';

				let containerLeft = 0;
				container.style.top = offset.top + data.position.top - 1 + 'px';

				if ( isRtl ) {
					const visibleAvatarsCount = data && data.likers ? Math.min( data.likers.length, 5 ) : 0;
					// 24px is the width of the avatar + 4px is the padding between avatars
					containerLeft = offset.left + data.position.left + 24 * visibleAvatarsCount + 4;
					container.style.transform = 'translateX(-100%)';
				} else {
					containerLeft = offset.left + data.position.left;
				}
				container.style.left = containerLeft + 'px';

				// Container width - padding
				const initContainerWidth = data.width - 20;
				const rowLength = Math.floor( initContainerWidth / 37 );
				// # of rows + (avatar + avatar padding) + text above + container padding
				let height = Math.ceil( data.likers.length / rowLength ) * 37 + 17 + 22;
				if ( height > 204 ) {
					height = 204;
				}

				// If the popup is overflows viewport width, we should show it on the next line
				// Push it offscreen to calculated rendered width
				const windowWidth = win.innerWidth;
				container.style.left = '-9999px';
				container.style.display = 'block';

				// If the popup exceeds the viewport width,
				// flip the position of the popup.
				const containerWidth = container.offsetWidth;
				const containerRight = containerLeft + containerWidth;

				if ( containerRight > windowWidth && ! isRtl) {
					containerLeft = rect.left + rect.width - containerWidth;
				} else if ( containerLeft - containerWidth < 0 && isRtl ) {
					container.style.transform = 'none';
					containerLeft = rect.left;
				}
				// Set the container left
				container.style.left = containerLeft + 'px';

				container.setAttribute( 'aria-hidden', 'false' );
			}

			positionPopup();
			container.focus();

			const debounce = function( func, wait ) {
				var timeout;
				return function() {
					var context = this;
					var args = arguments;
					clearTimeout( timeout );
					timeout = setTimeout( function() {
						func.apply( context, args );
					}, wait );
				};
			};

			const debouncedPositionPopup = debounce( positionPopup, 100 );

			// Keep a reference of this function in the element itself
			// so that we can destroy it later
			container.__resizeHandler = debouncedPositionPopup;

			// When window is resized, resize the popup.
			window.addEventListener( "resize", debouncedPositionPopup );
		}
	}
}

window.addEventListener( 'message', JetpackLikesMessageListener );

function hideLikersPopover() {
	const container = document.querySelector( '#likes-other-gravatars' );

	if ( container ) {
		container.style.display = 'none';
		container.setAttribute( 'aria-hidden', 'true' );

		// Remove the resize event listener and cleanup.
		const resizeHandler = container.__resizeHandler;
		if ( resizeHandler ) {
			window.removeEventListener( "resize", resizeHandler );
			delete container.__resizeHandler;
		}
	}
}

document.addEventListener( 'click', hideLikersPopover );

function JetpackLikesWidgetQueueHandler() {
	var wrapperID;

	if ( ! jetpackLikesMasterReady ) {
		setTimeout( JetpackLikesWidgetQueueHandler, 500 );
		return;
	}

	// Restore widgets to initial unloaded state when they are scrolled out of view.
	jetpackUnloadScrolledOutWidgets();

	var unloadedWidgetsInView = jetpackGetUnloadedWidgetsInView();

	if ( unloadedWidgetsInView.length > 0 ) {
		// Grab any unloaded widgets for a batch request
		JetpackLikesBatchHandler();
	}

	for ( var i = 0, length = unloadedWidgetsInView.length; i <= length - 1; i++ ) {
		wrapperID = unloadedWidgetsInView[ i ].id;

		if ( ! wrapperID ) {
			continue;
		}

		jetpackLoadLikeWidgetIframe( wrapperID );
	}
}

function jetpackLoadLikeWidgetIframe( wrapperID ) {
	if ( typeof wrapperID === 'undefined' ) {
		return;
	}

	const wrapper = document.querySelector( '#' + wrapperID );
	wrapper.querySelectorAll( 'iframe' ).forEach( iFrame => iFrame.remove() );

	const placeholder = wrapper.querySelector( '.likes-widget-placeholder' );

	// Post like iframe
	if ( placeholder && placeholder.classList.contains( 'post-likes-widget-placeholder' ) ) {
		const postLikesFrame = document.createElement( 'iframe' );

		postLikesFrame.classList.add( 'post-likes-widget', 'jetpack-likes-widget' );
		postLikesFrame.name = wrapper.dataset.name;
		postLikesFrame.src = wrapper.dataset.src;
		postLikesFrame.height = '55px';
		postLikesFrame.width = '100%';
		postLikesFrame.frameBorder = '0';
		postLikesFrame.scrolling = 'no';
		postLikesFrame.title = wrapper.dataset.title;

		placeholder.after( postLikesFrame );
	}

	// Comment like iframe
	if ( placeholder.classList.contains( 'comment-likes-widget-placeholder' ) ) {
		const commentLikesFrame = document.createElement( 'iframe' );

		commentLikesFrame.class = 'comment-likes-widget-frame jetpack-likes-widget-frame';
		commentLikesFrame.name = wrapper.dataset.name;
		commentLikesFrame.src = wrapper.dataset.src;
		commentLikesFrame.height = '18px';
		commentLikesFrame.width = '100%';
		commentLikesFrame.frameBorder = '0';
		commentLikesFrame.scrolling = 'no';

		wrapper.querySelector( '.comment-like-feedback' ).after( commentLikesFrame );

		jetpackCommentLikesLoadedWidgets.push( commentLikesFrame );
	}

	wrapper.classList.remove( 'jetpack-likes-widget-unloaded' );
	wrapper.classList.add( 'jetpack-likes-widget-loading' );

	wrapper.querySelector( 'iframe' ).addEventListener( 'load', e => {
		JetpackLikesPostMessage(
			{ event: 'loadLikeWidget', name: e.target.name, width: e.target.width },
			window.frames[ 'likes-master' ]
		);

		wrapper.classList.remove( 'jetpack-likes-widget-loading' );
		wrapper.classList.add( 'jetpack-likes-widget-loaded' );
	} );
}

function jetpackGetUnloadedWidgetsInView() {
	const unloadedWidgets = document.querySelectorAll( 'div.jetpack-likes-widget-unloaded' );

	return [ ...unloadedWidgets ].filter( item => jetpackIsScrolledIntoView( item ) );
}

function jetpackIsScrolledIntoView( element ) {
	const top = element.getBoundingClientRect().top;
	const bottom = element.getBoundingClientRect().bottom;

	// Allow some slack above and bellow the fold with jetpackLikesLookAhead,
	// with the aim of hiding the transition from unloaded to loaded widget from users.
	return top + jetpackLikesLookAhead >= 0 && bottom <= window.innerHeight + jetpackLikesLookAhead;
}

function jetpackUnloadScrolledOutWidgets() {
	for ( let i = jetpackCommentLikesLoadedWidgets.length - 1; i >= 0; i-- ) {
		const currentWidgetIframe = jetpackCommentLikesLoadedWidgets[ i ];

		if ( ! jetpackIsScrolledIntoView( currentWidgetIframe ) ) {
			const widgetWrapper =
				currentWidgetIframe &&
				currentWidgetIframe.parentElement &&
				currentWidgetIframe.parentElement.parentElement;

			// Restore parent class to 'unloaded' so this widget can be picked up by queue manager again if needed.
			widgetWrapper.classList.remove( 'jetpack-likes-widget-loaded' );
			widgetWrapper.classList.remove( 'jetpack-likes-widget-loading' );
			widgetWrapper.classList.add( 'jetpack-likes-widget-unloaded' );

			// Bring back the loading placeholder into view.
			widgetWrapper
				.querySelectorAll( '.comment-likes-widget-placeholder' )
				.forEach( item => ( item.style.display = 'block' ) );

			// Remove it from the list of loaded widgets.
			jetpackCommentLikesLoadedWidgets.splice( i, 1 );

			// Remove comment like widget iFrame.
			currentWidgetIframe.remove();
		}
	}
}

var jetpackWidgetsDelayedExec = function ( after, fn ) {
	var timer;
	return function () {
		clearTimeout( timer );
		timer = setTimeout( fn, after );
	};
};

var jetpackOnScrollStopped = jetpackWidgetsDelayedExec( 250, JetpackLikesWidgetQueueHandler );

// Load initial batch of widgets, prior to any scrolling events.
JetpackLikesWidgetQueueHandler();

// Add event listener to execute queue handler after scroll.
window.addEventListener( 'scroll', jetpackOnScrollStopped, true );
;
!function(){"use strict";var e,n,t={998:function(e,n,t){t.d(n,{B$:function(){return _},NZ:function(){return i},Uq:function(){return c},a3:function(){return u},d6:function(){return a},hA:function(){return l},j4:function(){return s},pM:function(){return o},zq:function(){return r}});var o={NOTICE:"notice",GENERAL_SETTINGS:"general-settings",PURPOSE_SETTINGS:"purpose-settings",VENDORS_SETTINGS:"vendors-settings",HIDDEN:""},r=258,i="en",u={1:!0,2:!0,3:!0,4:!0,7:!0,9:!0,10:!0},l={2:!0,7:!0,9:!0,10:!0},a={UI_SHOWN:"cmpuishown",LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},c={VISIBLE:"visible",HIDDEN:"hidden",DISABLED:"disabled"},s={STUB:"stub",LOADED:"loaded",ERROR:"error"},_="euconsent-v2"},748:function(e,n,t){t.d(n,{HY:function(){return u.HY},Vx:function(){return L},n4:function(){return x},az:function(){return u.az},ZP:function(){return ie},Gp:function(){return N},Vo:function(){return R},I4:function(){return k},d4:function(){return y},sO:function(){return b},eJ:function(){return h}});var o,r,i,u=t(400),l=0,a=[],c=u.YM.__b,s=u.YM.__r,_=u.YM.diffed,f=u.YM.__c,d=u.YM.unmount;function p(e,n){u.YM.__h&&u.YM.__h(r,e,l||n),l=0;var t=r.__H||(r.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function h(e){return l=1,v(O,e)}function v(e,n,t){var i=p(o++,2);return i.t=e,i.__c||(i.__=[t?t(n):O(void 0,n),function(e){var n=i.t(i.__[0],e);i.__[0]!==n&&(i.__=[n,i.__[1]],i.__c.setState({}))}],i.__c=r),i.__}function y(e,n){var t=p(o++,3);!u.YM.__s&&A(t.__H,n)&&(t.__=e,t.__H=n,r.__H.__h.push(t))}function m(e,n){var t=p(o++,4);!u.YM.__s&&A(t.__H,n)&&(t.__=e,t.__H=n,r.__h.push(t))}function b(e){return l=5,g((function(){return{current:e}}),[])}function g(e,n){var t=p(o++,7);return A(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function k(e,n){return l=8,g((function(){return e}),n)}function C(){for(var e;e=a.shift();)if(e.__P)try{e.__H.__h.forEach(S),e.__H.__h.forEach(E),e.__H.__h=[]}catch(n){e.__H.__h=[],u.YM.__e(n,e.__v)}}u.YM.__b=function(e){r=null,c&&c(e)},u.YM.__r=function(e){s&&s(e),o=0;var n=(r=e.__c).__H;n&&(n.__h.forEach(S),n.__h.forEach(E),n.__h=[])},u.YM.diffed=function(e){_&&_(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==a.push(n)&&i===u.YM.requestAnimationFrame||((i=u.YM.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(o),w&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);w&&(n=requestAnimationFrame(t))})(C)),r=null},u.YM.__c=function(e,n){n.some((function(e){try{e.__h.forEach(S),e.__h=e.__h.filter((function(e){return!e.__||E(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],u.YM.__e(t,e.__v)}})),f&&f(e,n)},u.YM.unmount=function(e){d&&d(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{S(e)}catch(e){n=e}})),n&&u.YM.__e(n,t.__v))};var w="function"==typeof requestAnimationFrame;function S(e){var n=r,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),r=n}function E(e){var n=r;e.__c=e.__(),r=n}function A(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function O(e,n){return"function"==typeof n?n(e):n}function P(e,n){for(var t in n)e[t]=n[t];return e}function I(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var o in n)if("__source"!==o&&e[o]!==n[o])return!0;return!1}function L(e){this.props=e}(L.prototype=new u.wA).isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(e,n){return I(this.props,e)||I(this.state,n)};var T=u.YM.__b;u.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),T&&T(e)};var M="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(e){function n(n){var t=P({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=M,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var U=function(e,n){return null==e?null:(0,u.bR)((0,u.bR)(e).map(n))},j={map:U,forEach:U,count:function(e){return e?(0,u.bR)(e).length:0},only:function(e){var n=(0,u.bR)(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:u.bR},H=u.YM.__e;u.YM.__e=function(e,n,t,o){if(e.then)for(var r,i=n;i=i.__;)if((r=i.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);H(e,n,t,o)};var D=u.YM.unmount;function x(){this.__u=0,this.t=null,this.__b=null}function V(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function R(e){var n,t,o;function r(r){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){o=e})),o)throw o;if(!t)throw n;return(0,u.az)(t,r)}return r.displayName="Lazy",r.__f=!0,r}function B(){this.u=null,this.o=null}u.YM.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),D&&D(e)},(x.prototype=new u.wA).__c=function(e,n){var t=n.__c,o=this;null==o.t&&(o.t=[]),o.t.push(t);var r=V(o.__v),i=!1,u=function(){i||(i=!0,t.__R=null,r?r(l):l())};t.__R=u;var l=function(){if(!--o.__u){if(o.state.__e){var e=o.state.__e;o.__v.__k[0]=function e(n,t,o){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,o)})),n.__c&&n.__c.__P===t&&(n.__e&&o.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=o)),n}(e,e.__c.__P,e.__c.__O)}var n;for(o.setState({__e:o.__b=null});n=o.t.pop();)n.forceUpdate()}},a=!0===n.__h;o.__u++||a||o.setState({__e:o.__b=o.__v.__k[0]}),e.then(u,u)},x.prototype.componentWillUnmount=function(){this.t=[]},x.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,o){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=P({},n)).__c&&(n.__c.__P===o&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,o)}))),n}(this.__b,t,o.__O=o.__P)}this.__b=null}var r=n.__e&&(0,u.az)(u.HY,null,e.fallback);return r&&(r.__h=null),[(0,u.az)(u.HY,null,n.__e?null:e.children),r]};var Y=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};function F(e){return this.getChildContext=function(){return e.context},e.children}function z(e){var n=this,t=e.i;n.componentWillUnmount=function(){(0,u.sY)(null,n.l),n.l=null,n.i=null},n.i&&n.i!==t&&n.componentWillUnmount(),e.__v?(n.l||(n.i=t,n.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(e){this.childNodes.push(e),n.i.appendChild(e)},insertBefore:function(e,t){this.childNodes.push(e),n.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.i.removeChild(e)}}),(0,u.sY)((0,u.az)(F,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(B.prototype=new u.wA).__e=function(e){var n=this,t=V(n.__v),o=n.o.get(e);return o[0]++,function(r){var i=function(){n.props.revealOrder?(o.push(r),Y(n,e,o)):r()};t?t(i):i()}},B.prototype.render=function(e){this.u=null,this.o=new Map;var n=(0,u.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Y(e,t,n)}))};var q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,W=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,$="undefined"!=typeof document,G=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};u.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(u.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Z=u.YM.event;function J(){}function X(){return this.cancelBubble}function Q(){return this.defaultPrevented}u.YM.event=function(e){return Z&&(e=Z(e)),e.persist=J,e.isPropagationStopped=X,e.isDefaultPrevented=Q,e.nativeEvent=e};var K,ee={configurable:!0,get:function(){return this.class}},ne=u.YM.vnode;u.YM.vnode=function(e){var n=e.type,t=e.props,o=t;if("string"==typeof n){var r=-1===n.indexOf("-");for(var i in o={},t){var l=t[i];$&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in t&&null==l||("defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!G(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():r&&W.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===l&&(l=void 0),o[i]=l)}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,u.bR)(t.children).forEach((function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)}))),"select"==n&&null!=o.defaultValue&&(o.value=(0,u.bR)(t.children).forEach((function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),e.props=o,t.class!=t.className&&(ee.enumerable="className"in t,null!=t.className&&(o.class=t.className),Object.defineProperty(o,"className",ee))}e.$$typeof=q,ne&&ne(e)};var te=u.YM.__r;u.YM.__r=function(e){te&&te(e),K=e.__c};var oe={ReactCurrentDispatcher:{current:{readContext:function(e){return K.__n[e.__c].props.value}}}};function re(e){return!!e&&e.$$typeof===q}u.HY;var ie={useState:h,useReducer:v,useEffect:y,useLayoutEffect:m,useRef:b,useImperativeHandle:function(e,n,t){l=6,m((function(){return"function"==typeof e?(e(n()),function(){return e(null)}):e?(e.current=n(),function(){return e.current=null}):void 0}),null==t?t:t.concat(e))},useMemo:g,useCallback:k,useContext:function(e){var n=r.context[e.__c],t=p(o++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(r)),n.props.value):e.__},useDebugValue:function(e,n){u.YM.useDebugValue&&u.YM.useDebugValue(n?n(e):e)},version:"17.0.2",Children:j,render:function(e,n,t){return null==n.__k&&(n.textContent=""),(0,u.sY)(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return(0,u.ZB)(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&((0,u.sY)(null,e),!0)},createPortal:function(e,n){return(0,u.az)(z,{__v:e,i:n})},createElement:u.az,createContext:u.kr,createFactory:function(e){return u.az.bind(null,e)},cloneElement:function(e){return re(e)?u.Tm.apply(null,arguments):e},createRef:u.Vf,Fragment:u.HY,isValidElement:re,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:u.wA,PureComponent:L,memo:function(e,n){function t(e){var t=this.props.ref,o=t==e.ref;return!o&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!o:I(this.props,e)}function o(n){return this.shouldComponentUpdate=t,(0,u.az)(e,n)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o},forwardRef:N,flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:u.HY,Suspense:x,SuspenseList:B,lazy:R,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:oe}},400:function(e,n,t){t.d(n,{HY:function(){return m},Tm:function(){return R},Vf:function(){return y},YM:function(){return r},ZB:function(){return V},az:function(){return h},bR:function(){return A},h:function(){return h},kr:function(){return B},sY:function(){return x},wA:function(){return b}});var o,r,i,u,l,a,c,s={},_=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(e,n){for(var t in n)e[t]=n[t];return e}function p(e){var n=e.parentNode;n&&n.removeChild(e)}function h(e,n,t){var r,i,u,l={};for(u in n)"key"==u?r=n[u]:"ref"==u?i=n[u]:l[u]=n[u];if(arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(u in e.defaultProps)void 0===l[u]&&(l[u]=e.defaultProps[u]);return v(e,l,r,i,null)}function v(e,n,t,o,u){var l={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++i:u};return null==u&&null!=r.vnode&&r.vnode(l),l}function y(){return{current:null}}function m(e){return e.children}function b(e,n){this.props=e,this.context=n}function g(e,n){if(null==n)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?g(e):null}function k(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return k(e)}}function C(e){(!e.__d&&(e.__d=!0)&&u.push(e)&&!w.__r++||a!==r.debounceRendering)&&((a=r.debounceRendering)||l)(w)}function w(){for(var e;w.__r=u.length;)e=u.sort((function(e,n){return e.__v.__b-n.__v.__b})),u=[],e.some((function(e){var n,t,o,r,i,u;e.__d&&(i=(r=(n=e).__v).__e,(u=n.__P)&&(t=[],(o=d({},r)).__v=r.__v+1,M(u,r,o,n.__n,void 0!==u.ownerSVGElement,null!=r.__h?[i]:null,t,null==i?g(r):i,r.__h),N(t,r),r.__e!=i&&k(r)))}))}function S(e,n,t,o,r,i,u,l,a,c){var f,d,p,h,y,b,k,C=o&&o.__k||_,w=C.length;for(t.__k=[],f=0;f<n.length;f++)if(null!=(h=t.__k[f]=null==(h=n[f])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?v(null,h,null,null,h):Array.isArray(h)?v(m,{children:h},null,null,null):h.__b>0?v(h.type,h.props,h.key,null,h.__v):h)){if(h.__=t,h.__b=t.__b+1,null===(p=C[f])||p&&h.key==p.key&&h.type===p.type)C[f]=void 0;else for(d=0;d<w;d++){if((p=C[d])&&h.key==p.key&&h.type===p.type){C[d]=void 0;break}p=null}M(e,h,p=p||s,r,i,u,l,a,c),y=h.__e,(d=h.ref)&&p.ref!=d&&(k||(k=[]),p.ref&&k.push(p.ref,null,h),k.push(d,h.__c||y,h)),null!=y?(null==b&&(b=y),"function"==typeof h.type&&h.__k===p.__k?h.__d=a=E(h,a,e):a=O(e,h,p,C,y,a),"function"==typeof t.type&&(t.__d=a)):a&&p.__e==a&&a.parentNode!=e&&(a=g(p))}for(t.__e=b,f=w;f--;)null!=C[f]&&("function"==typeof t.type&&null!=C[f].__e&&C[f].__e==t.__d&&(t.__d=g(o,f+1)),H(C[f],C[f]));if(k)for(f=0;f<k.length;f++)j(k[f],k[++f],k[++f])}function E(e,n,t){for(var o,r=e.__k,i=0;r&&i<r.length;i++)(o=r[i])&&(o.__=e,n="function"==typeof o.type?E(o,n,t):O(t,o,o,r,o.__e,n));return n}function A(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){A(e,n)})):n.push(e)),n}function O(e,n,t,o,r,i){var u,l,a;if(void 0!==n.__d)u=n.__d,n.__d=void 0;else if(null==t||r!=i||null==r.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(r),u=null;else{for(l=i,a=0;(l=l.nextSibling)&&a<o.length;a+=2)if(l==r)break e;e.insertBefore(r,i),u=i}return void 0!==u?u:r.nextSibling}function P(e,n,t){"-"===n[0]?e.setProperty(n,t):e[n]=null==t?"":"number"!=typeof t||f.test(n)?t:t+"px"}function I(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||P(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||P(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o||e.addEventListener(n,i?T:L,i):e.removeEventListener(n,i?T:L,i);else if("dangerouslySetInnerHTML"!==n){if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null!=t&&(!1!==t||"a"===n[0]&&"r"===n[1])?e.setAttribute(n,t):e.removeAttribute(n))}}function L(e){this.l[e.type+!1](r.event?r.event(e):e)}function T(e){this.l[e.type+!0](r.event?r.event(e):e)}function M(e,n,t,o,i,u,l,a,c){var s,_,f,p,h,v,y,g,k,C,w,E=n.type;if(void 0!==n.constructor)return null;null!=t.__h&&(c=t.__h,a=n.__e=t.__e,n.__h=null,u=[a]),(s=r.__b)&&s(n);try{e:if("function"==typeof E){if(g=n.props,k=(s=E.contextType)&&o[s.__c],C=s?k?k.props.value:s.__:o,t.__c?y=(_=n.__c=t.__c).__=_.__E:("prototype"in E&&E.prototype.render?n.__c=_=new E(g,C):(n.__c=_=new b(g,C),_.constructor=E,_.render=D),k&&k.sub(_),_.props=g,_.state||(_.state={}),_.context=C,_.__n=o,f=_.__d=!0,_.__h=[]),null==_.__s&&(_.__s=_.state),null!=E.getDerivedStateFromProps&&(_.__s==_.state&&(_.__s=d({},_.__s)),d(_.__s,E.getDerivedStateFromProps(g,_.__s))),p=_.props,h=_.state,f)null==E.getDerivedStateFromProps&&null!=_.componentWillMount&&_.componentWillMount(),null!=_.componentDidMount&&_.__h.push(_.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==p&&null!=_.componentWillReceiveProps&&_.componentWillReceiveProps(g,C),!_.__e&&null!=_.shouldComponentUpdate&&!1===_.shouldComponentUpdate(g,_.__s,C)||n.__v===t.__v){_.props=g,_.state=_.__s,n.__v!==t.__v&&(_.__d=!1),_.__v=n,n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),_.__h.length&&l.push(_);break e}null!=_.componentWillUpdate&&_.componentWillUpdate(g,_.__s,C),null!=_.componentDidUpdate&&_.__h.push((function(){_.componentDidUpdate(p,h,v)}))}_.context=C,_.props=g,_.state=_.__s,(s=r.__r)&&s(n),_.__d=!1,_.__v=n,_.__P=e,s=_.render(_.props,_.state,_.context),_.state=_.__s,null!=_.getChildContext&&(o=d(d({},o),_.getChildContext())),f||null==_.getSnapshotBeforeUpdate||(v=_.getSnapshotBeforeUpdate(p,h)),w=null!=s&&s.type===m&&null==s.key?s.props.children:s,S(e,Array.isArray(w)?w:[w],n,t,o,i,u,l,a,c),_.base=n.__e,n.__h=null,_.__h.length&&l.push(_),y&&(_.__E=_.__=null),_.__e=!1}else null==u&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=U(t.__e,n,t,o,i,u,l,c);(s=r.diffed)&&s(n)}catch(e){n.__v=null,(c||null!=u)&&(n.__e=a,n.__h=!!c,u[u.indexOf(a)]=null),r.__e(e,n,t)}}function N(e,n){r.__c&&r.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){r.__e(e,n.__v)}}))}function U(e,n,t,r,i,u,l,a){var c,_,f,d=t.props,h=n.props,v=n.type,y=0;if("svg"===v&&(i=!0),null!=u)for(;y<u.length;y++)if((c=u[y])&&"setAttribute"in c==!!v&&(v?c.localName===v:3===c.nodeType)){e=c,u[y]=null;break}if(null==e){if(null===v)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,h.is&&h),u=null,a=!1}if(null===v)d===h||a&&e.data===h||(e.data=h);else{if(u=u&&o.call(e.childNodes),_=(d=t.props||s).dangerouslySetInnerHTML,f=h.dangerouslySetInnerHTML,!a){if(null!=u)for(d={},y=0;y<e.attributes.length;y++)d[e.attributes[y].name]=e.attributes[y].value;(f||_)&&(f&&(_&&f.__html==_.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(function(e,n,t,o,r){var i;for(i in t)"children"===i||"key"===i||i in n||I(e,i,null,t[i],o);for(i in n)r&&"function"!=typeof n[i]||"children"===i||"key"===i||"value"===i||"checked"===i||t[i]===n[i]||I(e,i,n[i],t[i],o)}(e,h,d,i,a),f)n.__k=[];else if(y=n.props.children,S(e,Array.isArray(y)?y:[y],n,t,r,i&&"foreignObject"!==v,u,l,u?u[0]:t.__k&&g(t,0),a),null!=u)for(y=u.length;y--;)null!=u[y]&&p(u[y]);a||("value"in h&&void 0!==(y=h.value)&&(y!==e.value||"progress"===v&&!y||"option"===v&&y!==d.value)&&I(e,"value",y,d.value,!1),"checked"in h&&void 0!==(y=h.checked)&&y!==e.checked&&I(e,"checked",y,d.checked,!1))}return e}function j(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){r.__e(e,t)}}function H(e,n,t){var o,i;if(r.unmount&&r.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||j(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){r.__e(e,n)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&H(o[i],n,"function"!=typeof e.type);t||null==e.__e||p(e.__e),e.__e=e.__d=void 0}function D(e,n,t){return this.constructor(e,t)}function x(e,n,t){var i,u,l;r.__&&r.__(e,n),u=(i="function"==typeof t)?null:t&&t.__k||n.__k,l=[],M(n,e=(!i&&t||n).__k=h(m,null,[e]),u||s,s,void 0!==n.ownerSVGElement,!i&&t?[t]:u?null:n.firstChild?o.call(n.childNodes):null,l,!i&&t?t:u?u.__e:n.firstChild,i),N(l,e)}function V(e,n){x(e,n,V)}function R(e,n,t){var r,i,u,l=d({},e.props);for(u in n)"key"==u?r=n[u]:"ref"==u?i=n[u]:l[u]=n[u];return arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):t),v(e.type,l,r||e.key,i||e.ref,null)}function B(e,n){var t={__c:n="__cC"+c++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(C)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}o=_.slice,r={__e:function(e,n,t,o){for(var r,i,u;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),u=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),u=r.__d),u)return r.__E=r}catch(n){e=n}throw e}},i=0,b.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof e&&(e=e(d({},t),this.props)),e&&d(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),C(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},b.prototype.render=m,u=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,w.__r=0,c=0}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var i=o[e]={id:e,exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=function(e){return Promise.all(Object.keys(r.f).reduce((function(n,t){return r.f[t](e,n),n}),[]))},r.u=function(e){return{143:"app",571:"settings",664:"notice"}[e]+".bundle.js?id="+{143:"5ce15f832ceb285bf666",571:"6ac4136fc65203aa5a87",664:"15adeea106477337c54b"}[e]},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},e={},n="a8c-cmp:",r.l=function(t,o,i,u){if(e[t])e[t].push(o);else{var l,a;if(void 0!==i)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var _=c[s];if(_.getAttribute("src")==t||_.getAttribute("data-webpack")==n+i){l=_;break}}l||(a=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,r.nc&&l.setAttribute("nonce",r.nc),l.setAttribute("data-webpack",n+i),l.src=t),e[t]=[o];var f=function(n,o){l.onerror=l.onload=null,clearTimeout(d);var r=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),r&&r.forEach((function(e){return e(o)})),n)return n(o)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),a&&document.head.appendChild(l)}},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",function(){var e={968:0};r.f.j=function(n,t){var o=r.o(e,n)?e[n]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((function(t,r){o=e[n]=[t,r]}));t.push(o[2]=i);var u=r.p+r.u(n),l=new Error;r.l(u,(function(t){if(r.o(e,n)&&(0!==(o=e[n])&&(e[n]=void 0),o)){var i=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;l.message="Loading chunk "+n+" failed.\n("+i+": "+u+")",l.name="ChunkLoadError",l.type=i,l.request=u,o[1](l)}}),"chunk-"+n,n)}};var n=function(n,t){var o,i,u=t[0],l=t[1],a=t[2],c=0;if(u.some((function(n){return 0!==e[n]}))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(a)a(r)}for(n&&n(t);c<u.length;c++)i=u[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0},t=self.webpackChunka8c_cmp=self.webpackChunka8c_cmp||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}(),function(){var e=r(400),n=r(748);function t(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var o=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,o,r;return n=e,r=[{key:"decode",value:function(n){for(var t="",o=0;o<n.length;o++){for(var r=e.dictionary.indexOf(n[o]).toString(2),i=6-r.length,u=0;u<i;u++)t+="0";t+=r}return t}},{key:"encode",value:function(n){for(var t="",o=24-n.length%24,r=0;r<o;r++)n+="0";for(var i=0;i<n.length;i+=6)t+=e.dictionary[parseInt(n.substr(i,6),2)];return t}}],(o=null)&&t(n.prototype,o),r&&t(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();function i(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}o.dictionary="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";var u=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"decode",value:function(e){return parseInt(e,2)}},{key:"encode",value:function(e,n){for(var t="",o=e.toString(2),r=n-o.length,i=0;i<r;i++)t+="0";return t+o}}],(t=null)&&i(n.prototype,t),o&&i(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function l(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var a=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"decode",value:function(e){return new Date(100*u.decode(e))}},{key:"encode",value:function(e){return u.encode(Math.round(e.getTime()/100),36)}}],(t=null)&&l(n.prototype,t),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function c(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var s=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"decode",value:function(e){return String.fromCharCode(u.decode(e)+65)}},{key:"encode",value:function(e){return u.encode(e.charCodeAt(0)-65,6)}}],(t=null)&&c(n.prototype,t),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function _(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var f=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"decode",value:function(e){return[s.decode(e.substring(0,6)),s.decode(e.substring(6))].join("")}},{key:"encode",value:function(e){return s.encode(e[0],6)+s.encode(e[1],6)}}],(t=null)&&_(n.prototype,t),o&&_(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function d(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var p=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"decode",value:function(e){return"1"===e}},{key:"encode",value:function(e){return e?"1":"0"}}],(t=null)&&d(n.prototype,t),o&&d(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function h(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var v=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"decode",value:function(e){for(var n={},t=0;t<e.length;t++)"1"===e[t]&&(n[t+1]=!0);return n}},{key:"encode",value:function(e,n){for(var t="",o=1;o<=n;o++)t+=e[o]?"1":"0";return t}}],(t=null)&&h(n.prototype,t),o&&h(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function y(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var m=function(){function e(n){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.bitString=n,this.position=0}var n,t,o;return n=e,(t=[{key:"advance",value:function(e){this.position+=e}},{key:"getPosition",value:function(){return this.position}},{key:"peekToEnd",value:function(){return this.bitString.substring(this.position)}},{key:"popBits",value:function(e){var n=this.bitString.substring(this.position,this.position+e);return this.advance(e),n}}])&&y(n.prototype,t),o&&y(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function b(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return g(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}function k(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var C=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"decode",value:function(e){var n=new m(e),t=u.decode(n.popBits(16));if(!p.decode(n.popBits(1)))return{value:v.decode(n.popBits(t)),bitLength:n.getPosition()};for(var o={},r=u.decode(n.popBits(12)),i=0;i<r;i++){var l=p.decode(n.popBits(1)),a=u.decode(n.popBits(16));if(l)for(var c=u.decode(n.popBits(16)),s=a;s<=c;s++)o[s]=!0;else o[a]=!0}return{value:o,bitLength:n.getPosition()}}},{key:"encode",value:function(e){var n="",t=Math.max.apply(Math,b(Object.keys(e)).concat([0]));n+=u.encode(t,16);for(var o="",r=[],i=[],l=1;l<=t;l++)o+=e[l]?"1":"0",e[l]&&(0==i.length&&i.push(l),e[l+1]||(i.push(l),r.push(i),i=[]));return 45*r.length<o.length?(n+=p.encode(!0,1),n+=u.encode(r.length,12),r.forEach((function(e){var t=e[0]!==e[1];n+=p.encode(t,1),n+=u.encode(e[0],16),t&&(n+=u.encode(e[1],16))}))):n+=p.encode(!1,1)+o,n}}],(t=null)&&k(n.prototype,t),o&&k(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function w(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var S=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,r;return n=e,r=[{key:"deserialize",value:function(n){var t=new m(o.decode(n));return e.decodeFields(e.fieldMap,t)}},{key:"decodeFields",value:function(n,t){var o={};return n.forEach((function(n){if(n.children)o[n.key]=e.decodeFields(n.children,t);else if(void 0===n.bitLength){var r=n.codec.decode(t.peekToEnd());o[n.key]=r.value,t.advance(r.bitLength)}else o[n.key]=n.codec.decode(t.popBits(n.bitLength))})),o}},{key:"serialize",value:function(n){var t=e.encodeFields(e.fieldMap,n);return o.encode(t)}},{key:"encodeFields",value:function(n,t){var o="";return n.forEach((function(n){n.children?o+=e.encodeFields(n.children,t[n.key]):void 0===n.bitLength?o+=n.codec.encode(t[n.key]):o+=n.codec.encode(t[n.key],n.bitLength)})),o}}],(t=null)&&w(n.prototype,t),r&&w(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();S.fieldMap=[{key:"version",codec:u,bitLength:6},{key:"created",codec:a,bitLength:36},{key:"lastUpdated",codec:a,bitLength:36},{key:"cmpId",codec:u,bitLength:12},{key:"cmpVersion",codec:u,bitLength:12},{key:"consentScreen",codec:u,bitLength:6},{key:"consentLanguage",codec:f,bitLength:12},{key:"vendorListVersion",codec:u,bitLength:12},{key:"tcfPolicyVersion",codec:u,bitLength:6},{key:"isServiceSpecific",codec:p,bitLength:1},{key:"useNonStandardStacks",codec:p,bitLength:1},{key:"specialFeatureOptins",codec:v,bitLength:12},{key:"purpose",children:[{key:"consents",codec:v,bitLength:24},{key:"legitimateInterests",codec:v,bitLength:24}]},{key:"purposeOneTreatment",codec:p,bitLength:1},{key:"publisherCC",codec:f,bitLength:12},{key:"vendor",children:[{key:"consents",codec:C},{key:"legitimateInterests",codec:C}]},{key:"numPubRestrictions",codec:u,bitLength:12}];var E=function(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},A=r(998);function O(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var P=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t,o;return n=e,o=[{key:"getUTCDay",value:function(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}}],(t=null)&&O(n.prototype,t),o&&O(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function I(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var L=function(){function e(n){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.version=2,this.created=P.getUTCDay(new Date),this.lastUpdated=this.created,this.cmpId=A.zq,this.cmpVersion=2,this.consentScreen=0,this.consentLanguage=n.consentLanguage,this.vendorListVersion=n.gvlVersion,this.tcfPolicyVersion=4,this.isServiceSpecific=!0,this.useNonStandardStacks=!1,this.specialFeatureOptins={},this.purpose={consents:{},legitimateInterests:A.hA},this.purposeOneTreatment=!0,this.publisherCC="US",this.vendor={consents:{},legitimateInterests:n.vendorsLegInterest},this.nonIABVendor={consents:{}},this.analyticsConsent=!0,this.numPubRestrictions=0}var n,t,o;return n=e,(t=[{key:"useConsentFrom",value:function(e){this.purpose=e.purpose,this.vendor=e.vendor,this.nonIABVendor=e.nonIABVendor,this.analyticsConsent=e.analyticsConsent}}])&&I(n.prototype,t),o&&I(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function T(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){N(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function N(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function U(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var j=function(){function t(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=this.loadConfiguration(),r.p=this.config.modulePath,this.acceptAllHandler=this.acceptAllHandler.bind(this),this.rejectAllHandler=this.rejectAllHandler.bind(this),this.saveHandler=this.saveHandler.bind(this),this.fetchGlobalVendorListHandler=this.fetchGlobalVendorListHandler.bind(this),this.closeHandler=this.closeHandler.bind(this),this.model={},this.listeners=[],this.eventStatus=A.d6.UI_SHOWN,this.displayStatus=A.Uq.VISIBLE,this.cmpStatus=A.j4.LOADED,this.init()}var i,u,l;return i=t,u=[{key:"init",value:function(){var e=this,n=E(A.B$),t=this.config.nonIABCookieName&&E(this.config.nonIABCookieName),r=this.config.analyticsConsentCookieName&&E(this.config.analyticsConsentCookieName);if(n?(this.model=S.deserialize(n),this.model.nonIABVendor={consents:t?C.decode(o.decode(t)).value:{}},this.model.analyticsConsent="0"!==r):this.model=new L(this.config),!n||this.config.nonIABCookieName&&!t||this.config.analyticsConsentCookieName&&!r){var i=function(){e.renderApp(A.pM.NOTICE),e.bumpStat("wordads_cmp_view","no_cookie")};"loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)}else if(this.config.consentMaxAgeDays&&this.model.lastUpdated.getTime()+864e5*this.config.consentMaxAgeDays<Date.now()){var u=function(){e.renderApp(A.pM.NOTICE),e.bumpStat("wordads_cmp_view","cookie_expired")};"loading"!==document.readyState?u():document.addEventListener("DOMContentLoaded",u)}else this.eventStatus=A.d6.LOADED,this.displayStatus=A.Uq.DISABLED;var l=window.__tcfapi("getQueue");window.__tcfapi=this.commandHandler.bind(this),l.forEach((function(n){window.__tcfapi.apply(e,n)}))}},{key:"loadConfiguration",value:function(){var e=JSON.parse(document.getElementById("cmp-configuration").innerText);return{gvlVersion:parseInt(e.gvlVersion),consentLanguage:e.consentLanguage,locale:e.locale,nonIABVendorsAll:e.nonIABVendorsAll&&C.decode(o.decode(e.nonIABVendorsAll)).value,vendorsAll:C.decode(o.decode(e.vendorsAll)).value,vendorsLegInterest:C.decode(o.decode(e.vendorsLegInterest)).value,ajaxNonce:e.ajaxNonce,ajaxUrl:e.ajaxUrl,modulePath:e.modulePath,gvlPath:e.gvlPath,noticeAsModal:e.noticeAsModal,skipConsentSave:e.skipConsentSave,generalSettingsEnabled:e.generalSettingsEnabled,manualClose:void 0!==e.manualClose&&e.manualClose,nonIABCookieName:e.nonIABCookieName,consentMaxAgeDays:parseInt(e.consentMaxAgeDays),analyticsConsentCookieName:e.analyticsConsentCookieName,colors:e.colors,_:e._}}},{key:"getAppContainer",value:function(){var e="cmp-app-container",n=document.getElementById(e);return n||((n=document.createElement("div")).id=e,document.body.appendChild(n),n)}},{key:"renderApp",value:function(t){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=(0,n.Vo)((function(){return r.e(143).then(r.bind(r,241))}));(0,e.sY)((0,e.h)(n.n4,null,(0,e.h)(i,{model:this.model,acceptAll:this.acceptAllHandler,rejectAll:this.rejectAllHandler,save:this.saveHandler,fetchGlobalVendorList:this.fetchGlobalVendorListHandler,path:this.config.modulePath,_:this.config._,mode:t,noticeAsModal:this.config.noticeAsModal,generalSettingsEnabled:this.config.generalSettingsEnabled,manualClose:this.config.manualClose,closable:o,closed:this.closeHandler,colorsConfig:this.config.colors})),this.getAppContainer())}},{key:"showUi",value:function(){this.displayStatus!==A.Uq.VISIBLE&&(this.renderApp(this.config.generalSettingsEnabled?A.pM.GENERAL_SETTINGS:A.pM.PURPOSE_SETTINGS,!0),this.bumpStat("wordads_cmp_view","cookie"),this.eventStatus=A.d6.UI_SHOWN,this.displayStatus=A.Uq.VISIBLE,this.notify())}},{key:"closeUi",value:function(){(0,e.sY)(null,this.getAppContainer())}},{key:"bumpStat",value:function(e,n){var t={};t["x_"+e]=n,window._stq=window._stq||[],window._stq.push(["extra",t])}},{key:"setConsentCookie",value:function(e){var n;if(!this.config.skipConsentSave){var t=new XMLHttpRequest;t.open("POST",this.config.ajaxUrl||"/wp-admin/admin-ajax.php",!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),(e=null!==(n=e)&&void 0!==n?n:{}).action="gdpr_set_consent",e.security=this.config.ajaxNonce,e.consent=S.serialize(this.model);var o=Object.keys(e).map((function(n){return n+"="+encodeURIComponent(e[n])})).join("&");t.send(o)}}},{key:"fetchGlobalVendorListHandler",value:function(){var e=this,n=new XMLHttpRequest;return new Promise((function(t,o){n.onreadystatechange=function(){4===n.readyState&&(200===this.status?t(JSON.parse(this.response)):o({status:n.status,statusText:n.statusText}))},n.open("GET",e.config.gvlPath,!0),n.send()}))}},{key:"acceptAllHandler",value:function(){this.model=new L(this.config),this.model.purpose={consents:A.a3,legitimateInterests:A.hA},this.model.vendor={consents:this.config.vendorsAll,legitimateInterests:this.config.vendorsLegInterest},this.model.nonIABVendor={consents:this.config.nonIABVendorsAll||{}},this.model.analyticsConsent=!0,this.eventStatus=A.d6.USER_ACTION_COMPLETE,this.displayStatus=A.Uq.HIDDEN,this.notify(),this.setConsentCookie({type:"accept_all"})}},{key:"rejectAllHandler",value:function(){this.model=new L(this.config),this.model.purpose={consents:{},legitimateInterests:A.hA},this.model.vendor={consents:{},legitimateInterests:this.config.vendorsLegInterest},this.model.nonIABVendor={consents:{}},this.model.analyticsConsent=!1,this.eventStatus=A.d6.USER_ACTION_COMPLETE,this.displayStatus=A.Uq.HIDDEN,this.notify(),this.setConsentCookie({type:"reject_all"})}},{key:"saveHandler",value:function(e){this.model=new L(this.config),this.model.useConsentFrom(e),this.eventStatus=A.d6.USER_ACTION_COMPLETE,this.displayStatus=A.Uq.HIDDEN,this.notify(),this.setConsentCookie({type:"custom"})}},{key:"closeHandler",value:function(){this.displayStatus=A.Uq.HIDDEN}},{key:"getTCData",value:function(){return{tcString:S.serialize(this.model),tcfPolicyVersion:this.model.tcfPolicyVersion,cmpId:this.model.cmpId,cmpVersion:this.model.cmpVersion,gdprApplies:!0,eventStatus:this.eventStatus,cmpStatus:this.cmpStatus,isServiceSpecific:this.model.isServiceSpecific,useNonStandardStacks:this.model.useNonStandardStacks,publisherCC:this.model.publisherCC,purposeOneTreatment:this.model.purposeOneTreatment,purpose:this.model.purpose,vendor:this.model.vendor,specialFeatureOptins:this.model.specialFeatureOptins}}},{key:"getNonIABVendorConsents",value:function(){return{gdprApplies:!0,nonIabVendorConsents:this.model.nonIABVendor.consents}}},{key:"getExtraConsents",value:function(){return{gdprApplies:!0,nonIabVendorConsents:this.model.nonIABVendor.consents,analyticsConsent:this.model.analyticsConsent}}},{key:"notify",value:function(){var e=this.getTCData();this.listeners.forEach((function(n){e.listenerId=n.listenerId,n.callback(e,!0)}))}},{key:"addListener",value:function(e){var n=Math.floor(999999*Math.random()),t={listenerId:n,callback:e};return this.listeners.push(t),n}},{key:"removeListener",value:function(e){this.listeners=this.listeners.filter((function(n){return n.listenerId!==e}))}},{key:"commandHandler",value:function(){var e=arguments.length<=0?void 0:arguments[0],n=arguments.length<=2?void 0:arguments[2],t=arguments.length<=3?void 0:arguments[3];if("ping"===e){var o={gdprApplies:!0,cmpLoaded:!0,cmpStatus:this.cmpStatus,displayStatus:this.displayStatus,apiVersion:"2",cmpVersion:this.model.cmpVersion,cmpId:this.model.cmpId,gvlVersion:this.model.vendorListVersion,tcfPolicyVersion:this.model.tcfPolicyVersion};"function"==typeof n&&n(o,!0)}else if("addEventListener"===e){var r=this.addListener(n);n(M(M({},this.getTCData()),{},{listenerId:r}),!0)}else"removeEventListener"===e?(this.removeListener(t),n(!0)):"getTCData"===e?"function"==typeof n&&n(this.getTCData(),!0):"getNonIABVendorConsents"===e?"function"==typeof n&&n(this.getNonIABVendorConsents(),!0):"getExtraConsents"===e?"function"==typeof n&&n(this.getExtraConsents(),!0):"showUi"===e||"displayConsentUi"===e?this.showUi():"closeUi"===e&&this.closeUi()}}],u&&U(i.prototype,u),l&&U(i,l),Object.defineProperty(i,"prototype",{writable:!1}),t}();new j}()}();;
!function(){var e=document.currentScript;function t(t){var n=document.createElement("script"),o=e||document.getElementsByTagName("script")[0];n.setAttribute("async",!0),n.setAttribute("src",t),o.parentNode.insertBefore(n,o)}function n(e,t){return Element.prototype.matches?e.matches(t):Element.prototype.msMatchesSelector?e.msMatchesSelector(t):void 0}function o(e,t){if(e.closest)return e.closest(t);var o=e;do{if(n(o,t))return o;o=o.parentElement||o.parentNode}while(null!==o&&1===o.nodeType);return null}function i(e,t){for(var n=0;n<e.length;n++)t(e[n],n,e)}var r=".sharing-hidden .inner",s="data-sharing-more-button-id";function a(e){this.button=e,this.pane=o(e,"div").querySelector(r),this.openedBy=null,this.recentlyOpenedByHover=!1,a.instances.push(this),this.pane.setAttribute(s,a.instances.length-1),this.attachHandlers()}if(a.instances=[],a.hoverOpenDelay=200,a.recentOpenDelay=400,a.hoverCloseDelay=300,a.instantiateOrReuse=function(e){var t=o(e,"div").querySelector(r),n=t&&t.getAttribute(s),i=a.instances[n];return i||new a(e)},a.getButtonInstanceFromPane=function(e){var t=e&&e.getAttribute(s);return a.instances[t]},a.closeAll=function(){for(var e=0;e<a.instances.length;e++)a.instances[e].close()},a.prototype.open=function(){var e,t,n=[0,0];function o(e){var t=e.getBoundingClientRect();return[t.left+(window.scrollX||window.pageXOffset||0),t.top+(window.scrollY||window.pageYOffset||0)]}function i(e,t){return parseInt(getComputedStyle(e).getPropertyValue(t)||0)}for(e=o(this.button),t=this.button.offsetParent||document.documentElement;t&&(t===document.body||t===document.documentElement)&&"static"===getComputedStyle(t).getPropertyValue("position");)t=t.parentNode;t&&t!==this.button&&1===t.nodeType&&(n=[(n=o(t))[0]+i(t,"border-left-width"),n[1]+i(t,"border-top-width")]);var r,s=e[0]-n[0]-i(this.button,"margin-left"),a=e[1]-n[1]-i(this.button,"margin-top");this.pane.style.left=s+"px",this.pane.style.top=a+this.button.offsetHeight+3+"px",(r=this.pane)&&r.style.removeProperty("display")},a.prototype.close=function(){var e;(e=this.pane)&&(e.style.display="none"),this.openedBy=null},a.prototype.toggle=function(){var e;(e=this.pane)&&"none"!==e.style.display?this.close():this.open()},a.prototype.nonHoverOpen=function(){clearTimeout(this.openTimer),clearTimeout(this.closeTimer),this.recentlyOpenedByHover?(this.recentlyOpenedByHover=!1,clearTimeout(this.hoverOpenTimer),this.open()):this.toggle()},a.prototype.resetCloseTimer=function(){clearTimeout(this.closeTimer),this.closeTimer=setTimeout(this.close.bind(this),a.hoverCloseDelay)},a.prototype.attachHandlers=function(){this.buttonClick=function(e){e.preventDefault(),e.stopPropagation(),this.openedBy="click",this.nonHoverOpen()}.bind(this),this.buttonKeydown=function(e){13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation(),this.openedBy="keydown",this.nonHoverOpen())}.bind(this),this.buttonEnter=function(){this.openedBy||(this.openTimer=setTimeout(function(){this.open(),this.openedBy="hover",this.recentlyOpenedByHover=!0,this.hoverOpenTimer=setTimeout(function(){this.recentlyOpenedByHover=!1}.bind(this),a.recentOpenDelay)}.bind(this),a.hoverOpenDelay)),clearTimeout(this.closeTimer)}.bind(this),this.buttonLeave=function(){"hover"===this.openedBy&&this.resetCloseTimer(),clearTimeout(this.openTimer)}.bind(this),this.paneEnter=function(){clearTimeout(this.closeTimer)}.bind(this),this.paneLeave=function(){"hover"===this.openedBy&&this.resetCloseTimer()}.bind(this),this.documentClick=function(){this.close()}.bind(this),this.button.addEventListener("click",this.buttonClick),this.button.addEventListener("keydown",this.buttonKeydown),document.addEventListener("click",this.documentClick),void 0===document.ontouchstart&&(this.button.addEventListener("mouseenter",this.buttonEnter),this.button.addEventListener("mouseleave",this.buttonLeave),this.pane.addEventListener("mouseenter",this.paneEnter),this.pane.addEventListener("mouseleave",this.paneLeave))},window.sharing_js_options&&window.sharing_js_options.counts){var c={done_urls:[],get_counts:function(){var e,n,o,i,r;if("undefined"!=typeof WPCOM_sharing_counts)for(e in WPCOM_sharing_counts)if(o=WPCOM_sharing_counts[e],void 0===c.done_urls[o]){for(i in n={pinterest:[window.location.protocol+"//api.pinterest.com/v1/urls/count.json?callback=WPCOMSharing.update_pinterest_count&url="+encodeURIComponent(e)]})if(document.querySelector("a[data-shared=sharing-"+i+"-"+o+"]")){for(;r=n[i].pop();)t(r);window.sharing_js_options.is_stats_active&&c.bump_sharing_count_stat(i)}c.done_urls[o]=!0}},update_pinterest_count:function(e){void 0!==e.count&&1*e.count>0&&c.inject_share_count("sharing-pinterest-"+WPCOM_sharing_counts[e.url],e.count)},inject_share_count:function(e,t){i(document.querySelectorAll("a[data-shared="+e+"] > span"),(function(e){var n,o=e.querySelector(".share-count");(n=o)&&n.parentNode&&n.parentNode.removeChild(n);var i=document.createElement("span");i.className="share-count",i.textContent=c.format_count(t),e.appendChild(i)}))},format_count:function(e){return e<1e3?e:e>=1e3&&e<1e4?String(e).substring(0,1)+"K+":"10K+"},bump_sharing_count_stat:function(e){(new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv&x_sharing-count-request="+e+"&r="+Math.random()}};window.WPCOMSharing=c}function u(e,t){e.setAttribute("jetpack-share-click-count",t)}function d(e){var t=e.getAttribute("jetpack-share-click-count");return null===t?0:parseInt(t,10)}function l(e,t){var n,o=new XMLHttpRequest;o.open("POST",e,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.setRequestHeader("x-requested-with","XMLHttpRequest"),o.send((n=t,(encodeURIComponent("email-share-nonce")+"="+encodeURIComponent(n)).replace(/%20/g,"+")))}function h(){p()}function p(){window.WPCOMSharing&&window.WPCOMSharing.get_counts(),i(document.querySelectorAll(".sharedaddy a"),(function(e){var t=e.getAttribute("href");t&&-1!==t.indexOf("share=")&&-1===t.indexOf("&nb=1")&&e.setAttribute("href",t+"&nb=1")})),i(document.querySelectorAll(".sharedaddy a.sharing-anchor"),(function(e){a.instantiateOrReuse(e)})),void 0!==document.ontouchstart&&document.body.classList.add("jp-sharing-input-touch"),i(document.querySelectorAll(".sharedaddy ul"),(function(e){"true"!==e.getAttribute("data-sharing-events-added")&&(e.setAttribute("data-sharing-events-added","true"),i(e.querySelectorAll("a.share-print"),(function(e){e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var n=e.getAttribute("href")||"",i=function(){if(-1===n.indexOf("#print")){var e=(new Date).getTime();t=e,o=n,(i=document.createElement("iframe")).setAttribute("style","position:fixed; top:100; left:100; height:1px; width:1px; border:none;"),i.setAttribute("id","printFrame-"+t),i.setAttribute("name",i.getAttribute("id")),i.setAttribute("src",o),i.setAttribute("onload",'frames["printFrame-'+t+'"].focus();frames["printFrame-'+t+'"].print();'),document.body.appendChild(i)}else window.print();var t,o,i},s=o(e,r);if(s){var c=a.getButtonInstanceFromPane(s);c&&(c.close(),i())}else i()}))})),i(e.querySelectorAll("a.share-press-this"),(function(e){e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var n="";if(window.getSelection?n=window.getSelection():document.getSelection?n=document.getSelection():document.selection&&(n=document.selection.createRange().text),n){var o=e.getAttribute("href");e.setAttribute("href",o+"&sel="+encodeURI(n))}window.open(e.getAttribute("href"),"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570")||(document.location.href=e.getAttribute("href"))}))})),i(e.querySelectorAll("a.share-email"),(function(t){u(t,0);var n,o,r=t.getAttribute("data-email-share-nonce"),s=t.getAttribute("data-email-share-track-url");r&&s&&(n=s,o=window.location.protocol+"//"+window.location.hostname+"/",0===String(n).indexOf(o))&&t.addEventListener("click",(function(){var n;u(n=t,d(n)+1),d(t)>2&&function(e,t){var n=t.parentElement;if(n.classList.contains("sd-content")){i(n.querySelectorAll(".share-email-error"),(function(e){e.parentElement.removeChild(e)}));var o=document.createElement("div");o.className="share-email-error";var r=document.createElement("h6");r.className="share-email-error-title",r.innerText=e.getAttribute("data-email-share-error-title"),o.appendChild(r);var s=document.createElement("p");s.className="share-email-error-text",s.innerText=e.getAttribute("data-email-share-error-text"),o.appendChild(s),n.appendChild(o)}}(t,e),l(s,r)}))})))})),i(document.querySelectorAll("li.share-email, li.share-custom a.sharing-anchor"),(function(e){e.classList.add("share-service-visible")}))}"loading"!==document.readyState?h():document.addEventListener("DOMContentLoaded",h),document.body.addEventListener("is.post-load",p)}();;
