/*! For license information please see main.js.LICENSE.txt */
(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}e.r(t),e.d(t,{hasBrowserEnv:()=>De,hasStandardBrowserEnv:()=>qe,hasStandardBrowserWebWorkerEnv:()=>ze,navigator:()=>Ie,origin:()=>Me});var r=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var i=n[o].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});let o="",i=1;const s=()=>{let e=new URL(location.href).hostname.split(".");if(e.length>2){const t=e.slice(-3).join("."),n=e.slice(-2).join(".");if(/^(com|org|net|gov|edu|mil|int|co|ac|ad|ed|go|gr|lg|geo|ne)\.[a-z]{2,3}$/.test(n))return t}return e.slice(-2).join(".")},a=e=>{const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()},c=e=>{const t=new URLSearchParams(window.location.search).get(e)||"";return t.includes(" ")?t.replaceAll(" ","+"):t},u=()=>{try{const{src:e}=document.currentScript,t=new URL(e).searchParams.get("tag_tracking_code")||"";return 1===i?(i=2,o=t.includes(" ")?t.replaceAll(" ","+"):t,t.includes(" ")?t.replaceAll(" ","+"):t):o}catch{return o}},l=(e=[])=>localStorage.setItem("kuzen_tags",JSON.stringify(((e=[],t="")=>t?[...new Map(e.filter(Boolean).map(e=>[e[t],e])).values()]:e)(e,"user_id"))),d=()=>JSON.parse(localStorage.getItem("kuzen_tags"))||[],f=e=>{const t=JSON.parse(localStorage.getItem("kuzen_tags"))||[];return e?t.find(t=>t.tag_tracking_code===e)||{}:t.find(e=>e.tag_tracking_code===u())||{}},p=()=>f().tag_tracking_code,h=e=>{const t=f();t.user_id=e,l([...d()].map(e=>e.tag_tracking_code===p()?t:e))},m=e=>{const t=e&&"null"!==e?e:"";localStorage.setItem("line_id",t),r.set("line_id",t,{domain:s(),expires:30,secure:!0})},g=e=>localStorage.setItem("kuzen",e?"true":""),b=e=>{const t=f();t.custom_values=e,l([...d()].map(e=>e.tag_tracking_code===p()?t:e))},y=e=>{const t=f();t.original_service_id=e,l([...d()].map(e=>e.tag_tracking_code===p()?t:e))},w=e=>{const t=f();t.blockedStartChatEventDataToServer=e?"1":"2",l([...d()].map(e=>e.tag_tracking_code===p()?t:e))},_=e=>{const t=f();t.blockedSendEventToServer=e?"1":"2",l([...d()].map(e=>e.tag_tracking_code===p()?t:e))},E=()=>f().custom_values||[],S=()=>f().user_id||"",v=()=>r.get("line_id",{domain:s()})||localStorage.getItem("line_id"),O=()=>f().prev_user_id,R=()=>f().track,T=()=>f().blockedSendEventToServer||"2",k=e=>{const t={web_plugin_access_token:window.__const&&window.__const.access_token||"",user_id_in_chat_application:a("client")||"",refer:document.referrer,user_agent:window.navigator.userAgent,language:window.navigator.userLanguage||window.navigator.language,page_title:document.title,url:location.protocol+"//"+location.host+location.pathname,url_with_params:location.href,tag_tracking_code:p(),custom_values:{},date:(new Date).getTime(),...e};return{user:{name:localStorage.getItem("kuzen_tag_name")||"",user_id:S(),line_id:v()},action_info:t}},A=e=>{(e=>{const t=f();t.prev_user_id=e,l([...d()].map(e=>e.tag_tracking_code===p()?t:e))})(S());const t=E().find(t=>t.key===e.action_info.action_type);if(t&&t.value){const n={...e},r={};return Object.keys(t.value).forEach(o=>{let i=!1;for(const r in e.action_info)if(o===r){i=!0;try{n.action_info[r]=new Function(`return ${t.value[o]}`)()}catch{n.action_info[r]=t.value[o]}}for(const r in e.user)if(o===r){i=!0;try{n.user[r]=new Function(`return ${t.value[o]}`)()}catch{n.user[r]=t.value[o]}}if(!i)try{r[o]=new Function(`return ${t.value[o]}`)()}catch{r[o]=t.value[o]}}),n.action_info.custom_values=r,n}return e};function C(e,t){return function(){return e.apply(t,arguments)}}const{toString:j}=Object.prototype,{getPrototypeOf:x}=Object,{iterator:N,toStringTag:U}=Symbol,P=(L=Object.create(null),e=>{const t=j.call(e);return L[t]||(L[t]=t.slice(8,-1).toLowerCase())});var L;const F=e=>(e=e.toLowerCase(),t=>P(t)===e),B=e=>t=>typeof t===e,{isArray:D}=Array,I=B("undefined");function q(e){return null!==e&&!I(e)&&null!==e.constructor&&!I(e.constructor)&&J(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const z=F("ArrayBuffer"),M=B("string"),J=B("function"),$=B("number"),H=e=>null!==e&&"object"==typeof e,W=e=>{if("object"!==P(e))return!1;const t=x(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||U in e||N in e)},V=F("Date"),K=F("File"),X=F("Blob"),G=F("FileList"),Q=F("URLSearchParams"),[Z,Y,ee,te]=["ReadableStream","Request","Response","Headers"].map(F);function ne(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),D(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(q(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function re(e,t){if(q(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ie=e=>!I(e)&&e!==oe,se=(ae="undefined"!=typeof Uint8Array&&x(Uint8Array),e=>ae&&e instanceof ae);var ae;const ce=F("HTMLFormElement"),ue=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),le=F("RegExp"),de=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ne(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)},fe=F("AsyncFunction"),pe=(he="function"==typeof setImmediate,me=J(oe.postMessage),he?setImmediate:me?(ge=`axios@${Math.random()}`,be=[],oe.addEventListener("message",({source:e,data:t})=>{e===oe&&t===ge&&be.length&&be.shift()()},!1),e=>{be.push(e),oe.postMessage(ge,"*")}):e=>setTimeout(e));var he,me,ge,be;const ye="undefined"!=typeof queueMicrotask?queueMicrotask.bind(oe):"undefined"!=typeof process&&process.nextTick||pe,we={isArray:D,isArrayBuffer:z,isBuffer:q,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||J(e.append)&&("formdata"===(t=P(e))||"object"===t&&J(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&z(e.buffer),t},isString:M,isNumber:$,isBoolean:e=>!0===e||!1===e,isObject:H,isPlainObject:W,isEmptyObject:e=>{if(!H(e)||q(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Z,isRequest:Y,isResponse:ee,isHeaders:te,isUndefined:I,isDate:V,isFile:K,isBlob:X,isRegExp:le,isFunction:J,isStream:e=>H(e)&&J(e.pipe),isURLSearchParams:Q,isTypedArray:se,isFileList:G,forEach:ne,merge:function e(){const{caseless:t,skipUndefined:n}=ie(this)&&this||{},r={},o=(o,i)=>{const s=t&&re(r,i)||i;W(r[s])&&W(o)?r[s]=e(r[s],o):W(o)?r[s]=e({},o):D(o)?r[s]=o.slice():n&&I(o)||(r[s]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ne(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(ne(t,(t,r)=>{n&&J(t)?e[r]=C(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&x(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:P,kindOfTest:F,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(D(e))return e;let t=e.length;if(!$(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[N]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:ce,hasOwnProperty:ue,hasOwnProp:ue,reduceDescriptors:de,freezeMethods:e=>{de(e,(t,n)=>{if(J(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];J(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return D(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:re,global:oe,isContextDefined:ie,isSpecCompliantForm:function(e){return!!(e&&J(e.append)&&"FormData"===e[U]&&e[N])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(H(e)){if(t.indexOf(e)>=0)return;if(q(e))return e;if(!("toJSON"in e)){t[r]=e;const o=D(e)?[]:{};return ne(e,(e,t)=>{const i=n(e,r+1);!I(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:fe,isThenable:e=>e&&(H(e)||J(e))&&J(e.then)&&J(e.catch),setImmediate:pe,asap:ye,isIterable:e=>null!=e&&J(e[N])};function _e(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}we.inherits(_e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:we.toJSONObject(this.config),code:this.code,status:this.status}}});const Ee=_e.prototype,Se={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Se[e]={value:e}}),Object.defineProperties(_e,Se),Object.defineProperty(Ee,"isAxiosError",{value:!0}),_e.from=(e,t,n,r,o,i)=>{const s=Object.create(Ee);we.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return _e.call(s,a,c,n,r,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};const ve=_e;function Oe(e){return we.isPlainObject(e)||we.isArray(e)}function Re(e){return we.endsWith(e,"[]")?e.slice(0,-2):e}function Te(e,t,n){return e?e.concat(t).map(function(e,t){return e=Re(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const ke=we.toFlatObject(we,{},null,function(e){return/^is[A-Z]/.test(e)}),Ae=function(e,t,n){if(!we.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=we.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!we.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&we.isSpecCompliantForm(t);if(!we.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(we.isDate(e))return e.toISOString();if(we.isBoolean(e))return e.toString();if(!a&&we.isBlob(e))throw new ve("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(e)||we.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(we.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(we.isArray(e)&&function(e){return we.isArray(e)&&!e.some(Oe)}(e)||(we.isFileList(e)||we.endsWith(n,"[]"))&&(a=we.toArray(e)))return n=Re(n),a.forEach(function(e,r){!we.isUndefined(e)&&null!==e&&t.append(!0===s?Te([n],r,i):null===s?n:n+"[]",c(e))}),!1;return!!Oe(e)||(t.append(Te(o,n,i),c(e)),!1)}const l=[],d=Object.assign(ke,{defaultVisitor:u,convertValue:c,isVisitable:Oe});if(!we.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!we.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),we.forEach(n,function(n,i){!0===(!(we.isUndefined(n)||null===n)&&o.call(t,n,we.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),l.pop()}}(e),t};function Ce(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function je(e,t){this._pairs=[],e&&Ae(e,this,t)}const xe=je.prototype;xe.append=function(e,t){this._pairs.push([e,t])},xe.toString=function(e){const t=e?function(t){return e.call(this,t,Ce)}:Ce;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const Ne=je;function Ue(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pe(e,t,n){if(!t)return e;const r=n&&n.encode||Ue;we.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):we.isURLSearchParams(t)?t.toString():new Ne(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Le=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){we.forEach(this.handlers,function(t){null!==t&&e(t)})}},Fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Be={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ne,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},De="undefined"!=typeof window&&"undefined"!=typeof document,Ie="object"==typeof navigator&&navigator||void 0,qe=De&&(!Ie||["ReactNative","NativeScript","NS"].indexOf(Ie.product)<0),ze="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Me=De&&window.location.href||"http://localhost",Je={...t,...Be},$e=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&we.isArray(r)?r.length:i,a?(we.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&we.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&we.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(we.isFormData(e)&&we.isFunction(e.entries)){const n={};return we.forEachEntry(e,(e,r)=>{t(function(e){return we.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null},He={transitional:Fe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=we.isObject(e);if(o&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return r?JSON.stringify($e(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e)||we.isReadableStream(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ae(e,new Je.classes.URLSearchParams,{visitor:function(e,t,n,r){return Je.isNode&&we.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=we.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Ae(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(we.isString(e))try{return(0,JSON.parse)(e),we.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||He.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(we.isResponse(e)||we.isReadableStream(e))return e;if(e&&we.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw ve.from(e,ve.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Je.classes.FormData,Blob:Je.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};we.forEach(["delete","get","head","post","put","patch"],e=>{He.headers[e]={}});const We=He,Ve=we.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ke=Symbol("internals");function Xe(e){return e&&String(e).trim().toLowerCase()}function Ge(e){return!1===e||null==e?e:we.isArray(e)?e.map(Ge):String(e)}function Qe(e,t,n,r,o){return we.isFunction(r)?r.call(this,t,n):(o&&(t=n),we.isString(t)?we.isString(r)?-1!==t.indexOf(r):we.isRegExp(r)?r.test(t):void 0:void 0)}class Ze{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Xe(t);if(!o)throw new Error("header name must be a non-empty string");const i=we.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ge(e))}const i=(e,t)=>we.forEach(e,(e,n)=>o(e,n,t));if(we.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(we.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ve[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(we.isObject(e)&&we.isIterable(e)){let n,r,o={};for(const t of e){if(!we.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?we.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Xe(e)){const n=we.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(we.isFunction(t))return t.call(this,e,n);if(we.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Xe(e)){const n=we.findKey(this,e);return!(!n||void 0===this[n]||t&&!Qe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Xe(e)){const o=we.findKey(n,e);!o||t&&!Qe(0,n[o],o,t)||(delete n[o],r=!0)}}return we.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Qe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return we.forEach(this,(r,o)=>{const i=we.findKey(n,o);if(i)return t[i]=Ge(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=Ge(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return we.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&we.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Ke]=this[Ke]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Xe(e);t[r]||(function(e,t){const n=we.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return we.isArray(e)?e.forEach(r):r(e),this}}Ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),we.reduceDescriptors(Ze.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),we.freezeMethods(Ze);const Ye=Ze;function et(e,t){const n=this||We,r=t||n,o=Ye.from(r.headers);let i=r.data;return we.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function tt(e){return!(!e||!e.__CANCEL__)}function nt(e,t,n){ve.call(this,null==e?"canceled":e,ve.ERR_CANCELED,t,n),this.name="CanceledError"}we.inherits(nt,ve,{__CANCEL__:!0});const rt=nt;function ot(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ve("Request failed with status code "+n.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const it=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,c=o(a);r=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},st=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>we.asap(()=>e(...t)),ct=Je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Je.origin),Je.navigator&&/(msie|trident)/i.test(Je.navigator.userAgent)):()=>!0,ut=Je.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];we.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),we.isString(r)&&a.push(`path=${r}`),we.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),we.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function lt(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const dt=e=>e instanceof Ye?{...e}:e;function ft(e,t){t=t||{};const n={};function r(e,t,n,r){return we.isPlainObject(e)&&we.isPlainObject(t)?we.merge.call({caseless:r},e,t):we.isPlainObject(t)?we.merge({},t):we.isArray(t)?t.slice():t}function o(e,t,n,o){return we.isUndefined(t)?we.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!we.isUndefined(t))return r(void 0,t)}function s(e,t){return we.isUndefined(t)?we.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(dt(e),dt(t),0,!0)};return we.forEach(Object.keys({...e,...t}),function(r){const i=c[r]||o,s=i(e[r],t[r],r);we.isUndefined(s)&&i!==a||(n[r]=s)}),n}const pt=e=>{const t=ft({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=Ye.from(s),t.url=Pe(lt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),we.isFormData(n))if(Je.hasStandardBrowserEnv||Je.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(we.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(Je.hasStandardBrowserEnv&&(r&&we.isFunction(r)&&(r=r(t)),r||!1!==r&&ct(t.url))){const e=o&&i&&ut.read(i);e&&s.set(o,e)}return t},ht="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=pt(e);let o=r.data;const i=Ye.from(r.headers).normalize();let s,a,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Ye.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());ot(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new ve("Request aborted",ve.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new ve(r,ve.ERR_NETWORK,e,m);o.event=t||null,n(o),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Fe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ve(t,o.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&we.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),we.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([c,l]=it(p,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,u]=it(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new rt(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===Je.protocols.indexOf(b)?n(new ve("Unsupported protocol "+b+":",ve.ERR_BAD_REQUEST,e)):m.send(o||null)})},mt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ve?t:new rt(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new ve(`timeout ${t} of ms exceeded`,ve.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>we.asap(s),a}},gt=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},bt=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*gt(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:yt}=we,wt=(({Request:e,Response:t})=>({Request:e,Response:t}))(we.global),{ReadableStream:_t,TextEncoder:Et}=we.global,St=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},vt=e=>{e=we.merge.call({skipUndefined:!0},wt,e);const{fetch:t,Request:n,Response:r}=e,o=t?yt(t):"function"==typeof fetch,i=yt(n),s=yt(r);if(!o)return!1;const a=o&&yt(_t),c=o&&("function"==typeof Et?(u=new Et,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=i&&a&&St(()=>{let e=!1;const t=new n(Je.origin,{body:new _t,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&a&&St(()=>we.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new ve(`Response type '${e}' is not supported`,ve.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:s,data:a,signal:u,cancelToken:p,timeout:h,onDownloadProgress:m,onUploadProgress:g,responseType:b,headers:y,withCredentials:w="same-origin",fetchOptions:_}=pt(e),E=t||fetch;b=b?(b+"").toLowerCase():"text";let S=mt([u,p&&p.toAbortSignal()],h),v=null;const O=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let R;try{if(g&&l&&"get"!==s&&"head"!==s&&0!==(R=await(async(e,t)=>{const r=we.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(we.isBlob(e))return e.size;if(we.isSpecCompliantForm(e)){const t=new n(Je.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return we.isArrayBufferView(e)||we.isArrayBuffer(e)?e.byteLength:(we.isURLSearchParams(e)&&(e+=""),we.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(y,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(we.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=st(R,it(at(g)));a=bt(t.body,65536,e,n)}}we.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in n.prototype,u={..._,signal:S,method:s.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?w:void 0};v=i&&new n(o,u);let p=await(i?E(v,_):E(o,u));const h=d&&("stream"===b||"response"===b);if(d&&(m||h&&O)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=we.toFiniteNumber(p.headers.get("content-length")),[n,o]=m&&st(t,it(at(m),!0))||[];p=new r(bt(p.body,65536,n,()=>{o&&o(),O&&O()}),e)}b=b||"text";let T=await f[we.findKey(f,b)||"text"](p,e);return!h&&O&&O(),await new Promise((t,n)=>{ot(t,n,{data:T,headers:Ye.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:v})})}catch(t){if(O&&O(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ve("Network Error",ve.ERR_NETWORK,e,v),{cause:t.cause||t});throw ve.from(t,t&&t.code,e,v)}}},Ot=new Map,Rt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,c=i.length,u=Ot;for(;c--;)s=i[c],a=u.get(s),void 0===a&&u.set(s,a=c?new Map:vt(t)),u=a;return a},Tt=(Rt(),{http:null,xhr:ht,fetch:{get:Rt}});we.forEach(Tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const kt=e=>`- ${e}`,At=e=>we.isFunction(e)||null===e||!1===e,Ct=function(e,t){e=we.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],o=r,!At(r)&&(o=Tt[(n=String(r)).toLowerCase()],void 0===o))throw new ve(`Unknown adapter '${n}'`);if(o&&(we.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(kt).join("\n"):" "+kt(e[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o};function jt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rt(null,e)}function xt(e){return jt(e),e.headers=Ye.from(e.headers),e.data=et.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ct(e.adapter||We.adapter,e)(e).then(function(t){return jt(e),t.data=et.call(e,e.transformResponse,t),t.headers=Ye.from(t.headers),t},function(t){return tt(t)||(jt(e),t&&t.response&&(t.response.data=et.call(e,e.transformResponse,t.response),t.response.headers=Ye.from(t.response.headers))),Promise.reject(t)})}const Nt="1.13.2",Ut={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ut[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Pt={};Ut.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Nt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new ve(r(o," has been removed"+(t?" in "+t:"")),ve.ERR_DEPRECATED);return t&&!Pt[o]&&(Pt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Ut.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Lt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new ve("option "+i+" must be "+n,ve.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new ve("Unknown option "+i,ve.ERR_BAD_OPTION)}},validators:Ut},Ft=Lt.validators;class Bt{constructor(e){this.defaults=e||{},this.interceptors={request:new Le,response:new Le}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ft(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Lt.assertOptions(n,{silentJSONParsing:Ft.transitional(Ft.boolean),forcedJSONParsing:Ft.transitional(Ft.boolean),clarifyTimeoutError:Ft.transitional(Ft.boolean)},!1),null!=r&&(we.isFunction(r)?t.paramsSerializer={serialize:r}:Lt.assertOptions(r,{encode:Ft.function,serialize:Ft.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Lt.assertOptions(t,{baseUrl:Ft.spelling("baseURL"),withXsrfToken:Ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&we.merge(o.common,o[t.method]);o&&we.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Ye.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[xt.bind(this),void 0];for(e.unshift(...s),e.push(...c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let f=t;for(;d<l;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=xt.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return Pe(lt((e=ft(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}we.forEach(["delete","get","head","options"],function(e){Bt.prototype[e]=function(t,n){return this.request(ft(n||{},{method:e,url:t,data:(n||{}).data}))}}),we.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(ft(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Bt.prototype[e]=t(),Bt.prototype[e+"Form"]=t(!0)});const Dt=Bt;class It{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new rt(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new It(function(t){e=t}),cancel:e}}}const qt=It,zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zt).forEach(([e,t])=>{zt[t]=e});const Mt=zt,Jt=function e(t){const n=new Dt(t),r=C(Dt.prototype.request,n);return we.extend(r,Dt.prototype,n,{allOwnKeys:!0}),we.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ft(t,n))},r}(We);Jt.Axios=Dt,Jt.CanceledError=rt,Jt.CancelToken=qt,Jt.isCancel=tt,Jt.VERSION=Nt,Jt.toFormData=Ae,Jt.AxiosError=ve,Jt.Cancel=Jt.CanceledError,Jt.all=function(e){return Promise.all(e)},Jt.spread=function(e){return function(t){return e.apply(null,t)}},Jt.isAxiosError=function(e){return we.isObject(e)&&!0===e.isAxiosError},Jt.mergeConfig=ft,Jt.AxiosHeaders=Ye,Jt.formToJSON=e=>$e(we.isHTMLForm(e)?new FormData(e):e),Jt.getAdapter=Ct,Jt.HttpStatusCode=Mt,Jt.default=Jt;const $t=Jt.create({baseURL:"https://stg-tag-api.kuzen.io"}),Ht=({url:e,params:t,data:n,headers:r})=>(({url:e,method:t,params:n,data:r,headers:o={}})=>$t({url:e,method:t,params:n,data:r,headers:{...o,"Access-Control-Allow-Origin":"*"}}).then(e=>Wt(e.data,e)).catch(e=>Vt(e)))({url:e,params:t,data:n,method:"POST",headers:r}),Wt=e=>Promise.resolve(e),Vt=e=>{let t="Something went wrong";return e.response&&e.response.data&&(e.response.data.error||e.response.data.message),Promise.reject(e)},Kt=({tag_tracking_code:e,line_id:t})=>{const n={tag_tracking_code:e};return t&&(n.line_id=t),Ht({url:"/api/v1/users",data:n})},Xt=e=>Ht({url:"/api/v1/actions",data:e}),Gt=()=>{if(String(R()).includes("visit")&&S()&&"2"===T()){const e=k((e=>{const t={...e},n=d();if(n.length>1&&v()){const e=n.filter(e=>e.original_service_id===f().original_service_id);e.length>1&&e.findIndex(e=>e.tag_tracking_code===p())>0&&(t.main_prevent_visit_counting=1)}return t})({action_type:"visit"}));Xt(A(e))}},Qt=()=>{if(String(R()).includes("start_chat")&&S()&&"2"===(f().blockedStartChatEventDataToServer||"2")&&"2"===T()){w(!0);const e=k({action_type:"start_chat",main_prevent_visit_counting:1});Xt(A(e))}},Zt=e=>{if(String(R()).includes("leave")&&e&&"2"===T()){const e=new WebSocket(`wss://stg-tag-api.kuzen.io/cable?user_id=${S()}`),t=k({action_type:"leave"});e.onopen=()=>{e.send(JSON.stringify({command:"subscribe",identifier:'{"channel":"LeaveTrackingChannel"}'}));const n={command:"message",data:(()=>{const e={action:"speak",leave_info:A(t)};return JSON.stringify(e)})(),identifier:JSON.stringify({channel:"LeaveTrackingChannel"})};setInterval(()=>{e.send(JSON.stringify(n))},1e3)}}window.onbeforeunload=function(e){socket.readyState==WebSocket.OPEN&&socket.close()}};(e=>{b([]),w(!1);const t=c("line_id")||v(),n=c("kuzen")||localStorage.getItem("kuzen")||"";(e=>{if(!f().tag_tracking_code&&e){const t={tag_tracking_code:e};l([...d(),t])}})(u());const r=(()=>{try{const{src:e}=document.currentScript,t=new URL(e).searchParams.get("isLineChatApplication")||"";return t.includes(" ")?t.replaceAll(" ","+"):t}catch{return""}})(),o=document.currentScript.innerHTML;if(o.includes("filter_request(true)")&&r||_(!1),window.kuzen_tag={track:e=>{(e=>{const t=f();t.track=e.toString(),l([...d()].map(e=>e.tag_tracking_code===p()?t:e))})(e)},set_custom_values:(e,t)=>{b([{key:e,value:t},...E()])},filter_request:e=>{r&&(t||"true"===n||O()&&O()===S()?_(!1):_(e))},send:e=>{"visit"===e&&Gt()},set_block_auto_sending_visit_event:e=>{(e=>{const t=f();t.blockedAutoSendingVisitEvent=e?"1":"2",l([...d()].map(e=>e.tag_tracking_code===p()?t:e))})(e)}},new Function(o)(),!p()||c("user_id")||S())if(p()&&t&&t!==v()){const r={tag_tracking_code:p(),line_id:t};Kt({...r}).then(r=>{r?.user_id&&(h(r.user_id),y(r.original_service_id),Zt(r.user_id),m(t),g(n),e())})}else c("user_id")?(h(c("user_id")),Zt(c("user_id")),m(t),g(n),e()):S()&&(Zt(S()),m(t),g(n),e());else{const r={tag_tracking_code:p(),line_id:t};Kt({...r}).then(r=>{r?.user_id&&(h(r.user_id),y(r.original_service_id),Zt(r.user_id),m(t),g(n),e())})}})(()=>{var e;(e=document.body)&&e.getElementsByTagName&&("2"===(f().blockedAutoSendingVisitEvent||"2")&&Gt(),window.addEventListener("message",function(e){"cu:web_plugin:mounted"===e.data.action&&document.getElementById("web_plugin_open_button").addEventListener("click",function(){Qt()})}),setTimeout(()=>{const e=document.getElementById("web_plugin_open_button");e&&e.addEventListener("click",function(){Qt()})},500))})})();