/*! For license information please see index.js.LICENSE.txt */ this.wc=this.wc||{},this.wc.explat=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=463)}({266:function(e,t,r){"use strict";t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},i=t||{},a=e.split(o),c=i.decode||n,l=0;l0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1)throw new Error("Received multiple experiment assignments while trying to fetch exactly one.");if(0===g.length)return[2,u(t,v)];if((w=g[0]).experimentName!==t)throw new Error("Newly fetched ExperimentAssignment's experiment name does not match request.");if(!l(w))throw new Error("Newly fetched experiment isn't alive.");return[2,w]}var E}))}))}var v=function(e){return"explat-experiment--"+e};function g(e){d(e);var t=w(e.experimentName);if(t&&e.retrievedTimestamp{const t=e=>{0};try{const{message:n,...i}=e,o={message:n,properties:{...i,context:"explat",explat_client:"woocommerce"}};{var r;if(null===(r=window.wcTracks)||void 0===r||!r.isEnabled)throw new Error("Tracking is disabled, can't send error to the server");const e=new window.FormData;e.append("error",JSON.stringify(o)),window.fetch("https://public-api.wordpress.com/rest/v1.1/js-error",{method:"POST",body:e}).catch(t)}}catch(e){t()}};var S=r(32);var N=r(266),A=r.n(N);let T=null;const P=async()=>{let e=0;return T=new Promise(t=>{const r=()=>{const n=A.a.parse(document.cookie).tk_ai||null;"string"!=typeof n||""===n?99<=e?t(null):(e+=1,setTimeout(r,50)):t(n)};r()}),T},k=()=>{var e;null!==(e=window.wcTracks)&&void 0!==e&&e.isEnabled&&P().catch(e=>j({message:e.message}))};k();const D=b({fetchExperimentAssignment:async({experimentName:e,anonId:t})=>{var r,n,i,o,a,s,c,l;if(null===(r=window.wcTracks)||void 0===r||!r.isEnabled)throw new Error("Tracking is disabled, can't fetch experimentAssignment");const u=Object(S.stringify)({experiment_name:e,anon_id:null!=t?t:void 0,woo_country_code:(null===(n=window.wcSettings)||void 0===n||null===(i=n.preloadSettings)||void 0===i||null===(o=i.general)||void 0===o?void 0:o.woocommerce_default_country)||(null===(a=window.wcSettings)||void 0===a||null===(s=a.admin)||void 0===s||null===(c=s.preloadSettings)||void 0===c||null===(l=c.general)||void 0===l?void 0:l.woocommerce_default_country)}),f=await window.fetch("https://public-api.wordpress.com/wpcom/v2/experiments/0.1.0/assignments/woocommerce?"+u);return await f.json()},getAnonId:async()=>{var e;return null!==(e=window.wcTracks)&&void 0!==e&&e.isEnabled?await T:null},logError:j,isDevelopmentMode:!1}),{loadExperimentAssignment:_,dangerouslyGetExperimentAssignment:I}=D,C=(R=D,{useExperiment:F=function(e,t){void 0===t&&(t={});var r=i(i({},O),t),n=Object(x.useState)(e)[0],o=Object(x.useState)([!0,null]),a=o[0],s=o[1];return Object(x.useEffect)((function(){var t=!0;return r.isEligible&&R.loadExperimentAssignment(e).then((function(e){t&&s([!1,e])})),function(){t=!1}}),[e,r.isEligible]),e===n||n.startsWith("explat_test")||R.config.logError({message:"[ExPlat] useExperiment: experimentName should never change between renders!"}),r.isEligible?a:[!1,null]},Experiment:function(e){var t=e.defaultExperience,r=e.treatmentExperience,n=e.loadingExperience,i=e.name,o=e.options,a=F(i,o),s=a[0],c=a[1];return s?E.a.createElement(E.a.Fragment,null,n):(null==c?void 0:c.variationName)?E.a.createElement(E.a.Fragment,null,r):E.a.createElement(E.a.Fragment,null,t)},ProvideExperimentData:function(e){var t=e.children,r=e.name,n=e.options,i=F(r,n);return t(i[0],i[1])}});var R,F;const{useExperiment:L,Experiment:M,ProvideExperimentData:H}=C},49:function(e,t,r){"use strict";var n=r(39),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===n.RFC1738&&(40===u||41===u)?c+=s.charAt(l):u<128?c+=a[u]:u<2048?c+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?c+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(l)),c+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n0?b.join(",")||null:void 0}];else if(s(u))x=u;else{var O=Object.keys(b);x=f?O.sort(f):O}for(var j=0;j0?g+v:""}},68:function(e,t,r){"use strict";var n=r(49),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),l=s?o.slice(0,s.index):o,u=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;r.depth>0&&null!==(s=a.exec(o))&&f=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);r.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:a[l]=i:a={0:i}}i=a}return i}(u,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=u.split(t.delimiter,f),d=-1,m=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(h=o(h)?[h]:h),i.call(l,y)?l[y]=n.combine(l[y],h):l[y]=h}return l}(e,r):e,f=r.plainObjects?Object.create(null):{},p=Object.keys(u),d=0;d