(function() { window.addEventListener('error', (event) => { const isCheckoutInit = window.zigzag; if (isCheckoutInit || typeof ZigzagPosthogScript === 'undefined' || !event) { return; } const urls = ["worldshopping.jp","worldshopping.global"]; if (event.filename && urls.find((u) => event.filename.includes(u))) { ZigzagPosthogScript.capture('script_error', { src: event.filename, error: event.message || '' }); } }); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof zigzag_define&&zigzag_define.amd?zigzag_define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ZigzagPosthogScript={})}(this,(function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var v=String.fromCharCode,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",b={};function w(e,t){if(!b[e]){b[e]={};for(var n=0;n>>8,n[2*r+1]=o%256}return n},decompressFromUint8Array:function(e){if(null==e)return k.decompress(e);for(var t=new Array(e.length/2),n=0,r=t.length;n>=1}else{for(i=1,r=0;r>=1}0==--u&&(u=Math.pow(2,d),d++),delete _[c]}else for(i=h[c],r=0;r>=1;0==--u&&(u=Math.pow(2,d),d++),h[a]=l++,c=String(s)}if(""!==c){if(Object.prototype.hasOwnProperty.call(_,c)){if(c.charCodeAt(0)<256){for(r=0;r>=1}else{for(i=1,r=0;r>=1}0==--u&&(u=Math.pow(2,d),d++),delete _[c]}else for(i=h[c],r=0;r>=1;0==--u&&(u=Math.pow(2,d),d++)}for(i=2,r=0;r>=1;for(;;){if(p<<=1,f==t-1){g.push(n(p));break}f++}return g.join("")},decompress:function(e){return null==e?"":""==e?null:k._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(e,t,n){var r,i,o,s,a,c,u,l=[],d=[],p={val:n(0),position:t,index:1},f=4,h=4,_=3,g="";for(r=0;r<3;r+=1)l[r]=r;for(o=0,a=Math.pow(2,2),c=1;c!=a;)s=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(s>0?1:0)*c,c<<=1;switch(o){case 0:for(o=0,a=Math.pow(2,8),c=1;c!=a;)s=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(s>0?1:0)*c,c<<=1;u=v(o);break;case 1:for(o=0,a=Math.pow(2,16),c=1;c!=a;)s=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(s>0?1:0)*c,c<<=1;u=v(o);break;case 2:return""}for(l[3]=u,i=u,d.push(u);;){if(p.index>e)return"";for(o=0,a=Math.pow(2,_),c=1;c!=a;)s=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(s>0?1:0)*c,c<<=1;switch(u=o){case 0:for(o=0,a=Math.pow(2,8),c=1;c!=a;)s=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(s>0?1:0)*c,c<<=1;l[h++]=v(o),u=h-1,f--;break;case 1:for(o=0,a=Math.pow(2,16),c=1;c!=a;)s=p.val&p.position,p.position>>=1,0==p.position&&(p.position=t,p.val=n(p.index++)),o|=(s>0?1:0)*c,c<<=1;l[h++]=v(o),u=h-1,f--;break;case 2:return d.join("")}if(0==f&&(f=Math.pow(2,_),_++),l[u])g=l[u];else{if(u!==h)return null;g=i+i.charAt(0)}d.push(g),l[h++]=i+g.charAt(0),i=g,0==--f&&(f=Math.pow(2,_),_++)}}},S={DEBUG:!1,LIB_VERSION:"1.51.5"},F=Array.prototype,I=Object.prototype,O=I.toString,E=I.hasOwnProperty,P="undefined"!=typeof window?window:{},A=P.navigator||{userAgent:""},x=P.document||{},C=A.userAgent,T=F.forEach,R=F.indexOf,$=Array.isArray,M={},j=function(){if(S.DEBUG&&!Q(window.console)&&window.console){for(var e=("__rrweb_original__"in window.console.log?window.console.log.__rrweb_original__:window.console.log),t=arguments.length,n=new Array(t),r=0;r1?t-1:0),r=1;r0&&(t[n]=e)})),t},ee=["$performance_raw"];function te(e,t){return n=e,r=function(e,n){return n&&ee.indexOf(n)>-1?e:"string"==typeof e&&null!==t?e.slice(0,t):e},i=new Set,function e(t,n){return t!==Object(t)?r?r(t,n):t:i.has(t)?void 0:(i.add(t),U(t)?(o=[],B(t,(function(t){o.push(e(t))}))):(o={},L(t,(function(t,n){i.has(t)||(o[n]=e(t,n))}))),o);var o}(n);var n,r,i}function ne(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,u="",l=[];if(!e)return e;e=ie(e);do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,l[c++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(n>t&&(o+=e.substring(t,n)),o+=a,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},oe=(re=function(){for(var e=(new Date).valueOf(),t=0;e==(new Date).valueOf();)t++;return e.toString(16)+t.toString(16)},function(){var e="undefined"!=typeof window?(window.screen.height*window.screen.width).toString(16):"0";return re()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=C,r=0,i=[];function o(e,t){var n,r=0;for(n=0;n=4&&(r=o(r,i),i=[]);return i.length>0&&(r=o(r,i)),r.toString(16)}()+"-"+e+"-"+re()}),se=function(e,t){var n=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),r=new RegExp("[\\?&]"+n+"=([^&#]*)").exec(e);if(null===r||r&&"string"!=typeof r[1]&&r[1].length)return"";var i=r[1];try{i=decodeURIComponent(i)}catch(o){q("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")},ae=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},ce=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,o){if(t)if(t.addEventListener&&!i)t.addEventListener(n,r,!!o);else{var s="on"+n,a=t[s];t[s]=(c=t,u=r,l=a,function(t){if(t=t||e(window.event)){var n,r=!0;V(l)&&(n=l(t));var i=u.call(c,t);return!1!==n&&!1!==i||(r=!1),r}})}else q("No valid element provided to register_event");var c,u,l}}(),ue={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid msclkid".split(" "),t={};return L(e,(function(e){var n=se(x.URL,e);n.length&&(t[e]=n)})),t},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=ue.searchEngine(e),n="yahoo"!=t?"q":"p",r={};if(null!==t){r.$search_engine=t;var i=se(e,n);i.length&&(r.ph_keyword=i)}return r},browser:function(e,t,n){return t=t||"",n||W(e," OPR/")?W(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":W(e,"IEMobile")||W(e,"WPDesktop")?"Internet Explorer Mobile":W(e,"SamsungBrowser/")?"Samsung Internet":W(e,"Edge")||W(e,"Edg/")?"Microsoft Edge":W(e,"FBIOS")?"Facebook Mobile":W(e,"Chrome")?"Chrome":W(e,"CriOS")?"Chrome iOS":W(e,"UCWEB")||W(e,"UCBrowser")?"UC Browser":W(e,"FxiOS")?"Firefox iOS":W(t,"Apple")?W(e,"Mobile")?"Mobile Safari":"Safari":W(e,"Android")?"Android Mobile":W(e,"Konqueror")?"Konqueror":W(e,"Firefox")?"Firefox":W(e,"MSIE")||W(e,"Trident/")?"Internet Explorer":W(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[ue.browser(e,t,n)];if(void 0===r)return null;var i=e.match(r);return i?parseFloat(i[i.length-2]):null},browserLanguage:function(){return A.language||A.userLanguage},os:function(){var e=C;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return"iPad"===t||"Android Tablet"===t?"Tablet":t?"Mobile":"Desktop"},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},properties:function(){return H(K({$os:ue.os(),$browser:ue.browser(C,A.vendor,P.opera),$device:ue.device(C),$device_type:ue.deviceType(C)}),{$current_url:null==P?void 0:P.location.href,$host:null==P?void 0:P.location.host,$pathname:null==P?void 0:P.location.pathname,$browser_version:ue.browserVersion(C,A.vendor,P.opera),$browser_language:ue.browserLanguage(),$screen_height:null==P?void 0:P.screen.height,$screen_width:null==P?void 0:P.screen.width,$viewport_height:null==P?void 0:P.innerHeight,$viewport_width:null==P?void 0:P.innerWidth,$lib:"web",$lib_version:S.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){return H(K({$os:ue.os(),$browser:ue.browser(C,A.vendor,P.opera)}),{$browser_version:ue.browserVersion(C,A.vendor,P.opera)})}};function le(e){switch(r(e.className)){case"string":return e.className;case"object":return("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";default:return""}}function de(e){var t="";return ve(e)&&!ye(e)&&e.childNodes&&e.childNodes.length&&L(e.childNodes,(function(e){he(e)&&e.textContent&&(t+=N(e.textContent).split(/(\s+)/).filter(me).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))})),N(t)}function pe(e){return!!e&&1===e.nodeType}function fe(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function he(e){return!!e&&3===e.nodeType}function _e(e){return!!e&&11===e.nodeType}var ge=["a","button","form","input","select","textarea","label"];function ve(e){for(var t=e;t.parentNode&&!fe(t,"body");t=t.parentNode){var n=le(t).split(" ");if(W(n,"ph-sensitive")||W(n,"ph-no-capture"))return!1}if(W(le(e).split(" "),"ph-include"))return!0;var r=e.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return"string"!=typeof i||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function ye(e){return!!(fe(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||fe(e,"select")||fe(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function me(e){if(null===e||Q(e))return!1;if("string"==typeof e){if(e=N(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}function be(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=t;var r,i=document.querySelectorAll("body > script");i.length>0?null===(r=i[0].parentNode)||void 0===r||r.insertBefore(n,i[0]):document.body.appendChild(n)}function we(e){var t=de(e);return me(t="".concat(t," ").concat(ke(e)).trim())?t:""}function ke(e){var t="";return e&&e.childNodes&&e.childNodes.length&&L(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=de(e);t="".concat(t," ").concat(r).trim(),e.childNodes&&e.childNodes.length&&(t="".concat(t," ").concat(ke(e)).trim())}catch(i){console.error(i)}})),t}var Se=function(){function e(t){i(this,e),this.clicks=[],this.enabled=t}return s(e,[{key:"isRageClick",value:function(e,t,n){if(!this.enabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&n-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:n}),3===this.clicks.length)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}]),e}(),Fe=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Ie={is_supported:function(){return!0},error:function(e){q("cookieStore error: "+e)},get:function(e){try{for(var t=e+"=",n=document.cookie.split(";"),r=0;r-1&&!n&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?i.$el_text=we(e):i.$el_text=de(e));var o=le(e);o.length>0&&(i.classes=o.split(" ").filter((function(e){return""!==e}))),L(e.attributes,(function(n){var r;ye(e)&&-1===["name","id","class"].indexOf(n.name)||!t&&me(n.value)&&("string"!=typeof(r=n.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))&&(i["attr__"+n.name]=n.value)}));for(var s=1,a=1,c=e;c=this._previousElementSibling(c);)s++,c.tagName===e.tagName&&a++;return i.nth_child=s,i.nth_of_type=a,i},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return L(document.querySelectorAll(e.css_selector),(function(e){var n;["input","select"].indexOf(e.tagName.toLowerCase())>-1?n=e.value:e.textContent&&(n=e.textContent),me(n)&&t.push(n)})),t.join(", ")},_getCustomProperties:function(e){var t=this,n={};return L(this._customProperties,(function(r){L(r.event_selectors,(function(i){L(document.querySelectorAll(i),(function(i){W(e,i)&&ve(i)&&(n[r.name]=t._extractCustomPropertyValue(r))}))}))})),n},_getEventTarget:function(e){return void 0===e.target?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t},_captureEvent:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$autocapture",o=this._getEventTarget(e);if(he(o)&&(o=o.parentNode||null),"$autocapture"===i&&"click"===e.type&&e instanceof MouseEvent&&null!==(n=this.rageclicks)&&void 0!==n&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._captureEvent(e,t,"$rageclick"),o&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e||fe(e,"html")||!pe(e))return!1;if(null!=n&&n.url_allowlist){var r=window.location.href,i=n.url_allowlist;if(i&&!i.some((function(e){return r.match(e)})))return!1}if(null!=n&&n.dom_event_allowlist){var o=n.dom_event_allowlist;if(o&&!o.some((function(e){return t.type===e})))return!1}if(null!=n&&n.element_allowlist){var s=n.element_allowlist;if(s&&!s.some((function(t){return e.tagName.toLowerCase()===t})))return!1}if(null!=n&&n.css_selector_allowlist){var a=n.css_selector_allowlist;if(a&&!a.some((function(t){return e.matches(t)})))return!1}for(var c=!1,u=[e],l=!0,d=e;d.parentNode&&!fe(d,"body");)if(_e(d.parentNode))u.push(d.parentNode.host),d=d.parentNode.host;else{if(!(l=d.parentNode||!1))break;if(ge.indexOf(l.tagName.toLowerCase())>-1)c=!0;else{var p=window.getComputedStyle(l);p&&"pointer"===p.getPropertyValue("cursor")&&(c=!0)}u.push(l),d=l}var f=window.getComputedStyle(e);if(f&&"pointer"===f.getPropertyValue("cursor")&&"click"===t.type)return!0;var h=e.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return"submit"===t.type;case"input":case"select":case"textarea":return"change"===t.type||"click"===t.type;default:return c?"click"===t.type:"click"===t.type&&(ge.indexOf(h)>-1||"true"===e.getAttribute("contenteditable"))}}(o,e,this.config)){for(var s=[o],a=o;a.parentNode&&!fe(a,"body");)_e(a.parentNode)?(s.push(a.parentNode.host),a=a.parentNode.host):(s.push(a.parentNode),a=a.parentNode);var c,u=[],l={},d=!1;if(L(s,(function(e){var n=ve(e);"a"===e.tagName.toLowerCase()&&(c=e.getAttribute("href"),c=n&&me(c)&&c),W(le(e).split(" "),"ph-no-capture")&&(d=!0),u.push(r._getPropertiesFromElement(e,t.get_config("mask_all_element_attributes"),t.get_config("mask_all_text")));var i=r._getAugmentPropertiesFromElement(e);H(l,i)})),t.get_config("mask_all_text")||("a"===o.tagName.toLowerCase()||"button"===o.tagName.toLowerCase()?u[0].$el_text=we(o):u[0].$el_text=de(o)),c&&(u[0].attr__href=c),d)return!1;var p=H(this._getDefaultProperties(e.type),{$elements:u},this._getCustomProperties(s),l);return t.capture(i,p),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=this,n=function(n){n=n||window.event,t._captureEvent(n,e)};ce(document,"submit",n,!1,!0),ce(document,"change",n,!1,!0),ce(document,"click",n,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(e){var t;"boolean"!=typeof e.__autocapture&&(this.config=e.__autocapture),null!==(t=this.config)&&void 0!==t&&t.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map((function(e){return new RegExp(e)}))),this.rageclicks=new Se(e.get_config("rageclick"))},afterDecideResponse:function(e,t){this._setIsAutocaptureEnabled(t);var n=t.get_config("token");this._initializedTokens.indexOf(n)>-1?j('autocapture already initialized for token "'+n+'"'):(t.persistence&&t.persistence.register(a({},je,!!e.autocapture_opt_out)),this._initializedTokens.push(n),e&&e.config&&e.config.enable_collect_everything&&this._isAutocaptureEnabled?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture=!1)},enabledForProject:function(e,t,n){if(!e)return!0;t=Q(t)?10:t,n=Q(n)?10:n;for(var r=0,i=0;i1&&void 0!==arguments[1]?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time."),!1;var n=this.getFlagVariants()[e];return!t.send_event&&"send_event"in t||this.flagCallReported[e]||(this.flagCallReported[e]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(e,t):(console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((function(t){return t!==e}))}},{key:"receivedFeatureFlags",value:function(e){this.instance.decideEndpointWasHit=!0;var t=this.getFlagVariants(),r=this.getFlagPayloads();!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.featureFlags,s=e.featureFlagPayloads;if(o)if(Array.isArray(o)){var c,u={};if(o)for(var l=0;l10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var t=[],n=0;n2e3?t.push(e.data.payload.payload[n].slice(0,2e3)+"...[truncated]"):t.push(e.data.payload.payload[n]);return e.data.payload.payload=t,e}return e}(function(e){if(e&&"object"===r(e)){var t=JSON.stringify(e);if(t.length>5e6){var n,i=g(t.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(i.s();!(n=i.n()).done;){var o=n.value;t="image/"===o[1].toLocaleLowerCase().slice(0,6)?t.replace(o[0],"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg=="):t.replace(o[0],"")}}catch(s){i.e(s)}finally{i.f()}}return JSON.parse(t)}return e}(t)),e._updateWindowAndSessionIds(t);var n={$snapshot_data:t,$session_id:e.sessionId,$window_id:e.windowId};e.instance._captureMetrics.incr("rrweb-record"),e.instance._captureMetrics.incr("rrweb-record-".concat(t.type)),e.emit?e._captureSnapshot(n):e.snapshots.push(n)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled()?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},t)),this.instance._addCaptureHook((function(t){try{var n;"$pageview"===t&&(null===(n=e.rrwebRecord)||void 0===n||n.addCustomEvent("$pageview",{href:window.location.href}))}catch(r){q("Could not add $pageview to rrweb session",r)}}))):q("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:e.$snapshot_data.type===dt}})}}]),e}(),ht={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},_t=["first-input","navigation","paint","resource"],gt=["/s/","/e/"],vt=function(){function e(t){i(this,e),this.instance=t}return s(e,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e=this;if(!this.observer)try{this.observer=new PerformanceObserver((function(t){t.getEntries().forEach((function(t){e._capturePerformanceEvent(t)}))})),PerformanceObserver.supportedEntryTypes.filter((function(e){return _t.includes(e)})).forEach((function(t){var n;null===(n=e.observer)||void 0===n||n.observe({type:t,buffered:!0})}))}catch(t){console.error("PostHog failed to start performance observer",t),this.stopObserving()}}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var e,t;return null!==(e=null!==(t=this.instance.get_config("capture_performance"))&&void 0!==t?t:this.remoteEnabled)&&void 0!==e&&e}},{key:"afterDecideResponse",value:function(e){this.remoteEnabled=e.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(e){if(e.name.startsWith(this.instance.get_config("api_host"))){var t=e.name.replace(this.instance.get_config("api_host"),"");if(gt.find((function(e){return t.startsWith(e)})))return}var n=e.toJSON(),r={},i=Math.floor(Date.now()-performance.now());for(var o in r[ht.timeOrigin]=i,r[ht.timestamp]=Math.floor(i+e.startTime),ht)void 0!==n[o]&&(r[ht[o]]=n[o]);if(this.capturePerformanceEvent(r),yt(e)){var s,c=g(e.serverTiming||[]);try{for(c.s();!(s=c.n()).done;){var u,l=s.value;this.capturePerformanceEvent((a(u={},ht.timeOrigin,i),a(u,ht.timestamp,Math.floor(i+e.startTime)),a(u,ht.name,l.name),a(u,ht.duration,l.duration),a(u,ht.entryType,"serverTiming"),u))}}catch(d){c.e(d)}finally{c.f()}}}},{key:"capturePerformanceEvent",value:function(e){this.instance.capture("$performance_event",e,{transport:"XHR",method:"POST",endpoint:"/e/",_noTruncate:!0,_batchKey:"performanceEvent"})}}]),e}(),yt=function(e){return"navigation"===e.entryType||"resource"===e.entryType},mt=function(){function e(t){i(this,e),this.instance=t,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return s(e,[{key:"call",value:function(){var e=this,t=ne(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:t,verbose:!0},{method:"POST"},(function(t){return e.parseDecideResponse(t)}))}},{key:"parseDecideResponse",value:function(e){var t,n,r=this;if(0!==(null==e?void 0:e.status)){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){r.parseDecideResponse(e)}),500);if(this.instance.toolbar.afterDecideResponse(e),null===(t=this.instance.sessionRecording)||void 0===t||t.afterDecideResponse(e),We.afterDecideResponse(e,this.instance),null===(n=this.instance.webPerformance)||void 0===n||n.afterDecideResponse(e),this.instance.featureFlags.receivedFeatureFlags(e),this.instance.compression={},e.supportedCompression&&!this.instance.get_config("disable_compression")){var i,o={},s=g(e.supportedCompression);try{for(s.s();!(i=s.n()).done;)o[i.value]=!0}catch(d){s.e(d)}finally{s.f()}this.instance.compression=o}if(e.siteApps)if(this.instance.get_config("opt_in_site_apps")){var a,c=this.instance.get_config("api_host"),u=g(e.siteApps);try{var l=function(){var e=a.value,t=e.id,n=e.url,i=document.createElement("script");i.src=[c,"/"===c[c.length-1]&&"/"===n[0]?n.substring(1):n].join(""),i.onerror=function(e){console.error("Error while initializing PostHog app with config id ".concat(t),e)},window["__$$ph_site_app_".concat(t)]=r.instance,document.body.appendChild(i)};for(u.s();!(a=u.n()).done;)l()}catch(d){u.e(d)}finally{u.f()}}else e.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),e}(),bt=["https://app.posthog.com","https://eu.posthog.com"],wt=["source"],kt=function(){function e(t){i(this,e),this.instance=t}return s(e,[{key:"afterDecideResponse",value:function(e){var t=e.toolbarParams||e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&t.toolbarVersion&&0===t.toolbarVersion.indexOf("toolbar")&&this.loadToolbar(n(n({},t),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;try{if(!t){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch(s){return!1}t=window.localStorage}var r,i=ae(e.hash,"__posthog")||ae(e.hash,"state"),o=i?JSON.parse(decodeURIComponent(i)):null;return o&&"ph_authorize"===o.action?((r=o).source="url",r&&Object.keys(r).length>0&&(o.desiredHash?e.hash=o.desiredHash:n?n.replaceState("",document.title,e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete r.userIntent),r.apiURL||(r.apiURL=this.instance.get_config("api_host")),!(!r.token||this.instance.get_config("token")!==r.token||(this.loadToolbar(r),0))}catch(s){return!1}}},{key:"loadToolbar",value:function(e){var t=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var r=(null==e?void 0:e.apiURL)||this.instance.get_config("api_host"),i=3e4*Math.floor(Date.now()/3e4),o="".concat(r).concat(r.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(i),s=!bt.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),a=n(n({apiURL:r,jsURL:r,token:this.instance.get_config("token")},e),s?{instrument:!1}:{});a.source;var c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(a,wt);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(c)),be(o,(function(){(window.ph_load_toolbar||window.ph_load_editor)(a,t.instance)})),ce(window,"turbolinks:load",(function(){window._postHogToolbarLoaded=!1,t.loadToolbar(a)})),!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;return this.maybeLoadToolbar(e,t,n)}}]),e}(),St=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;i(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=t}return s(e,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return(new Date).getTime()}}]),e}(),Ft=function(e){c(r,St);var t=d(r);function r(e,n){var o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;return i(this,r),(o=t.call(this,s)).handlePollRequest=n,o.captureMetrics=e,o}return s(r,[{key:"enqueue",value:function(e,t,n){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:e,data:t,options:n}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;clearTimeout(this._poller),this._poller=setTimeout((function(){if(e._event_queue.length>0){var t=e.formatQueue(),n=function(n){var r=t[n],i=r.url,o=r.data,s=r.options;L(o,(function(t,n){o[n].offset=Math.abs(o[n].timestamp-e.getTime()),delete o[n].timestamp})),e.handlePollRequest(i,o,s),e.captureMetrics.incr("batch-requests"),e.captureMetrics.incr("batch-requests-".concat(i.slice(i.length-2))),e.captureMetrics.incr("batch-handle",o.length),e.captureMetrics.incr("batch-handle-".concat(i.slice(i.length-2)),o.length)};for(var r in t)n(r);e._event_queue.length=0,e._empty_queue_count=0}else e._empty_queue_count++;e._empty_queue_count>4&&(e.isPolling=!1,e._empty_queue_count=0),e.isPolling&&e.poll()}),this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var e=this.formatQueue();for(var t in e){var n=e[t],r=n.url,i=n.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(r.slice(r.length-2))),this.captureMetrics.incr("batch-unload",i.length),this.captureMetrics.incr("batch-unload-".concat(r.slice(r.length-2)),i.length)}}},{key:"unload",value:function(){var e=this;clearTimeout(this._poller);var t=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var r=Object.values(t);[].concat(f(r.filter((function(e){return 0===e.url.indexOf("/e")}))),f(r.filter((function(e){return 0!==e.url.indexOf("/e")})))).map((function(t){var r=t.url,i=t.data,o=t.options;e.handlePollRequest(r,i,n(n({},o),{},{transport:"sendBeacon"}))}))}},{key:"formatQueue",value:function(){var e={};return L(this._event_queue,(function(t){var n=t.url,r=t.data,i=t.options,o=(i?i._batchKey:null)||n;void 0===e[o]&&(e[o]={data:[],url:n,options:i}),i&&e[o].options&&e[o].options._metrics&&!e[o].options._metrics.rrweb_full_snapshot&&(e[o].options._metrics.rrweb_full_snapshot=i._metrics.rrweb_full_snapshot),e[o].data.push(r)})),e}}]),r}(),It=function(){function e(t){i(this,e),this.enabled=t,this.metrics={}}return s(e,[{key:"incr",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)+t)}},{key:"decr",value:function(e){this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)-1)}}]),e}(),Ot=Uint8Array,Et=Uint16Array,Pt=Uint32Array,At=new Ot([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),xt=new Ot([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ct=new Ot([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Tt=function(e,t){for(var n=new Et(31),r=0;r<31;++r)n[r]=t+=1<>>1|(21845&Dt)<<1;Nt=(61680&(Nt=(52428&Nt)>>>2|(13107&Nt)<<2))>>>4|(3855&Nt)<<4,qt[Dt]=((65280&Nt)>>>8|(255&Nt)<<8)>>>1}var Lt=function(e,t,n){for(var r=e.length,i=0,o=new Et(t);i>>c]=u}else for(s=new Et(r),i=0;i>>15-e[i];return s},Bt=new Ot(288);for(Dt=0;Dt<144;++Dt)Bt[Dt]=8;for(Dt=144;Dt<256;++Dt)Bt[Dt]=9;for(Dt=256;Dt<280;++Dt)Bt[Dt]=7;for(Dt=280;Dt<288;++Dt)Bt[Dt]=8;var Ht=new Ot(32);for(Dt=0;Dt<32;++Dt)Ht[Dt]=5;var Ut,Vt,Wt=Lt(Bt,9,0),zt=Lt(Ht,5,0),Qt=function(e){return(e/8>>0)+(7&e&&1)},Gt=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Et?Et:e instanceof Pt?Pt:Ot)(n-t);return r.set(e.subarray(t,n)),r},Jt=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Zt=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Xt=function(e,t){for(var n=[],r=0;rp&&(p=o[r].s);var f=new Et(p+1),h=Yt(n[l-1],f,0);if(h>t){r=0;var _=0,g=h-t,v=1<t))break;_+=v-(1<>>=g;_>0;){var m=o[r].s;f[m]=0&&_;--r){var b=o[r].s;f[b]==t&&(--f[b],++_)}h=t}return[new Ot(f),h]},Yt=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},Kt=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Et(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},en=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o4&&!O[Ct[P-1]];--P);var A,x,C,T,R=u+5<<3,$=en(i,Bt)+en(o,Ht)+s,M=en(i,p)+en(o,_)+s+14+3*P+en(S,O)+(2*S[16]+3*S[17]+7*S[18]);if(R<=$&&R<=M)return tn(t,l,e.subarray(c,c+u));if(Jt(t,l,1+(M<$)),l+=2,M<$){A=Lt(p,f,0),x=p,C=Lt(_,g,0),T=_;var j=Lt(O,E,0);for(Jt(t,l,m-257),Jt(t,l+5,k-1),Jt(t,l+10,P-4),l+=14,F=0;F15&&(Jt(t,l,N[F]>>>5&127),l+=N[F]>>>12)}}}else A=Wt,x=Bt,C=zt,T=Ht;for(F=0;F255){L=r[F]>>>18&31,Zt(t,l,A[L+257]),l+=x[L+257],L>7&&(Jt(t,l,r[F]>>>23&31),l+=At[L]);var B=31&r[F];Zt(t,l,C[B]),l+=T[B],B>3&&(Zt(t,l,r[F]>>>5&8191),l+=xt[B])}else Zt(t,l,A[r[F]]),l+=x[r[F]];return Zt(t,l,A[256]),l+x[256]},rn=new Pt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),on=new Ot(0),sn=function(){for(var e=new Pt(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),an=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function cn(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r>>8;e=n},d:function(){return 4294967295^e}}}(),r=e.length;n.p(e);var i=function(e,t,n,r,i){return function(e,t,n,r,i,o){var s=e.length,a=new Ot(r+s+5*(1+Math.floor(s/7e3))+i),c=a.subarray(r,a.length-i),u=0;if(!t||s<8)for(var l=0;l<=s;l+=65535){var d=l+65535;d>>13,h=8191&p,_=(1<7e3||O>24576)&&T>423){u=nn(e,c,0,w,k,S,I,O,P,l-P,u),O=F=I=0,P=l;for(var R=0;R<286;++R)k[R]=0;for(R=0;R<30;++R)S[R]=0}var $=2,M=0,j=h,q=x-C&32767;if(T>2&&A==b(l-q))for(var D=Math.min(f,T)-1,N=Math.min(32767,l),L=Math.min(258,T);q<=N&&--j&&x!=C;){if(e[l+$]==e[l+$-q]){for(var B=0;B$){if($=B,M=q,B>D)break;var H=Math.min(q,B-2),U=0;for(R=0;RU&&(U=W,C=V)}}}q+=(x=C)-(C=g[x])+32768&32767}if(M){w[O++]=268435456|Mt[$]<<18|jt[M];var z=31&Mt[$],Q=31&jt[M];I+=At[z]+xt[Q],++k[257+z],++S[Q],E=l+$,++F}else w[O++]=e[l],++k[e[l]]}}u=nn(e,c,o,w,k,S,I,O,P,l-P,u),o||(u=tn(c,u,on))}return Gt(a,0,r+Qt(u)+i)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)}(e,t,function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8),o=i.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&an(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(i,t),an(i,o-8,n.d()),an(i,o-4,r),i}function un(e,t){var n=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new Ot(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},s=0;sr.length){var a=new Ot(i+8+(n-s<<1));a.set(r),r=a}var c=e.charCodeAt(s);c<128||t?o(c):c<2048?(o(192|c>>>6),o(128|63&c)):c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++s))>>>18),o(128|c>>>12&63),o(128|c>>>6&63),o(128|63&c)):(o(224|c>>>12),o(128|c>>>6&63),o(128|63&c))}return Gt(r,0,i)}(Vt=Ut||(Ut={})).GZipJS="gzip-js",Vt.LZ64="lz64",Vt.Base64="base64";var ln,dn,pn,fn=function e(t,n){if(n.blob&&t.buffer)return new Blob([t.buffer],{type:"text/plain"});if(n.sendBeacon||n.blob){var r=e(t,{method:"POST"});return new Blob([r],{type:"application/x-www-form-urlencoded"})}return"POST"!==n.method?null:(i=Array.isArray(t)||(o=t,"[object Uint8Array]"===Object.prototype.toString.call(o))?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),"compression"in t&&t.compression&&(i+="&compression="+t.compression),i);var i,o},hn=function(e){var t=e.url,n=e.data,r=e.headers,i=e.options,o=e.captureMetrics,s=e.callback,a=e.retriesPerformedSoFar,c=e.retryQueue,u=e.onXHRError,l=e.timeout,d=void 0===l?1e4:l,p=new XMLHttpRequest;p.open(i.method||"GET",t,!0);var f=fn(n,i);o.incr("_send_request"),o.incr("_send_request_inflight"),L(r,(function(e,t){p.setRequestHeader(t,e)})),"POST"!==i.method||i.blob||p.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),p.timeout=d,p.withCredentials=!0,p.onreadystatechange=function(){if(4===p.readyState)if(o.incr("xhr-response"),o.incr("xhr-response-".concat(p.status)),o.decr("_send_request_inflight"),200===p.status){if(s){var e;try{e=JSON.parse(p.responseText)}catch(l){return void q(l)}s(e)}}else"function"==typeof u&&u(p),[401,403,404,500].indexOf(p.status)<0&&c.enqueue({url:t,data:n,options:i,headers:r,retriesPerformedSoFar:(a||0)+1,callback:s}),s&&s({status:0})},p.send(f)},_n=function(e){c(r,St);var t=d(r);function r(e,n){var o;return i(this,r),(o=t.call(this)).captureMetrics=e,o.isPolling=!1,o.queue=[],o.areWeOnline=!0,o.onXHRError=n,"undefined"!=typeof window&&"onLine"in window.navigator&&(o.areWeOnline=window.navigator.onLine,window.addEventListener("online",(function(){o._handleWeAreNowOnline()})),window.addEventListener("offline",(function(){o.areWeOnline=!1}))),o}return s(r,[{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;if(!(t>=10)){var n=3e3*Math.pow(2,t),r=new Date(Date.now()+n);console.warn("Enqueued failed request for retry in ".concat(n)),this.queue.push({retryAt:r,requestData:e}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var e=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout((function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()}),this._pollInterval)}},{key:"flush",value:function(){var e=new Date(Date.now()),t=this.queue.filter((function(t){return t.retryAt0){this.queue=this.queue.filter((function(t){return t.retryAt>=e}));var n,r=g(t);try{for(r.s();!(n=r.n()).done;){var i=n.value.requestData;this._executeXhrRequest(i)}}catch(o){r.e(o)}finally{r.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var e,t=g(this.queue);try{for(t.s();!(e=t.n()).done;){var r=e.value.requestData,i=r.url,o=r.data,s=r.options;try{window.navigator.sendBeacon(i,fn(o,n(n({},s),{},{sendBeacon:!0})))}catch(a){S.DEBUG&&console.error(a)}}}catch(a){t.e(a)}finally{t.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(e){var t=e.url,n=e.data,r=e.options,i=e.headers,o=e.callback,s=e.retriesPerformedSoFar;hn({url:t,data:n||{},options:r||{},headers:i||{},retriesPerformedSoFar:s||0,callback:o,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),r}(),gn=function(){function e(t,n){i(this,e),this.persistence=n,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var r=t.persistence_name||t.token;if(this.window_id_storage_key="ph_"+r+"_window_id",this.primary_window_exists_storage_key="ph_"+r+"_primary_window_exists",!this.persistence.disabled&&Te.is_supported()){var o=Te.parse(this.window_id_storage_key),s=Te.parse(this.primary_window_exists_storage_key);o&&!s?this._windowId=o:Te.remove(this.window_id_storage_key),Te.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return s(e,[{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,!this.persistence.disabled&&Te.is_supported()&&Te.set(this.window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:!this.persistence.disabled&&Te.is_supported()?Te.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(e,t,n){e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(a({},Le,[t,e,n])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[Le];return Array.isArray(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;window.addEventListener("beforeunload",(function(){!e.persistence.disabled&&Te.is_supported()&&Te.remove(e.primary_window_exists_storage_key)}))}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||(new Date).getTime(),n=p(this._getSessionId(),3),r=n[0],i=n[1],o=n[2],s=this._getWindowId(),a=o&&o>0&&Math.abs(t-o)>864e5;!i||!e&&Math.abs(t-r)>18e5||a?(i=oe(),s=oe(),o=t):s||(s=oe());var c=0===r||!e||a?t:r,u=0===o?(new Date).getTime():o;return this._setWindowId(s),this._setSessionId(i,c,u),{sessionId:i,windowId:s}}}]),e}(),vn=s((function e(t,n,r,o){i(this,e),this.name="posthog-js",this.setupOnce=function(e){e((function(e){var i,s,a;if("error"!==e.level||!t.__loaded)return e;e.tags||(e.tags={});var c=t.config.ui_host||t.config.api_host;e.tags["PostHog Person URL"]=c+"/person/"+t.get_distinct_id(),t.sessionRecordingStarted()&&(e.tags["PostHog Recording URL"]=c+"/recordings/"+t.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var u=(null===(i=e.exception)||void 0===i?void 0:i.values)||[],l={$sentry_event_id:e.event_id,$sentry_exception:e.exception,$sentry_exception_message:null===(s=u[0])||void 0===s?void 0:s.value,$sentry_exception_type:null===(a=u[0])||void 0===a?void 0:a.type,$sentry_tags:e.tags};return n&&r&&(l.$sentry_url=(o||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+e.event_id),t.capture("$exception",l),e}))}})),yn=function(){function e(){i(this,e),a(this,"_seenFirstPageView",!1)}return s(e,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=oe()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=oe()),this._pageViewId}}]),e}();!function(e){e[e.INIT_MODULE=0]="INIT_MODULE",e[e.INIT_SNIPPET=1]="INIT_SNIPPET"}(ln||(ln={}));var mn=function(){},bn={},wn="posthog",kn=P.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Sn=!kn&&-1===C.indexOf("MSIE")&&-1===C.indexOf("Mozilla"),Fn=function(){var e,t,n;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:-1===(null==x||null===(e=x.location)||void 0===e||null===(t=e.hostname)||void 0===t?void 0:t.indexOf("herokuapp.com")),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:mn,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==P||null===(n=P.location)||void 0===n?void 0:n.protocol),ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(e){var t="Bad HTTP status: "+e.status+" "+e.statusText;console.error(t)},get_device_id:function(e){return e},_onCapture:mn,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},In=function(e,t,n,r){var i,o=n!==wn&&pn?n?pn[n]:void 0:pn,s={initComplete:!1,syncCode:!1},a=function(e){return function(t){s[e]||(s[e]=!0,s.initComplete&&s.syncCode&&(null==r||r(t)))}};if(o&&dn===ln.INIT_MODULE)i=o;else{if(o&&!U(o))return void console.error("You have already initialized "+n);i=new On}return i._init(e,t,n,a("initComplete")),i.toolbar.maybeLoadToolbar(),i.sessionRecording=new ft(i),i.sessionRecording.startRecordingIfEnabled(),i.webPerformance=new vt(i),i.webPerformance.startObservingIfEnabled(),i.__autocapture=i.get_config("autocapture"),We._setIsAutocaptureEnabled(i),We._isAutocaptureEnabled&&(i.__autocapture=i.get_config("autocapture"),We.enabledForProject(i.get_config("token"),100,100)?We.isBrowserSupported()?We.init(i):(i.__autocapture=!1,j("Disabling Automatic Event Collection because this browser is not supported")):(i.__autocapture=!1,j("Not in active bucket: disabling Automatic Event Collection."))),S.DEBUG=S.DEBUG||i.get_config("debug"),void 0!==o&&U(o)&&(i._execute_array.call(i.people,o.people),i._execute_array(o)),a("syncCode")(i),i},On=function(){function e(){var t=this;i(this,e),this.config=Fn(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=vn,this.segmentIntegration=function(){return function(e){var t=function(t,n){t.event.userId||t.event.anonymousId===e.get_distinct_id()||e.reset(),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(e.register({distinct_id:t.event.userId}),e.reloadFeatureFlags());var r=e._calculate_event_properties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return t(e,e.event.event)},page:function(e){return t(e,"$pageview")},identify:function(e){return t(e,"$identify")},screen:function(e){return t(e,"$screen")}}}(t)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new ot(this),this.featureFlags=new lt(this),this.feature_flags=this.featureFlags,this.toolbar=new kt(this),this.pageViewIdManager=new yn,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionManager=void 0}return s(e,[{key:"init",value:function(e,t,n){if(Q(n))console.error("You must name your new library: init(token, config, name)");else{if(n!==wn){var r=In(e,t,n,(function(e){pn[n]=e,e._loaded()}));return pn[n]=r,r}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var a,c={segmentRegister:!1,syncCode:!1},u=function(e){return function(){c[e]||(c[e]=!0,c.segmentRegister&&c.syncCode&&(null==s||s(r)))}};if(this.set_config(H({},Fn(),i,{name:o,token:e,callback_fn:(o===wn?o:wn+"."+o)+"._jsc"})),this._jsc=function(){},(null!=P&&null!==(t=P.rrweb)&&void 0!==t&&t.record||null!=P&&P.rrwebRecord)&&(this.__loaded_recorder_version=null==P||null===(a=P.rrweb)||void 0===a?void 0:a.version),this._captureMetrics=new It(this.get_config("_capture_metrics")),this._requestQueue=new Ft(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new _n(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new Ve(this.config),this.sessionManager=new gn(this.config,this.persistence),this._gdpr_init(),i.segment?(this.config.get_device_id=function(){return i.segment.user().anonymousId()},i.segment.user().id()&&(this.register({distinct_id:i.segment.user().id()}),this.persistence.set_user_state("identified")),i.segment.register(this.segmentIntegration()).then(u("segmentRegister"))):u("segmentRegister")(),void 0!==(null===(n=i.bootstrap)||void 0===n?void 0:n.distinctID)){var l,d,p=this.get_config("get_device_id")(oe()),f=null!==(l=i.bootstrap)&&void 0!==l&&l.isIdentifiedID?p:i.bootstrap.distinctID;this.persistence.set_user_state(null!==(d=i.bootstrap)&&void 0!==d&&d.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:i.bootstrap.distinctID,$device_id:f})}if(this._hasBootstrappedFeatureFlags()){var h,_,g=Object.keys((null===(h=i.bootstrap)||void 0===h?void 0:h.featureFlags)||{}).filter((function(e){var t,n;return!(null===(t=i.bootstrap)||void 0===t||null===(n=t.featureFlags)||void 0===n||!n[e])})).reduce((function(e,t){var n,r;return e[t]=(null===(n=i.bootstrap)||void 0===n||null===(r=n.featureFlags)||void 0===r?void 0:r[t])||!1,e}),{}),v=Object.keys((null===(_=i.bootstrap)||void 0===_?void 0:_.featureFlagPayloads)||{}).filter((function(e){return g[e]})).reduce((function(e,t){var n,r,o,s;return null!==(n=i.bootstrap)&&void 0!==n&&null!==(r=n.featureFlagPayloads)&&void 0!==r&&r[t]&&(e[t]=null===(o=i.bootstrap)||void 0===o||null===(s=o.featureFlagPayloads)||void 0===s?void 0:s[t]),e}),{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:v})}if(!this.get_distinct_id()){var y=this.get_config("get_device_id")(oe());this.register_once({distinct_id:y,$device_id:y},""),this.persistence.set_user_state("anonymous")}P.addEventListener&&P.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),u("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(e){console.error("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new mt(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||B(this.__request_queue,(function(t){e._send_request.apply(e,f(t))})),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,t){if(Q(e))return null;if(kn)return function(n){e(n,t)};var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(e,t,n){var r=JSON.stringify(t);this.__compress_and_send_json_request(e,r,n||bn,mn)}},{key:"__compress_and_send_json_request",value:function(e,t,r,i){var o,s,a,c,u=p((s=(o=this.compression)[Ut.GZipJS]?Ut.GZipJS:o[Ut.LZ64]?Ut.LZ64:Ut.Base64,a=t,c=r,s===Ut.LZ64?[{data:k.compressToBase64(a),compression:Ut.LZ64},c]:s===Ut.GZipJS?[cn(un(a),{mtime:0}),n(n({},c),{},{blob:!0,urlQueryArgs:{compression:Ut.GZipJS}})]:[{data:ne(a)},c]),2),l=u[0],d=u[1];this._send_request(e,l,d,i)}},{key:"_send_request",value:function(e,t,r,i){if(Sn)this.__request_queue.push([e,t,r,i]);else{var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};r=H(o,r||{}),kn||(r.method="GET");var s="sendBeacon"in P.navigator&&"sendBeacon"===r.transport;if(e=function(t,n,r){var i=n||{};i.ip=r.ip?1:0,i._=(new Date).getTime().toString(),i.ver=S.LIB_VERSION;var o=t.split("?");if(o.length>1){var s,a=g(o[1].split("&"));try{for(a.s();!(s=a.n()).done;){var c=s.value.split("=")[0];i[c]&&delete i[c]}}catch(e){a.e(e)}finally{a.f()}}var u=t.indexOf("?")>-1?"&":"?";return t+u+function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",i=[];return L(e,(function(e,r){t=encodeURIComponent(e.toString()),n=encodeURIComponent(r),i[i.length]=n+"="+t})),i.join(r)}(i)}(e,r.urlQueryArgs||{},{ip:this.get_config("ip")}),z(t)&&this.get_config("img")){var a=x.createElement("img");a.src=e,x.body.appendChild(a)}else if(s)try{P.navigator.sendBeacon(e,fn(t,n(n({},r),{},{sendBeacon:!0})))}catch(d){this.get_config("debug")&&console.error(d)}else if(kn)try{hn({url:e,data:t,headers:this.get_config("xhr_headers"),options:r,captureMetrics:this._captureMetrics,callback:i,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(d){console.error(d)}else{var c,u=x.createElement("script");u.type="text/javascript",u.async=!0,u.defer=!0,u.src=e;var l=x.getElementsByTagName("script")[0];null===(c=l.parentNode)||void 0===c||c.insertBefore(u,l)}}}},{key:"_execute_array",value:function(e){var t,n=this,r=[],i=[],o=[];B(e,(function(e){e&&(t=e[0],U(t)?o.push(e):"function"==typeof e?e.call(n):U(e)&&"alias"===t?r.push(e):U(e)&&-1!==t.indexOf("capture")&&"function"==typeof n[t]?o.push(e):i.push(e))}));var s=function(e,t){B(e,(function(e){if(U(e[0])){var n=t;L(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};s(r,this),s(i,this),s(o,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,t;return(null===(e=this.config.bootstrap)||void 0===e?void 0:e.featureFlags)&&Object.keys(null===(t=this.config.bootstrap)||void 0===t?void 0:t.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:bn;if(this.__loaded&&!nt(this,!1)){this._captureMetrics.incr("capture"),"$snapshot"===e&&this._captureMetrics.incr("snapshot");var r=(n=n||bn).transport;if(r&&(n.transport=r),Q(e)||"string"!=typeof e)console.error("No event name provided to posthog.capture");else if(!function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(e)}(C)){this.persistence.update_search_keyword(x.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(x.referrer);var i={event:e,properties:this._calculate_event_properties(e,t||{})};"$identify"===e&&n.$set&&(i.$set=n.$set),(i=te(i,n._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=n.timestamp||new Date,this.get_config("debug")&&j("PostHog.js send",i);var o=JSON.stringify(i),s=this.get_config("api_host")+(n.endpoint||"/e/"),a=n!==bn;return!this.get_config("request_batching")||a&&!n._batchKey||n.send_instantly?this.__compress_and_send_json_request(s,o,n):this._requestQueue.enqueue(s,i,n),this._invokeCaptureHooks(e,i),i}}}},{key:"_addCaptureHook",value:function(e){this.__captureHooks.push(e)}},{key:"_invokeCaptureHooks",value:function(e,t){this.config._onCapture(e,t),L(this.__captureHooks,(function(t){return t(e)}))}},{key:"_calculate_event_properties",value:function(e,t){var r,i=this.persistence.remove_event_timer(e),o=n({},t);if(o.token=this.get_config("token"),"$snapshot"===e){var s=this.persistence.properties();return o.distinct_id=s.distinct_id,o}var a=ue.properties();if(this.sessionManager){var c=this.sessionManager.checkAndGetSessionAndWindowId(),u=c.sessionId,l=c.windowId;o.$session_id=u,o.$window_id=l}if(null!==(r=this.webPerformance)&&void 0!==r&&r.isEnabled&&("$pageview"===e&&this.pageViewIdManager.onPageview(),o=H(o,{$pageview_id:this.pageViewIdManager.getPageViewId()})),"$performance_event"===e){var d=this.persistence.properties();return o.distinct_id=d.distinct_id,o.$current_url=a.$current_url,o}if(void 0!==i){var p=(new Date).getTime()-i;o.$duration=parseFloat((p/1e3).toFixed(3))}o=H({},a,this.persistence.properties(),o);var f=this.get_config("property_blacklist");U(f)?L(f,(function(e){delete o[e]})):console.error("Invalid value for property_blacklist config: "+f);var h=this.get_config("sanitize_properties");return h&&(o=h(o,e)),o}},{key:"register",value:function(e,t){this.persistence.register(e,t)}},{key:"register_once",value:function(e,t,n){this.persistence.register_once(e,t,n)}},{key:"unregister",value:function(e){this.persistence.unregister(e)}},{key:"_register_single",value:function(e,t){this.register(a({},e,t))}},{key:"getFeatureFlag",value:function(e,t){return this.featureFlags.getFeatureFlag(e,t)}},{key:"getFeatureFlagPayload",value:function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(n){return t}}},{key:"isFeatureEnabled",value:function(e,t){return this.featureFlags.isFeatureEnabled(e,t)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"identify",value:function(e,t,n){if(e){this._captureMetrics.incr("identify");var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==r&&e!==this.get_property($e)&&(this.unregister($e),this.register({distinct_id:e}));var o="anonymous"===this.persistence.get_user_state();e!==r&&o?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(r)):(t&&this.people.set(t),n&&this.people.set_once(n)),e!==r&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(e,t,r){if(e&&t){this._captureMetrics.incr("group");var i=this.getGroups();this.register({$groups:n(n({},i),{},a({},e,t))}),r&&this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:r}),i[e]!==t&&this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.reloadFeatureFlags()}},{key:"reset",value:function(e){var t=this.get_property("$device_id");this.persistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var n=this.get_config("get_device_id")(oe());this.register_once({distinct_id:n,$device_id:e?n:t},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(e,t){return e===this.get_property(Re)?(D("Attempting to create alias for existing People user - aborting."),-2):(Q(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single($e,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var t=n({},this.config);z(e)&&(H(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Ee.is_supported()&&"true"===Ee.get("ph_debug")&&(this.config.debug=!0),this.get_config("debug")&&(S.DEBUG=!0),this.sessionRecording&&void 0!==e.disable_session_recording&&t.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!(null===(e=this.sessionRecording)||void 0===e||!e.started())}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_config",value:function(e){var t;return null===(t=this.config)||void 0===t?void 0:t[e]}},{key:"get_property",value:function(e){return this.persistence.props[e]}},{key:"toString",value:function(){var e,t=null!==(e=this.get_config("name"))&&void 0!==e?e:wn;return t!==wn&&(t=wn+"."+t),t}},{key:"_gdpr_init",value:function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&Ee.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!Ie.get("ph_optout")||(Ie.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t)}},{key:"_gdpr_call_func",value:function(e,t){return t=H({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t||{}),Ee.is_supported()||"localStorage"!==t.persistence_type||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=H({enable_persistence:!0},e||{}),this._gdpr_call_func(Qe,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var t=H({clear_persistence:!0},e||{});this._gdpr_call_func(Ge,t),this._gdpr_update_persistence(t)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(Je,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(Ze,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var t=H({enable_persistence:!0},null!=e?e:{});this._gdpr_call_func(Xe,t),this._gdpr_update_persistence(t)}},{key:"debug",value:function(e){!1===e?(P.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(P.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(e){return k.decompressFromBase64(e||null)}}]),e}();!function(e,t){for(var n=0;n{t.forEach((t=>{"childList"===t.type&&t.addedNodes.forEach((t=>{if("script"===t.nodeName.toLowerCase()){const n=t.getAttribute("src");Tn(n)&&e.capture("script_conflict_detect",{src:n})}}))}))})),n={childList:!0,attributes:!0,subtree:!0},r=document.querySelector("body"),i=document.querySelector("head");r&&t.observe(r,n),i&&t.observe(i,n)}(e)}function Tn(e){return!!(e&&xn.find((t=>e.includes(t))))}let Rn;e.capture=function(e,t){Rn.capture(e,t)},e.checkConflictScripts=function(){Rn?Cn(Rn):console.warn("ZigzagPosthogScript not initialized")},e.init=function(e,t){Rn=Pn.init(An.posthog.token,{api_host:An.posthog.url,debug:An.posthog.debug,autocapture:!1,capture_pageview:!1,persistence:An.posthog.cookieDisabledDomains.includes(window.location.hostname)?"localStorage":"localStorage+cookie",loaded:void 0,advanced_disable_decide:!0,...null!=t?t:{}},"zigzag"),Rn.register({shop_key:e})},e.initPreConsent=function(e,t){Rn=Pn.init(An.posthog.token,{api_host:An.posthog.url,debug:An.posthog.debug,autocapture:!1,capture_pageview:!1,persistence:"memory",loaded:function(e){e.identify("00000000000000-00000000000000-00000000-000000-00000000000000")},advanced_disable_decide:!0,...null!=t?t:{}},"zigzag"),Rn.register({shop_key:e})},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})); ; if (typeof ZigzagPosthogScript !== 'undefined') { try { ZigzagPosthogScript.initPreConsent('regal_co_jp'); ZigzagPosthogScript.checkConflictScripts(); } catch (error) { console.warn('WorldShopping: error when initialize posthog-script ' + (error.message || '')); } } var deferMilliseconds = 0; if (window.localStorage.getItem('zigzag') === null && window.localStorage.getItem('zigzag-checkout-script') === null) { deferMilliseconds = 5000; } window.localStorage.setItem('zigzag-checkout-script', 'true'); window.zigzagLoadingStartedAt = new Date().getTime(); setTimeout(function() { function calculatePrecedence(index, requestShopKey) { var precedence = index; if (requestShopKey.indexOf('__') !== -1) { precedence += 100; } return precedence; } function isHighestPrecedence() { var nodes = document.querySelectorAll('script[src*="https://checkout-js.worldshopping.jp/checkout-[version].js"]'); var thisPrecedence = 0; var precedences = []; if (nodes.length >= 2) { for (var i = 0; i < nodes.length; i += 1) { var precedence = calculatePrecedence(i, 'regal_co_jp'); precedences.push(precedence); if(nodes[i].src.indexOf('regal_co_jp') > -1) { thisPrecedence = precedence; } } return thisPrecedence === Math.max.apply(null, precedences); } else { return true; } } if(!isHighestPrecedence()) { return; } var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.id = 'zigzag-worldshopping-inline-script'; script.type = 'text/javascript'; script.charset = 'UTF-8'; script.setAttribute('crossorigin', 'anonymous'); script.src = 'https://shop-js.worldshopping.jp/regal_co_jp.js?versionId=mdz3EJGOi2zbXrupwQ7qs5fmQGJK5DhC'; script.onerror = function() { if (typeof ZigzagPosthogScript !== 'undefined') { ZigzagPosthogScript.capture('script_load_fail', { src: 'https://shop-js.worldshopping.jp/regal_co_jp.js?versionId=mdz3EJGOi2zbXrupwQ7qs5fmQGJK5DhC' }) } }; head.appendChild(script); var req = new XMLHttpRequest(); req.onreadystatechange = function() { var result = document.getElementById('result'); if (req.readyState == 4 && req.status == 200) { var response = JSON.parse(req.responseText); if (response && response.country !== 'JP') { function kickZigzag() { var i = setInterval(function() { if (window.zigzag && window.onLoadZigZag && document.readyState !== 'loading') { window.zigzag.sourceSettings = {"domesticDeliveryDiscountedFee":0,"serviceFee":10,"flowControlOptOut":true,"internationalShippingFee":null,"serviceFeeType":"PERCENT","ecSystem":"ECBEING","negativeMatchWords":[],"shopName":"regal","domesticDeliveryBaseFee":550,"metaPixelId":null,"negativeMatchArea":[],"salesTaxRoundingType":"floor","domesticDeliveryDiscountThresholdItemPrice":3000,"salesTaxType":"inclusive","shopLogoUrl":"https://static-contents.worldshopping.jp/shops/regal_co_jp/logo.jpg","key":"regal_co_jp","deferFirstVisitInSec":5,"__context__":{},"type":"WSC_ECBEING_APP","metaPixelTypesOfPersonalInfo":null}; window.zigzag.shopData = {"settings":[["sheetNo","sheetRule","sheetName","sheetType","sheetMatchingType","補足&キャプチャ","dev memo"],["1","byCountry","byCountry","blacklist","exact"],["2","byUrl","byUrl","blacklist","forward"],["3","byItemName","byItemName","blacklist","forward"],["4","byCategory","byCategory","blacklist","exact","","ショップ様へ\n←ブランドロゴ画像のaltのブランド名を使用して除外設定できます。\n大文字小文字に気をつけて除外登録されてください。"],["5","byUrl","【運営側記入シート】byUrl","blacklist","forward"],["6","byItemName","【運営側記入シート】byItemName","blacklist","forward"]],"byUrl":[["url","countries","description"],["https://www.regal.co.jp/shop/g/gTY32_______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY22_______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY29A______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY35_______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY38_______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY39_______B_______/","ALL"],["https://www.regal.co.jp/shop/g/gTY39_______DBR_____/","ALL"],["https://www.regal.co.jp/shop/g/gTY39_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY14_______BR______/","ALL"],["https://www.regal.co.jp/shop/g/gTY14_______DBR_____/","ALL"],["https://www.regal.co.jp/shop/g/gTY14_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY14_______WINE____/","ALL"],["https://www.regal.co.jp/shop/g/gTY15_______BR______/","ALL"],["https://www.regal.co.jp/shop/g/gTY15_______DBR_____/","ALL"],["https://www.regal.co.jp/shop/g/gTY15_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY16_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY17_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY25_______DBR_____/","ALL"],["https://www.regal.co.jp/shop/g/gTY28A______B_______/","ALL"],["https://www.regal.co.jp/shop/g/gTY61_______B_______/","ALL"],["https://www.regal.co.jp/shop/g/gTY61_______BR______/","ALL"],["https://www.regal.co.jp/shop/g/gTY61_______DBR_____/","ALL"],["https://www.regal.co.jp/shop/g/gTY61_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY62_______B_______/","ALL"],["https://www.regal.co.jp/shop/g/gTY62_______BR______/","ALL"],["https://www.regal.co.jp/shop/g/gTY62_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY63_______B_______/","ALL"],["https://www.regal.co.jp/shop/g/gTY63_______BURG____/","ALL"],["https://www.regal.co.jp/shop/g/gTY63_______NT______/","ALL"],["https://www.regal.co.jp/shop/g/gTY64_______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY65_______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY66_______________/","ALL"],["https://www.regal.co.jp/shop/g/gTY67_______B_______/","ALL"],["https://www.regal.co.jp/shop/g/gTY67_______DBR_____/","ALL"],["https://www.regal.co.jp/shop/g/gTY69_______________/","ALL"],["https://www.regal.co.jp/shop/g/g_293_____________55/","ALL"],["https://www.regal.co.jp/shop/g/g_294_____________SS/","ALL"],["https://www.regal.co.jp/shop/g/gTY32_______________/","ALL"]],"byItemName":[["itemName","countries","description"]],"byCategory":[["category","countries","description"],["Santoni","ALL"],["Clarks","ALL"],["POLO","ALL"],["LAUREN RALPHLAUREN","ALL"],["naturalizer","ALL"],["MACKINTOSH PHILOSOPHY","ALL"],["ROOTOTE","ALL"],["cricketweb","ALL"]],"byCountry":[["countryCode"],["TW"],["US"],["IN"],["KR"],["CA"],["PR"]],"'【運営側記入シート】byUrl'":[["url","countries","description","※本シートはWorldshoppingオペレーションチームが必要に応じてお取り扱い不可の商品を除外登録するシートになります。※ショップサイト様はこちらのシートを変更しないようお願いします。"],["https://www.regal.co.jp/shop/g/gTY27A______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY37_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTL30_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY82_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY83_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY14_______B_______/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY14_______NAVY____/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY15_______B_______/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY15_______DELI____/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY16_______B_______/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY17_______B_______/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY18_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY19_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY20_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY21_______________/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY25_______B_______/","ALL","航空輸送が禁止されている商品"],["https://www.regal.co.jp/shop/g/gTY28A______NT______/","ALL","航空輸送が禁止されている商品"]],"'【運営側記入シート】byItemName'":[["itemName","countries","description","※本シートはWorldshoppingオペレーションチームが必要に応じてお取り扱い不可の商品を除外登録するシートになります。※ショップサイト様はこちらのシートを変更しないようお願いします。"]]}; window.zigzag.supportedArea = [["AF","Afghanistan","OPT_OUT"],["AL","Albania","OPT_OUT"],["DZ","Algeria","OPT_OUT"],["AS","American Samoa","OPT_OUT"],["AD","Andorra","OPT_OUT"],["AO","Angola","OPT_OUT"],["AI","Anguilla","OPT_OUT"],["AG","Antigua and Barbuda","OPT_OUT"],["AR","Argentina","OPT_OUT"],["AM","Armenia","OPT_OUT"],["AW","Aruba","OPT_OUT"],["AU","Australia","OPT_OUT"],["AT","Austria","OPT_IN"],["AZ","Azerbaijan","OPT_OUT"],["BS","Bahamas","OPT_OUT"],["BH","Bahrain","OPT_OUT"],["BD","Bangladesh","OPT_OUT"],["BB","Barbados","OPT_OUT"],["BE","Belgium","OPT_IN"],["BZ","Belize","OPT_OUT"],["BJ","Benin","OPT_OUT"],["BM","Bermuda","OPT_OUT"],["BT","Bhutan","OPT_OUT"],["BO","Bolivia, Plurinational State of","OPT_OUT"],["BQ","Bonaire, Sint Eustatius and Saba","OPT_OUT"],["BA","Bosnia and Herzegovina","OPT_OUT"],["BW","Botswana","OPT_OUT"],["BR","Brazil","OPT_OUT"],["BN","Brunei Darussalam","OPT_OUT"],["BG","Bulgaria","OPT_IN"],["BF","Burkina Faso","OPT_OUT"],["BI","Burundi","OPT_OUT"],["KH","Cambodia","OPT_OUT"],["CM","Cameroon","OPT_OUT"],["CA","Canada","OPT_IN"],["CV","Cape Verde","OPT_OUT"],["KY","Cayman Islands","OPT_OUT"],["CF","Central African Republic","OPT_OUT"],["TD","Chad","OPT_OUT"],["CL","Chile","OPT_OUT"],["CN","China","OPT_IN"],["CO","Colombia","OPT_OUT"],["KM","Comoros","OPT_OUT"],["CG","Congo","OPT_OUT"],["CD","Congo, the Democratic Republic of the","OPT_OUT"],["CK","Cook Islands","OPT_OUT"],["CR","Costa Rica","OPT_OUT"],["HR","Croatia","OPT_IN"],["CU","Cuba","OPT_OUT"],["CW","Curaçao","OPT_OUT"],["CY","Cyprus","OPT_IN"],["CZ","Czech Republic","OPT_IN"],["CI","Côte d'Ivoire","OPT_OUT"],["DK","Denmark","OPT_IN"],["DJ","Djibouti","OPT_OUT"],["DM","Dominica","OPT_OUT"],["DO","Dominican Republic","OPT_OUT"],["EC","Ecuador","OPT_OUT"],["EG","Egypt","OPT_OUT"],["SV","El Salvador","OPT_OUT"],["GQ","Equatorial Guinea","OPT_OUT"],["ER","Eritrea","OPT_OUT"],["EE","Estonia","OPT_IN"],["ET","Ethiopia","OPT_OUT"],["FK","Falkland Islands (Malvinas)","OPT_OUT"],["FO","Faroe Islands","OPT_OUT"],["FJ","Fiji","OPT_OUT"],["FI","Finland","OPT_IN"],["FR","France","OPT_IN"],["GF","French Guiana","OPT_OUT"],["PF","French Polynesia","OPT_OUT"],["GA","Gabon","OPT_OUT"],["GM","Gambia","OPT_OUT"],["GE","Georgia","OPT_OUT"],["DE","Germany","OPT_IN"],["GH","Ghana","OPT_OUT"],["GI","Gibraltar","OPT_OUT"],["GR","Greece","OPT_IN"],["GL","Greenland","OPT_OUT"],["GD","Grenada","OPT_OUT"],["GP","Guadeloupe","OPT_OUT"],["GU","Guam","OPT_OUT"],["GT","Guatemala","OPT_OUT"],["GG","Guernsey","OPT_OUT"],["GN","Guinea","OPT_OUT"],["GW","Guinea-Bissau","OPT_OUT"],["GY","Guyana","OPT_OUT"],["HT","Haiti","OPT_OUT"],["VA","Holy See (Vatican City State)","OPT_OUT"],["HN","Honduras","OPT_OUT"],["HK","Hong Kong","OPT_OUT"],["HU","Hungary","OPT_IN"],["IS","Iceland","OPT_OUT"],["IN","India","OPT_OUT"],["ID","Indonesia","OPT_OUT"],["IR","Iran, Islamic Republic of","OPT_OUT"],["IQ","Iraq","OPT_OUT"],["IE","Ireland","OPT_IN"],["IM","Isle of Man","OPT_OUT"],["IL","Israel","OPT_OUT"],["IT","Italy","OPT_IN"],["JM","Jamaica","OPT_OUT"],["JE","Jersey","OPT_OUT"],["JO","Jordan","OPT_OUT"],["KZ","Kazakhstan","OPT_OUT"],["KE","Kenya","OPT_OUT"],["KI","Kiribati","OPT_OUT"],["KR","South Korea","OPT_IN"],["KW","Kuwait","OPT_OUT"],["KG","Kyrgyzstan","OPT_OUT"],["LA","Lao People's Democratic Republic","OPT_OUT"],["LV","Latvia","OPT_IN"],["LB","Lebanon","OPT_OUT"],["LS","Lesotho","OPT_OUT"],["LR","Liberia","OPT_OUT"],["LY","Libya","OPT_OUT"],["LI","Liechtenstein","OPT_OUT"],["LT","Lithuania","OPT_IN"],["LU","Luxembourg","OPT_IN"],["MO","Macau","OPT_OUT"],["MK","Macedonia, the Former Yugoslav Republic of","OPT_OUT"],["MG","Madagascar","OPT_OUT"],["MW","Malawi","OPT_OUT"],["MY","Malaysia","OPT_OUT"],["MV","Maldives","OPT_OUT"],["ML","Mali","OPT_OUT"],["MT","Malta","OPT_IN"],["MH","Marshall Islands","OPT_OUT"],["MQ","Martinique","OPT_OUT"],["MR","Mauritania","OPT_OUT"],["MU","Mauritius","OPT_OUT"],["YT","Mayotte","OPT_OUT"],["MX","Mexico","OPT_OUT"],["FM","Micronesia, Federated States of","OPT_OUT"],["MD","Moldova, Republic of","OPT_OUT"],["MC","Monaco","OPT_OUT"],["MN","Mongolia","OPT_OUT"],["ME","Montenegro","OPT_OUT"],["MS","Montserrat","OPT_OUT"],["MA","Morocco","OPT_OUT"],["MZ","Mozambique","OPT_OUT"],["MM","Myanmar","OPT_OUT"],["NA","Namibia","OPT_OUT"],["NR","Nauru","OPT_OUT"],["NP","Nepal","OPT_OUT"],["NL","Netherlands","OPT_IN"],["NC","New Caledonia","OPT_OUT"],["NZ","New Zealand","OPT_OUT"],["NI","Nicaragua","OPT_OUT"],["NE","Niger","OPT_OUT"],["NG","Nigeria","OPT_OUT"],["NU","Niue","OPT_OUT"],["MP","Northern Mariana Islands","OPT_OUT"],["NO","Norway","OPT_OUT"],["OM","Oman","OPT_OUT"],["PK","Pakistan","OPT_OUT"],["PW","Palau","OPT_OUT"],["PS","Palestine, State of","OPT_OUT"],["PA","Panama","OPT_OUT"],["PG","Papua New Guinea","OPT_OUT"],["PY","Paraguay","OPT_OUT"],["PE","Peru","OPT_OUT"],["PH","Philippines","OPT_OUT"],["PL","Poland","OPT_IN"],["PT","Portugal","OPT_IN"],["PR","Puerto Rico","OPT_OUT"],["QA","Qatar","OPT_OUT"],["RO","Romania","OPT_IN"],["RW","Rwanda","OPT_OUT"],["RE","Réunion","OPT_OUT"],["SH","Saint Helena, Ascension and Tristan da Cunha","OPT_OUT"],["KN","Saint Kitts and Nevis","OPT_OUT"],["LC","Saint Lucia","OPT_OUT"],["MF","Saint Martin (French part)","OPT_OUT"],["VC","Saint Vincent and the Grenadines","OPT_OUT"],["WS","Samoa","OPT_OUT"],["SM","San Marino","OPT_OUT"],["ST","Sao Tome and Principe","OPT_OUT"],["SA","Saudi Arabia","OPT_OUT"],["SN","Senegal","OPT_OUT"],["RS","Serbia","OPT_OUT"],["SC","Seychelles","OPT_OUT"],["SL","Sierra Leone","OPT_OUT"],["SG","Singapore","OPT_IN"],["SK","Slovakia","OPT_IN"],["SI","Slovenia","OPT_IN"],["SB","Solomon Islands","OPT_OUT"],["SO","Somalia","OPT_OUT"],["ZA","South Africa","OPT_OUT"],["SS","South Sudan","OPT_OUT"],["ES","Spain","OPT_IN"],["LK","Sri Lanka","OPT_OUT"],["SD","Sudan","OPT_OUT"],["SR","Suriname","OPT_OUT"],["SZ","Swaziland","OPT_OUT"],["SE","Sweden","OPT_IN"],["CH","Switzerland","OPT_OUT"],["TW","Taiwan","OPT_IN"],["TJ","Tajikistan","OPT_OUT"],["TZ","Tanzania, United Republic of","OPT_OUT"],["TH","Thailand","OPT_OUT"],["TL","Timor-Leste","OPT_OUT"],["TG","Togo","OPT_OUT"],["TO","Tonga","OPT_OUT"],["TT","Trinidad and Tobago","OPT_OUT"],["TN","Tunisia","OPT_OUT"],["TR","Turkey","OPT_OUT"],["TM","Turkmenistan","OPT_OUT"],["TC","Turks and Caicos Islands","OPT_OUT"],["TV","Tuvalu","OPT_OUT"],["UG","Uganda","OPT_OUT"],["UA","Ukraine","OPT_OUT"],["AE","United Arab Emirates","OPT_OUT"],["GB","United Kingdom","OPT_IN"],["US","United States","OPT_OUT"],["UY","Uruguay","OPT_OUT"],["UZ","Uzbekistan","OPT_OUT"],["VU","Vanuatu","OPT_OUT"],["VE","Venezuela, Bolivarian Republic of","OPT_OUT"],["VN","Vietnam","OPT_OUT"],["VG","Virgin Islands, British","OPT_OUT"],["VI","Virgin Islands, U.S.","OPT_OUT"],["WF","Wallis and Futuna","OPT_OUT"],["YE","Yemen","OPT_OUT"],["ZM","Zambia","OPT_OUT"],["ZW","Zimbabwe","OPT_OUT"]]; window.zigzag.defaultNegativeMatchWords = [{"labelJa":"デジタルマガジン","labelCh":"电子杂志","labelTw":"電子雜誌","word":"デジタルマガジン","labelEn":"Digital Magazine","wscVisibility":false},{"labelJa":"香水","labelCh":"香水","labelTw":"香水","word":"香水","labelEn":"Perfume","wscVisibility":true},{"labelJa":"パフューム","labelCh":"香水","labelTw":"香水","word":"パフューム","labelEn":"Parfume","wscVisibility":true},{"labelJa":"フレグランス","labelCh":"香水","labelTw":"香水","word":"フレグランス","labelEn":"Fragrance","wscVisibility":true},{"labelJa":"アロマ","labelCh":"芳香","labelTw":"芳香","word":"アロマ","labelEn":"Aroma","wscVisibility":false},{"labelJa":"コンバース","labelCh":"匡威","labelTw":"匡威","word":"コンバース","labelEn":"Converse","wscVisibility":true},{"labelJa":"マニキュア","labelCh":"指甲油","labelTw":"指甲油","word":"マニキュア","labelEn":"Manicure","wscVisibility":false},{"labelJa":"医薬品","labelCh":"非处方药","labelTw":"藥品","word":"医薬品","labelEn":"Medicine","wscVisibility":true},{"labelJa":"マホガニー","labelCh":"桃花心木","labelTw":"桃花心木","word":"マホガニー(?!.*(色|風|のような))","labelEn":"Mahogany","wscVisibility":false},{"labelJa":"芳香剤","labelCh":"芳香剂","labelTw":"芳香劑","word":"芳香剤","labelEn":"Air refresher","wscVisibility":false},{"labelJa":"ドライフラワー","labelCh":"干花","labelTw":"乾花","word":"ドライフラワー","labelEn":"Dry flower","wscVisibility":true},{"labelJa":"オイル","labelCh":"油","labelTw":"油","word":"オイル","labelEn":"Oil","wscVisibility":false},{"labelJa":"毛皮","labelCh":"毛皮","labelTw":"毛皮","word":"毛皮","labelEn":"Fur","wscVisibility":false},{"labelJa":"押し花","labelCh":"压花","labelTw":"壓花","word":"押し花","labelEn":"Pressed flowers","wscVisibility":true},{"labelJa":"薬用育毛剤","labelCh":"药用生发剂","labelTw":"藥用生髮劑","word":"薬用育毛剤","labelEn":"Hair regrowth tonics","wscVisibility":true},{"labelJa":"育毛美容液","labelCh":"生发剂","labelTw":"生髮劑","word":"育毛美容液","labelEn":"Hair growth serum","wscVisibility":true},{"labelJa":"発毛促進剤","labelCh":"生发剂","labelTw":"生髮劑","word":"発毛促進剤","labelEn":"Hair regrowth tonics","wscVisibility":true},{"labelJa":"アルコール","labelCh":"酒精","labelTw":"酒精","word":"アルコール","labelEn":"Alcohol","wscVisibility":true},{"labelJa":"ディフューザー","labelCh":"芳香剂","labelTw":"芳香劑","word":"ディフューザー","labelEn":"Diffuser","wscVisibility":true},{"labelJa":"レジン液","labelCh":"液体树脂","labelTw":"液體樹脂","word":"レジン液","labelEn":"Resin liquid","wscVisibility":true},{"labelJa":"モバイルバッテリー","labelCh":"充电宝","labelTw":"行動電源","word":"モバイルバッテリー","labelEn":"Mobile battery","wscVisibility":true},{"labelJa":"オイルワックス","labelCh":"油蜡","labelTw":"油蠟","word":"オイルワックス","labelEn":"Oil wax","wscVisibility":true},{"labelJa":"ヘアクリーム","labelCh":"发胶","labelTw":"髮膠","word":"ヘアクリーム","labelEn":"Hair cream","wscVisibility":false},{"labelJa":"アダルト","labelCh":"成人用品","labelTw":"成人用品","word":"アダルト","labelEn":"Adult","wscVisibility":false},{"labelJa":"クロコダイル","labelCh":"鳄鱼皮","labelTw":"鱷魚皮","word":"クロコダイル(?!.*(柄|のような))","labelEn":"Crocodile","wscVisibility":true},{"labelJa":"制汗剤","labelCh":"止汗露","labelTw":"止汗劑","word":"制汗剤","labelEn":"Deodorant","wscVisibility":true},{"labelJa":"蜂蜜","labelCh":"蜂蜜","labelTw":"蜂蜜","word":"蜂蜜","labelEn":"Honey","wscVisibility":false},{"labelJa":"万年筆(カートリッジ付き)","labelCh":"钢笔(附带墨水替换芯)","labelTw":"鋼筆(附帶墨水替換芯)","word":"万年筆(カートリッジ付き)","labelEn":"Fountain pen (with ink)","wscVisibility":false},{"labelJa":"ダウンロード","labelCh":"下载","labelTw":"下載","word":"ダウンロード","labelEn":"Download","wscVisibility":false},{"labelJa":"ワニ革(?!.*(風|のような))","labelCh":"鳄鱼皮","labelTw":"鱷魚皮","word":"ワニ革(?!.*(風|のような))","labelEn":"Crocodile Skin","wscVisibility":true},{"labelJa":"マニキュアリムーバー","labelCh":"洗甲水","labelTw":"去光水","word":"マニキュアリムーバー","labelEn":"Manicure Remover","wscVisibility":true},{"labelJa":"ヘアカラー","labelCh":"染发剂","labelTw":"染髮劑","word":"ヘアカラー","labelEn":"Hair dye","wscVisibility":true},{"labelJa":"毛染め剤","labelCh":"染发剂","labelTw":"染髮劑","word":"毛染め剤","labelEn":"Hair dye","wscVisibility":true},{"labelJa":"シェーバー洗浄液","labelCh":"剃须刀清洗液","labelTw":"刮鬍刀清潔液","word":"シェーバー洗浄液","labelEn":"Shaver cleaner","wscVisibility":true},{"labelJa":"ネイルケア","labelCh":"甲护产品","labelTw":"護甲產品","word":"ネイルケア","labelEn":"Nailcare product","wscVisibility":true},{"labelJa":"日本刀","labelCh":"日本刀","labelTw":"日本刀","word":"日本刀","labelEn":"Japanese sword","wscVisibility":false},{"labelJa":"ヘビ革","labelCh":"蛇皮","labelTw":"蛇皮","word":"ヘビ革(?!.*(風|のような))","labelEn":"Snake Skin","wscVisibility":false},{"labelJa":"CONVERSE","labelCh":"匡威","labelTw":"匡威","word":"CONVERSE","labelEn":"CONVERSE","wscVisibility":true},{"labelJa":"カンガルー","labelCh":"","labelTw":"","word":"カンガルー(?!.*(風|のような))","labelEn":"kangaroo leather","wscVisibility":false},{"labelJa":"ジェルネイル","labelCh":"凝胶甲","labelTw":"","word":"ジェルネイル","labelEn":"gel nail","wscVisibility":false},{"labelJa":"ジッポ","labelCh":"","labelTw":"","word":"zippo","labelEn":"zippo","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"マッチ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"松ぼっくり","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ZIPPO","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"魚","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ライター","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"Zippo","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"Nail","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"コイン","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"スプレー","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"居合刀","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"冷凍","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"冷蔵","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"肉","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ペットフード","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"模造刀","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"マッチ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"花火","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"接着剤","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ランタン","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"インク","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ガン","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"酒","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"日本酒","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"焼酎","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"医薬部外品","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"薬品","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"医療","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ベビーカー","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"電子タバコ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"アイコス","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"テーブル","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"キャビネット","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"椅子","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ベッド","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"PERFUME","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"マットレス","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"テレビ台","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"SIMカード","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"simカード","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ハーバリウム","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"perfume","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ラック","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ワイン","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"畳","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"イ草","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"い草","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"はちみつ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"フィナンシェ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"クリスマスツリー","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"名入れ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"イベント","labelEn":"","wscVisibility":false},{"labelJa":"グッチ","labelCh":"","labelTw":"","word":"gucci","labelEn":"gucci","wscVisibility":false},{"labelJa":"グッチ","labelCh":"","labelTw":"","word":"GUCCI","labelEn":"GUCCI","wscVisibility":false},{"labelJa":"グッチ","labelCh":"","labelTw":"","word":"グッチ","labelEn":"gucci","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"玄米","labelEn":"","wscVisibility":true},{"labelJa":"","labelCh":"","labelTw":"","word":"ポータブル電源","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ハチミツ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ムビチケ","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"PARFUM","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"オールスター","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ALL STAR","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"ALLSTAR","labelEn":"","wscVisibility":false},{"labelJa":"サラミ","labelCh":"","labelTw":"","word":"サラミ","labelEn":"","wscVisibility":false},{"labelJa":"ジャーキー","labelCh":"","labelTw":"","word":"ジャーキー","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"jerky","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"salami","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"Jerky","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"Salami","labelEn":"","wscVisibility":false},{"labelJa":"","labelCh":"","labelTw":"","word":"オードパルファム","labelEn":"","wscVisibility":false}]; window.zigzag.shopCoupons = [{"minTotalItemPrice":5000,"code":"WSB500","promotionStartTime":"2024-05-31T15:00:00.000+0000","showPromotion":true,"totalPrice":20000,"discountTarget":"PURCHASE_SERVICE_FEE","usedPrice":0,"statusApproval":"APPROVED","createdDate":"2024-05-31T05:13:07.000+0000","name":"アンケート回答御礼クーポン_202406","discountType":"PRICE","startTime":"2024-05-31T15:00:00.000+0000","id":"a1ARB0000014mnh2AA","endTime":"2024-07-31T14:59:00.000+0000","value":500,"promotionEndTime":"2024-07-31T14:59:00.000+0000"}]; window.zigzag.exchangeRates = [["USD",0.00636928,"MUFG","2024-06-10"]]; window.zigzag.location = { ipAddress: response.ipAddress, country: response.country }; onLoadZigZag(); clearInterval(i); } }, 10); } function loadJs() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.id = 'zigzag-worldshopping-checkout-js'; script.type = 'text/javascript'; script.charset = 'UTF-8'; script.async = true; script.onreadystatechange = function() { if (this.readyState === 'complete') { kickZigzag(); } } script.onload = function() { kickZigzag(); }; script.setAttribute('crossorigin', 'anonymous'); script.src = 'https://checkout-js.worldshopping.jp/checkout-3_38_31-v1_100907fa.js'; script.onerror = function() { if (typeof ZigzagPosthogScript !== 'undefined') { ZigzagPosthogScript.capture('script_load_fail', { src: 'https://checkout-js.worldshopping.jp/checkout-3_38_31-v1_100907fa.js' }) } }; head.appendChild(script); } loadJs(); } } } req.open('GET', 'https://checkout-api.worldshopping.jp/v1/geolocation', true); req.send(null); }, deferMilliseconds); }());