1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7940],{66477:function(e,t){"use strict";self.Headers,self.Request,self.Response,self.fetch},90709:function(e,t){var n,r;void 0!==(n="function"==typeof(r=function(){var e=function e(t){function n(e,t){return e>>>t|e<<32-t}for(var r,i,o=Math.pow,a=o(2,32),s="length",c="",u=[],l=8*t[s],f=e.h=e.h||[],d=e.k=e.k||[],h=d[s],p={},v=2;h<64;v++)if(!p[v]){for(r=0;r<313;r+=v)p[r]=v;f[h]=o(v,.5)*a|0,d[h++]=o(v,1/3)*a|0}for(t+="\x80";t[s]%64-56;)t+="\x00";for(r=0;r<t[s];r++){if((i=t.charCodeAt(r))>>8)return;u[r>>2]|=i<<(3-r)%4*8}for(i=0,u[u[s]]=l/a|0,u[u[s]]=l;i<u[s];){var g=u.slice(i,i+=16),m=f;for(r=0,f=f.slice(0,8);r<64;r++){var w=g[r-15],b=g[r-2],y=f[0],I=f[4],S=f[7]+(n(I,6)^n(I,11)^n(I,25))+(I&f[5]^~I&f[6])+d[r]+(g[r]=r<16?g[r]:g[r-16]+(n(w,7)^n(w,18)^w>>>3)+g[r-7]+(n(b,17)^n(b,19)^b>>>10)|0);(f=[S+((n(y,2)^n(y,13)^n(y,22))+(y&f[1]^y&f[2]^f[1]&f[2]))|0].concat(f))[4]=f[4]+S|0}for(r=0;r<8;r++)f[r]=f[r]+m[r]|0}for(r=0;r<8;r++)for(i=3;i+1;i--){var C=f[r]>>8*i&255;c+=(C<16?0:"")+C.toString(16)}return c};return e.code='var sha256=function a(b){function c(a,b){return a>>>b|a<<32-b}for(var d,e,f=Math.pow,g=f(2,32),h="length",i="",j=[],k=8*b[h],l=a.h=a.h||[],m=a.k=a.k||[],n=m[h],o={},p=2;64>n;p++)if(!o[p]){for(d=0;313>d;d+=p)o[d]=p;l[n]=f(p,.5)*g|0,m[n++]=f(p,1/3)*g|0}for(b+="\\x80";b[h]%64-56;)b+="\\x00";for(d=0;d<b[h];d++){if(e=b.charCodeAt(d),e>>8)return;j[d>>2]|=e<<(3-d)%4*8}for(j[j[h]]=k/g|0,j[j[h]]=k,e=0;e<j[h];){var q=j.slice(e,e+=16),r=l;for(l=l.slice(0,8),d=0;64>d;d++){var s=q[d-15],t=q[d-2],u=l[0],v=l[4],w=l[7]+(c(v,6)^c(v,11)^c(v,25))+(v&l[5]^~v&l[6])+m[d]+(q[d]=16>d?q[d]:q[d-16]+(c(s,7)^c(s,18)^s>>>3)+q[d-7]+(c(t,17)^c(t,19)^t>>>10)|0),x=(c(u,2)^c(u,13)^c(u,22))+(u&l[1]^u&l[2]^l[1]&l[2]);l=[w+x|0].concat(l),l[4]=l[4]+w|0}for(d=0;8>d;d++)l[d]=l[d]+r[d]|0}for(d=0;8>d;d++)for(e=3;e+1;e--){var y=l[d]>>8*e&255;i+=(16>y?0:"")+y.toString(16)}return i};',e})?r.apply(t,[]):r)&&(e.exports=n)},37940:function(e,t,n){"use strict";n.d(t,{Z:function(){return rz}}),n(66477);var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function s(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,(f=d||(d={}))[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR";var f,d,h,p=new(function(){function e(e){void 0===e&&(e=d.INFO),this.logLevel=e,this._debug=console.debug,this._info=console.info,this._warn=console.warn,this._error=console.error}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=d.DEBUG&&(e.unshift("[DEBUG]"),this._debug.apply(this,l([],u(e),!1)))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=d.INFO&&(e.unshift("[INFO]"),this._info.apply(this,l([],u(e),!1)))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=d.WARN&&(e.unshift("[WARN]"),this._warn.apply(this,l([],u(e),!1)))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<=d.ERROR&&(e.unshift("[ERROR]"),this._error.apply(this,l([],u(e),!1)))},e}())(Number("3")),v=function(e,t){this._driver=e,this.liff=t,this.hooks=this._driver.hooks,this.internalHooks=this._driver.internalHooks},g=function(e,t){this._driver=e,this.liff=t,this.hooks=this._driver.hooks},m=function(){function e(e,t){this.pluginCtx=new g(e,t),this.moduleCtx=new v(e,t)}return Object.defineProperty(e.prototype,"pluginContext",{get:function(){return this.pluginCtx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moduleContext",{get:function(){return this.moduleCtx},enumerable:!1,configurable:!0}),e}(),w=function(){function e(){this.modules=new Map,this.hooks={},this.internalHooks={}}return e.prototype.addModule=function(e,t){this.modules.set(e,t),t.hooks&&(this.hooks[e]=Object.entries(t.hooks).reduce(function(e,t){var n,r=u(t,2),i=r[0],a=r[1];return o(o({},e),((n={})[i]=a.on.bind(a),n))},{})),"internalHooks"in t&&t.internalHooks&&(this.internalHooks[e]=Object.entries(t.internalHooks).reduce(function(e,t){var n,r=u(t,2),i=r[0],a=r[1];return o(o({},e),((n={})[i]=a.on.bind(a),n))},{}))},e.prototype.hasModule=function(e){return this.modules.has(e)},e}(),b=function(){},y=function(e){return e instanceof b},I=function(e){function t(t,n,r){var i=e.call(this)||this;return i.driver=t,i.contextHolder=n,i.option=r,i}return i(t,e),t.prototype.install=function(){return this.factory(this.driver,this.contextHolder)},Object.defineProperty(t.prototype,"name",{get:function(){return"use"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultOption",{get:function(){return{namespacePrefix:"$"}},enumerable:!1,configurable:!0}),t.prototype.factory=function(e,t){var n=Object.assign({},this.defaultOption,this.option).namespacePrefix;return function(r,i){if(!r||"function"!=typeof r.install||"string"!=typeof r.name)return p.warn("To install the plugin, you need to define the `name` property and the `install` method."),this;var o=y(r)?r.name:"".concat(n).concat(r.name);if(e.hasModule(o))return this;var a=y(r)?r.install.call(r,t.moduleContext,i):r.install.call(r,t.pluginContext,i);return this["".concat(o)]?(p.warn("There is a duplicate plugin name. `".concat(o,"` plugin namespace will be override.")),this["".concat(o)]=a):void 0!==a&&(this["".concat(o)]=a),e.addModule(o,r),this}},t}(b),S=new Promise(function(e){h=e}),C="UNKNOWN",E="UNAUTHORIZED",T="INVALID_ARGUMENT",k="INIT_FAILED",O="FORBIDDEN",P="INVALID_CONFIG",_="INVALID_ID_TOKEN",L="UNSPECIFIED",A="CREATE_SUBWINDOW_FAILED",F="EXCEPTION_IN_SUBWINDOW",x="liffEvent",N="LIFF_STORE",R="https://liff.".concat("line.me","/"),j="https://miniapp.".concat("line.me","/"),U={ACCESS_TOKEN:"accessToken",ID_TOKEN:"IDToken",DECODED_ID_TOKEN:"decodedIDToken",FEATURE_TOKEN:"featureToken",LOGIN_TMP:"loginTmp",CONFIG:"
1config",CONTEXT:"context",EXPIRES:"expires",RAW_CONTEXT:"rawContext",CLIENT_ID:"clientId",IS_SUBSEQUENT_LIFF_APP:"isSubsequentLiffApp",MST_CHALLENGE:"mstChallenge",MSIT:"msit",MST:"mst",MST_VERIFIER:"mstVerifier",APP_DATA:"appData"},D="isInClient",M=["context_token","feature_token","access_token","id_token","client_id","mst_verifier","mst_challenge","msit"],B=["liff.ref.source","liff.ref.medium","liff.ref.campaign","liff.ref.term","liff.ref.content"],W={INIT:"init",SUBMIT:"submit",CANCEL:"cancel",CLOSE:"close",ERROR:"error"},H="liff.subwindow",V="healthCheck",G=["profile","chat_message.write","openid","email"];function K(e){return window.atob(e.replace(/-/g,"+").replace(/_/g,"/"))}var J={decode:K,encode:function(e){return window.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},decodeUnicode:function(e){return decodeURIComponent(K(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}};function q(e,t){if(e===t)return 0;for(var n=e.split("."),r=t.split("."),i=Math.max(n.length,r.length),o=0;o<i;o++){n[o]||(n[o]="0"),r[o]||(r[o]="0");var a=parseInt(n[o])-parseInt(r[o]);if(0!==a)return a>0?1:-1}return 0}function z(e){var t=e.replace("#","").match(/.{2}/g)||[];if(4!==t.length)return p.warn("convertArgbToRgba: Received invalid ARGB color"),"";var n=Math.round($(t[0])/255*100)/100,r=$(t[1]),i=$(t[2]),o=$(t[3]);return"rgba(".concat(r,", ").concat(i,", ").concat(o,", ").concat(n,")")}function $(e){return parseInt(e,16)}function X(e){var t=e.replace("#","").match(/.{2}/g)||[];if(3!==t.length)return p.warn("convertArgbToRgba: Received invalid hex color"),"";var n=$(t[0]),r=$(t[1]),i=$(t[2]);return"".concat(n,", ").concat(r,", ").concat(i)}function Q(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}var Y={get:function(e){var t=RegExp("(?:(?:^|.*;\\s*)".concat(e,"\\s*\\=\\s*([^;]*).*$)|^.*$"));return document.cookie.replace(t,"$1")},set:function(e,t,n){var r=e+"="+t;if(n)for(var i in n){var o=n[i]?"=".concat(n[i]):"";r+="; ".concat(i).concat(o)}p.debug("set cookie",r),document.cookie=r},remove:function(e,t){var n="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT");if(t)for(var r in t)n+="; ".concat(r,"=").concat(t[r]);document.cookie=n}},Z=new Set(["400","401","403","404","429","500"]),ee=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.code=t,i}return i(t,e),t}(Error);function et(e,t,n){return(null==n?void 0:n.cause)&&console.error("This is the cause of LiffError described below.",n.cause),new ee(e,t||"",n||{})}function en(e){var t=e.match(/([^-]+)-[^-]+/);return t&&t[1]}var er,ei=function(){function e(){this.map={}}return e.prototype.clear=function(){this.map={}},e.prototype.getItem=function(e){var t=this.map[e];return void 0===t?null:t},e.prototype.setItem=function(e,t){this.map[e]=t},e.prototype.removeItem=function(e){delete this.map[e]},e.prototype.key=function(e){var t=Object.keys(this.map)[e];return void 0===t?null:t},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.map).length},enumerable:!1,configurable:!0}),e}(),eo={parse:function(e){return e.replace(/^\?/,"").replace(/^#\/?/,"").split(/&+/).filter(function(e){return e.length>0}).reduce(function(e,t){var n=u(t.split("=").map(decodeURIComponent),2),r=n[0],i=n[1],o=e[r];return Array.isArray(o)?o.push(i):Object.prototype.hasOwnProperty.call(e,r)?e[r]=[o,i]:e[r]=i,e},{})},stringify:function(e){return Object.keys(e).map(function(t){var n=e[t],r=function(e){return void 0!==e?"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e)):encodeURIComponent(t)};return Array.isArray(n)?n.map(function(e){return r(e)}).join("&"):r(n)}).join("&")}};function ea(e){for(var t="",n=0;n<e;n++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[Math.floor(62*(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967296))];return t}function es(e){var t=new URL(e),n=t.hash.slice(1).split("&").filter(function(e){return!M.some(function(t){return e.startsWith("".concat(t,"="))})}).join("&");return t.hash=n,t.toString()}var ec=function(e){var t=(n=es(e),Array.from((r=new URL(n)).searchParams.keys()).forEac
1h(function(e){e.startsWith("liff.utm_")&&r.searchParams.delete(e)}),r.toString());if(t!==e){var n,r,i,o,a,s=(i=new URL(t)).toString().replace(RegExp(String.raw(el||(o=["^",""],a=["^",""],Object.defineProperty?Object.defineProperty(o,"raw",{value:a}):o.raw=a,el=o),i.origin)),"");window.history.replaceState(history.state,"",s)}};function eu(e,t){if(!e)throw Error("addParamsToUrl: invalid URL");var n=new URL(e);return Object.entries(t).forEach(function(e){var t=u(e,2),r=t[0],i=t[1];n.searchParams.set(r,i)}),n.toString()}var el,ef=((er={})[R]=function(){var e=eh(R);return RegExp("^".concat(e,"(\\d+-\\w+)"))},er[j]=function(){var e=eh(j);return RegExp("^".concat(e,"((\\d+-\\w+)|(\\w+$))"))},er);function ed(e){for(var t in ef){var n=e.match(ef[t]());if(n)return n[1]}return null}function eh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ep(e){return e.startsWith("line:")}function ev(e){return void 0===e&&(e=window.navigator.userAgent),/ipad/.test(e.toLowerCase())}function eg(e){return void 0===e&&(e=window.navigator.userAgent),/Line\/\d+\.\d+\.\d+/.test(e)}function em(e){return void 0===e&&(e=window.navigator.userAgent),/Line\/\d+\.\d+\.\d+ LIFF/.test(e)}var ew=function(){return"undefined"==typeof window};function eb(e,t,n){return a(this,void 0,void 0,function(){var r,i;return s(this,function(o){switch(o.label){case 0:i=new Promise(function(e,i){r=setTimeout(function(){null==n||n.abort(),i(Error("Operation timed out after ".concat(t,"ms")))},t)}),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,Promise.race([e,i])];case 2:return[2,o.sent()];case 3:return void 0!==r&&clearTimeout(r),[7];case 4:return[2]}})})}var ey=null;function eI(){return null===ey&&(ey=em()||eg()&&/[#|&]access_token=/.test(location.hash)||"1"===sessionStorage.getItem("".concat(N,":").concat(D)),sessionStorage.setItem("".concat(N,":").concat(D),ey?"1":"0")),!!ey}function eS(){var e;return null!==(e=window.__liffConfig)&&void 0!==e?e:{}}function eC(e){return function(e,t){if(!t)throw et(P,"liffId is necessary for liff.init()");var n=(eI()?sessionStorage:localStorage).getItem("".concat(N,":").concat(t,":").concat(e));try{return null===n?null:JSON.parse(n)}catch(e){return null}}(e,eS().liffId)}function eE(e,t){var n=eS().liffId;if(!n)throw et(P,"liffId is necessary for liff.init()");(eI()?sessionStorage:localStorage).setItem("".concat(N,":").concat(n,":").concat(e),JSON.stringify(t))}function eT(){return eC(U.CONTEXT)}function ek(e){eE(U.CONTEXT,e)}function eO(){return((eT()||{}).d||{}).aId}function eP(){return((eT()||{}).d||{}).autoplay||!1}function e_(){return(eT()||{}).profilePlus}function eL(e){eE(U.APP_DATA,e)}function eA(){return eC(U.MST)}function eF(){return eC(U.MST_CHALLENGE)}function ex(){return eC(U.CLIENT_ID)}function eN(e){eE(U.CLIENT_ID,e)}function eR(){return eC(U.FEATURE_TOKEN)}function ej(e){eE(U.FEATURE_TOKEN,e)}function eU(){return eC(U.ID_TOKEN)}function eD(e){eE(U.ID_TOKEN,e)}function eM(){return eC(U.ACCESS_TOKEN)}function eB(e){eE(U.ACCESS_TOKEN,e)}function eW(e){var t=eS().liffId;if(!t)throw et(P,"liffId is necessary for liff.init()");(eI()?sessionStorage:localStorage).removeItem("".concat(N,":").concat(t,":").concat(e))}function eH(){return eC(U.LOGIN_TMP)}function eV(){eW(U.LOGIN_TMP)}function eG(e){var t=eS();Y.set("".concat(N,":").concat(U.EXPIRES,":").concat(t.liffId),e.getTime(),{expires:e.toUTCString(),path:"/",secure:null})}function eK(){return eC(U.DECODED_ID_TOKEN)}function eJ(e){eE(U.DECODED_ID_TOKEN,e)}function eq(){return!!eM()}function ez(){return"2.29.1"}function e$(){var e=navigator.userAgent.match(/Line\/\d+(\.\d+)*/i);return e?e[0].slice(5):null}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"isInClient"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eI()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getContext"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eT()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getAId"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eO()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getIsVideoAutoPlay"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eP()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getProfilePlus"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return e_()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getIDToken"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eU()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getAccessToken"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eM()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getDecodedIDToken"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eK()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"isLoggedIn"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eq()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getVersion"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return"2.29.1"}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getLineVersion"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return e$()}}}(b);var eX=function(){function e(){}return e.prototype.invoke=function(){var e;return void 0===e&&(e=window.navigator.userAgent),/LIFF\/SubWindow/.test(e)},e}(),eQ=function(){function e(e){this.storage=e}return Object.defineProperty(e,"IN_SUB_WINDOW_KEY",{get:function(){return"inSubWindow"},enumerable:!1,configurable:!0}),e.prototype.invoke=function(){return new URLSearchParams(window.location.search).has(H)&&this.setInSubWindow(!0),!(!this.getInSubWindow()&&!this.getSubWindowIdentifier())},e.prototype.getInSubWindow=function(){var t=this.storage.getItem("".concat(N,":").concat(this.getLiffId(),":").concat(e.IN_SUB_WINDOW_KEY));return null!==t&&JSON.parse(t)},e.prototype.getSubWindowIdentifier=function(){var e,t="liff.subwindow.identifier",n=new URLSearchParams(window.location.search);return n.get(t)||((e=n.get("liff.state"))?new URLSearchParams(e).get(t):null)||null},e.prototype.setInSubWindow=function(t){this.storage.setItem("".concat(N,":").concat(this.getLiffId(),":").concat(e.IN_SUB_WINDOW_KEY),String(t))},e.prototype.getLiffId=function(){var e=eS().liffId;if(!e)throw et(P,"liffId is necessary for liff.init()");return e},e}(),eY=new(function(e){function t(){var t=e.call(this)||this;return ew()?t.impl={invoke:function(){return!1}}:eI()?t.impl=new eX:t.impl=new eQ(window.sessionStorage),t}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"isSubWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this.impl.invoke.bind(this.impl)},t}(b)),eZ=eY.install();function e0(){if(!tV){var e=window.navigator.userAgent.toLowerCase();tV=/iphone|ipad|ipod/.test(e)?"ios":/android/.test(e)?"android":"web"}return tV}function e1(e){var t,n=eT();return null===(t=null==n?void 0:n.availability)||void 0===t?void 0:t[e]}function e2(e,t,n){var r,i=e1(e),o=n||e;if(!i)return{available:!1,error:{code:O,message:"".concat(o," is not allowed in this LIFF app")}};var a=i.minVer,s=i.unsupportedFromVer,c=!a||!!(r=e$())&&!(s&&q(r,s)>0)&&q(r,a)>=0,u=eI();return u&&!c?{available:!1,error:{code:O,message:"".concat(o," is unavailable in this client version.")}}:i.permission?u&&c||t?{available:!0}:{available:!1,error:{code:O,message:"".concat(o," is not allowed in external browser")}}:{available:!1,error:{code:O,message:"".concat(o," is not allowed in this
1LIFF app")}}}!function(e){function t(){return e.call(this)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getOS"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return e0()}}}(b);var e4=function(){return eq()?!em()&&eg()?{available:!1,error:{code:O,message:"Subwindow is not supported in this browser"}}:eZ()?{available:!1,error:{code:O,message:"this api can be only called in parent window"}}:e2("subwindowOpen",!0):{available:!1,error:{code:E,message:"Need access_token for api call, Please login first"}}},e3=["subwindowOpen","shareTargetPicker","multipleLiffTransition","scanCode","scanCodeV2","getAdvertisingId","addToHomeScreen","bluetoothLeFunction","skipChannelVerificationScreen","createShortcutOnHomeScreen","internalCreateShortcutOnHomeScreen","iap","requestFriendship","activityGetCallState","activityGetRecordingState"],e6={scanCode:function(){return e2("scanCode")},getAdvertisingId:function(){return e2("getAdvertisingId")},bluetoothLeFunction:function(){return e2("bluetoothLeFunction")},shareTargetPicker:function(){return eZ()?{available:!1,error:{code:O,message:"this api can be only called
1in parent window"}}:eq()?e2("shareTargetPicker",!0):{available:!1,error:{code:E,message:"Need access_token for api call, Please login first"}}},multipleLiffTransition:function(){var e=e1("multipleLiffTransition");return e&&e.permission?eI()?{available:!0}:{available:!1,error:{code:O,message:"multipleLiffTransition is available only in the LINE App browser"}}:{available:!1,error:{code:O,message:"multipleLiffTransition is not allowed in this LIFF app"}}},subwindowOpen:e4,scanCodeV2:function(){if(!eq())return{available:!1,error:{code:E,message:"Need access_token for api call, Please login first"}};var e=e4();return e.available?e2("scanCodeV2",!0):e},addToHomeScreen:function(){return eZ()?{available:!1,error:{code:O,message:"this api can be only called in parent window"}}:e2("addToHomeScreen")},skipChannelVerificationScreen:function(){var e=eT();return e?"square_chat"===e.type?{available:!1,error:{code:O,message:"skipChannelVerificationScreen is not allowed in OpenChat"}}:e2("skipChannelVerificationScreen"):{available:!1,error:{code:O,message:"Context is not found"}}},createShortcutOnHomeScreen:function(){if(eZ())return{available:!1,error:{code:O,message:"this api can be only called
1in parent window"}};if(!eq())return{available:!1,error:{code:E,message:"Need access_token for api call, Please login first"}};var e=e0();return"android"!==e&&"ios"!==e?{available:!1,error:{code:O,message:"this api can be only called in mobile device"}}:e2("addToHomeV2",!0,"createShortcutOnHomeScreen")},internalCreateShortcutOnHomeScreen:function(){if(eZ())return{available:!1,error:{code:O,message:"this api can be only called in parent window"}};if(!eq())return{available:!1,error:{code:E,message:"Need access_token for api call, Please login first"}};var e=e0();if("android"!==e&&"ios"!==e)return{available:!1,error:{code:O,message:"this api can be only called in mobile device"}};var t=e2("addToHomeV2",!0,"internalCreateShortcutOnHomeScreen");return t.available?e2("addToHomeLineScheme",!0,"internalCreateShortcutOnHomeScreen"):t},iap:function(){return eI()?eq()?eZ()?{available:!1,error:{code:O,message:"this api can be only called in parent window"}}:e2("iap",!1,"In-App Purchase"):{available:!1,error:{code:E,message:"Need access_token for api call, Please login first"}}:{available:!1,error:{code:O,message:"In-App Purchase is not allowed in external browser"}}},requestFriendship:function(){if(!eq())return{available:!1,error:{code:E,message:"Need access_token for api call, Please login first"}};var e=eT();return(null==e?void 0:e.hasLinkedBot)?e4():{available:!1,error:{code:O,message:"requestFriendship requires a linked Official Account (bot) for this LIFF app"}}},activityGetCallState:function(){return e2("activityGetCallState",!1,"liff.activity.getCallState")},activityGetRecordingState:function(){return e2("activityGetRecordingState",!1,"liff.activity.getRecordingState")}},e5=function(e){return function(){var t=e();if(!t.available)throw et(t.error.code,t.error.message)}},e7={scanCode:e5(e6.scanCode),getAdvertisingId:e5(e6.getAdvertisingId),bluetoothLeFunction:e5(e6.bluetoothLeFunction),shareTargetPicker:e5(e6.shareTargetPicker),multipleLiffTransition:e5(e6.multipleLiffTransition),subwindowOpen:e5(e6.subwindowOpen),scanCodeV2:e5(e6.scanCodeV2),addToHomeScreen:e5(e6.addToHomeScreen),skipChannelVerificationScreen:e5(e6.skipChannelVerificationScreen),createShortcutOnHomeScreen:e5(e6.createShortcutOnHomeScreen),internalCreateShortcutOnHomeScreen:e5(e6.internalCreateShortcutOnHomeScreen),iap:e5(e6.iap),requestFriendship:e5(e6.requestFriendship),activityGetCallState:e5(e6.activityGetCallState),activityGetRecordingState:e5(e6.activityGetRecordingState)};function e8(e){if(!e3.some(function(t){return t===e}))throw et(T,"Unexpected API name.");var t=e6[e];return!t||t().available}!function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.hooks={},t}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"isApiAvailable"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(e){return e8(e)}}}(b);var e9=function(){function e(){}return e.prototype.invoke=function(e){var t=e7[e];return!!t&&(t(),!0)},e}(),te=function(){function e(e){this.liff=e}return e.prototype.invoke=function(e){return this.liff.checkFeature(e)},e}(),tt=function(){function e(t){q(ez(),e.SDK_VERSION_SUPPORTING_NEW)>=0?this.impl=new e9:this.impl=new te(t)}return Object.defineProperty(e,"SDK_VERSION_SUPPORTING_NEW",{get:function(){return"2.11.0"},enumerable:!1,configurable:!0}),e.prototype.invoke=function(e){return this.impl.invoke(e)},e}(),tn=function(e,t){return(tn=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},tr=!1,ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}tn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"_legacyExtensionsEnabled"},enumerable:!1,configurable:!0}),t.prototype.install=function(){tr=!0},t}(b);function to(){var e;
1Object.keys(U).forEach(function(e){eW(U[e])}),e=eS(),Y.remove("".concat(N,":").concat(U.EXPIRES,":").concat(e.liffId),{path:"/"})}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"logout"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return to()}}}(b);var ta=/([\x90\x9D\x81\x8D\x8F<"{|}>\\^`ââºââ¢âŽŠâ¦ââžââââ¡â¢â°ÅšŸâ¹Åâ ¥¿©áÃýÃÃðô]|\n|.*#.*#|%(?![0-9A-Fa-f]{2})[^%]{0,2})/,ts=function(e){if(ta.test(e))throw et(T,"invalid URL.");var t=new URL(e),n=t.username,r=t.password,i=t.hash,o=t.search;return{username:n,password:r,pathname:t.pathname,hash:i,origin:t.origin,search:o}},tc=function(e){return e.substring(1).split("&").filter(function(e){return!/^liff\./.test(e)&&Boolean(e)})},tu=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},tl=function(e,t){var n=(function(e,t){for(var n=l([],u(e),!1),r=0;r<t.length;r++){var i=t[r],o=n.indexOf(i);o>-1&&n.splice(o,1)}return n})(function(e){var t,n,r=e.replace(/\+/g,"%2B"),i=new URLSearchParams(r),o=[];try{for(var a=c(i.entries()),s=a.next();!s.done;s=a.next()){var l=u(s.value,2),f=l[0],d=l[1];o.push("".concat(tu(f),"=").concat(tu(d)))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}if(0===o.length)return[""];var h=e.split("&");return o.map(function(e,t){return e.endsWith("=")&&!h[t].endsWith("=")?e.slice(0,-1):e})}(tc(e).join("&")),tc(t)).join("&");return""!==n?"?".concat(n):""},tf=function(e,t){return 0===t.indexOf(e)&&(e.endsWith("/")&&(e=e.substring(0,e.length-1)),void 0===t[e.length]||"/"===t[e.length])},td=function(e,t){var n=ts(e),r=new URL(t);if(n.username!==r.username||n.password!==r.password||r.origin!==n.origin||!tf(r.pathname,n.pathname))throw et(T,"invalid URL.")},th=new(function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.extraParams="",t.getAndValidateContext=function(){var e=eT();if(!e)throw et(k,"Could not get Context from server.");if(!e.endpointUrl)throw et(k,"Could not get endpointUrl from server.");if(!e.permanentLinkPattern)throw et(k,"Could not get permanentLinkPattern from server.");return e},t.createUrl=function(){var e=t.getAndValidateContext(),n=window.location,r=n.pathname,i=n.search,o=n.hash,a=n.origin,s=new URL(e.endpointUrl);if(s.origin!==a||!tf(s.pathname,r))throw et(P,"Current page is not under entrypoint.");var c=r.substring(s.pathname.length);c.length>0&&"/"!==c[0]&&(c="/"+c);var u=RegExp("^".concat(M.join("|"))),l=o.substring(1).split("&").filter(function(e){return!u.test(e)&&Boolean(e)}).join("&"),f=l===s.hash.substring(1)?"":l,d=function(e){return e.substring(1).split("&").filter(function(e){return!/liff\.state/.test(e)&&Boolean(e)})},h=d(i),p=d(s.search);t.extraParams&&h.push(t.extraParams);for(var v=0;v<p.length;v++){var g=p[v],m=h.indexOf(g);m>-1&&h.splice(m,1)}var w=h.join("&"),b="".concat(c).concat(""!==w?"?".concat(w):"").concat(f?"#".concat(f):"");return"".concat(R).concat(eS().liffId).concat(b)},t.createUrlBy=function(e){return a(t,void 0,void 0,function(){var t,n,r,i,o,a;return s(this,function(s){var c,u,l,f,d,h;if(!(t=eS().liffId))throw et(k,"Should run after liff init.");return td(e,(n=this.getAndValidateContext()).endpointUrl),r=ts(e),i=new URL(n.endpointUrl),o=n.miniDomainAllowed?j:R,a=n.miniDomainAllowed&&n.miniAppId?n.miniAppId:t,[2,o.concat(a,(f=r.pathname,d=i.pathname,"/"===(h=f.substring(d.length))?"":(h.length>0&&"/"!==h[0]&&(h="/"+h),h)),tl(r.search,i.search),(c=r.hash,u=RegExp("^".concat(M.join("|"))),(l=c.substring(1).split("&").filter(function(e){return!u.test(e)&&Boolean(e)}).join("&"))?"#".concat(l):""))]})})},t.setExtraQueryParam=function(e){t.extraParams=e},t.install=function(){return{createUrl:t.createUrl,createUrlBy:t.createUrlBy,setExtraQueryParam:t.setExtraQueryParam}},t}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"permanentLink"},enumerable:!1,configurable:!0}),t}(b));function tp(e){return a(this,void 0,void 0,function(){var t,n,r;return s(this,function(i){switch(i.label){case 0:if(!e.ok)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e.json()];case 2:return[2,i.sent()];case 3:return i.sent(),[2,e];case 4:return t=String(e.status),n=Z.has(t)?t:C,[4,e.json().catch(function(){throw et(n,e.statusText)})];case 5:throw et((r=i.sent()).error||r.errorCode||n,r.error_description||r.message)}})})}function tv(e){var t=function(e){if(e)return e;var t=eM();if(!t)throw et(E,"Need access_token for api call, Please login first");return{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer ".concat(t)}}(e&&e.headers);return o(o({},e),{headers:t})}function tg(e,t){var n;try{n=tv(t)}catch(e){return Promise.reject(e)}
1return fetch(e,n).then(tp)}function tm(e,t){var n;try{n=tv(t)}catch(e){return Promise.reject(e)}return fetch(e,n)}function tw(e){var t=e.subdomain,n=e.pathname;return"https://".concat(void 0===t?"api":t,".").concat("line.me","/").concat(n)}var tb={token:tw({pathname:"oauth2/v2.1/token"}),certs:tw({pathname:"oauth2/v2.1/certs"}),"openid-configuration":tw({subdomain:"access",pathname:".well-known/openid-configuration"}),authorize:tw({subdomain:"access",pathname:"liff/v1/authorize"}),profile:tw({pathname:"v2/profile"}),message:tw({pathname:"message/v3/share"}),friendship:tw({pathname:"friendship/v1/status"}),shareTargetPicker:tw({subdomain:"access",pathname:"oauth2/v2.1/liff/shareTargetPicker"}),shareTargetPickerOtt:tw({pathname:"liff/v2/apps"}),shareTargetPickerResult:tw({subdomain:"access",pathname:"oauth2/v2.1/liff/shareTargetPicker/result"}),apps:tw({pathname:"liff/v2/apps"}),subWindowGetMSIT:tw({pathname:"liff/v2/sub/msit"}),subWindowGetMSTByMSIT:tw({pathname:"liff/v2/sub/mst"}),subWindowSubscribe:tw({subdomain:"liff",pathname:"liff/v2/sub/waitResult"}),subWindowPost:tw({pathname:"liff/v2/sub/result"}),subWindowGetAppData:tw({pathname:"liff/v2/sub/appData"}),subWindowGetOrigin:function(e){return tw({pathname:"liff/v2/sub/".concat(e,"/origin")})},accessTokenVerify:tw({pathname:"oauth2/v2.1/verify"}),unauthorizedPermissions:tw({subdomain:"liff",pathname:"liff/v2/incrementalAgreement/unauthorizedPermissions"}),permanentLink:tw({subdomain:"liff",pathname:"liff/v2/permanentLink"}),createShortcutOnHomeScreen:tw({subdomain:"liff-shortcut",pathname:"api/shortcut"}),iapVirtualConfirm:tw({pathname:"iap/v1/product/virtualConfirm"}),oaAddFriendRateLimit:tw({subdomain:"liff",pathname:"liff/v2/oaadd/rateLimit"})};function ty(e){return tg("".concat(tb.accessTokenVerify,"?access_token=").concat(encodeURIComponent(e)),{headers:{"Content-Type":"application/json",Accept:"application/json"}})}var tI="liff.subwindow.identifier",tS="liff.subwindow.cryptokey",tC=o(o({},W),{GET_DATA:"getData",SET_DATA:"setData",NOT_FOUND:"notFound",TEARDOWN:"teardown"}),tE={BROADCAST:"broadcast",COMMAND:"command"},tT={MAIN:"main",SUB:"sub"},tk="AES-GCM",tO=function(e){return a(void 0,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,window.crypto.subtle.importKey("jwk",{kty:"oct",k:e,alg:"A128GCM",ext:!0},{name:tk},!1,["encrypt","decrypt"])];case 1:return[2,t.sent()];case 2:throw et(C,t.sent());case 3:return[2]}})})},tP=function(e){return"".concat(e.identifier,"-").concat(e.action,"-").concat(e.timestamp)};function t_(){var e=document.createElement("form");e.method="POST",e.action="$MESSAGE_HANDLER_URL";var t=document.createElement("input");t.type="hidden",t.name="identifier",t.value="$IDENTIFIER",e.appendChild(t),document.body.appendChild(e),e.submit()}var tL=function(e){void 0===e&&(e=tT.MAIN);var t=this;this.identification={identifier:"",cryptoKey:""},this.messageHandlerInstance=null,this.listeners=new Map,this.sentMessages=[],this.generateIdentification=function(){return a(t,void 0,void 0,function(){var e,t,n,r,i;return s(this,function(o){switch(o.label){case 0:return e=new URLSearchParams(window.location.search),t=function(t){var n=e.get("liff.state");return n?new URLSearchParams(n).get(t):null},n=this,i={identifier:this.windowType===tT.MAIN?ea(12):e.get(tI)||t(tI)||""},this.windowType!==tT.MAIN?[3,2]:[4,a(void 0,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,window.crypto.subtle.generateKey({name:tk,length:128},!0,["encrypt","decrypt"])];case 1:return e=n.sent(),[4,window.crypto.subtle.exportKey("jwk",e)];case 2:if(!(t=n.sent())||!t.k)throw et(C,"failed to generate key");return[2,t.k];case 3:throw et(C,n.sent());case 4:return[2]}})})];case 1:return r=o.sent(),[3,3];case 2:r=e.get(tS)||t(tS)||"",o.label=3;case 3:return n.identification=(i.cryptoKey=r,i),[2]}})})},this.hasIdentification=function(){var e=t.identification,n=e.identifier,r=e.cryptoKey;return"string"==typeof n&&"string"==typeof r&&n.length>0&&r.length>0}
1,this.isReady=function(){return t.hasIdentification()&&!!t.messageHandlerInstance},this.setup=function(){return a(t,void 0,void 0,function(){var e,t,n,r,i,o=this;return s(this,function(a){switch(a.label){case 0:return this.messageHandlerInstance?[2]:[4,this.generateIdentification()];case 1:if(a.sent(),!(e=this.identification.identifier))return[2];if(t=/^[a-zA-Z0-9]+$/gm,!e.match(t))throw et(C,"Invalid identifier");return(n=document.createElement("iframe")).style.display="none",n.src="about:blank",document.body.appendChild(n),null===(i=null==n?void 0:n.contentWindow)||void 0===i||i.window.eval("(".concat(t_.toString().replace("$MESSAGE_HANDLER_URL","".concat("https://liff-subwindow.line.me/liff/v2/sub/messageHandler")).replace("$IDENTIFIER",e.split("'")[0]),")()")),r="iframe-".concat(e,"-ready"),[4,new Promise(function(e){var t=function(i){i.data[r]&&(o.messageHandlerInstance=n,window.addEventListener("message",o.proxyToListeners),e(),document.removeEventListener("message",t))};window.addEventListener("message",t)})];case 2:return[2,a.sent()]}})})},this.teardown=function(){return a(t,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return this.isReady()?[4,this.send({eventName:tC.TEARDOWN})]:[3,2];case 1:n.sent(),window.removeEventListener("message",this.proxyToListeners),this.listeners.clear(),null===(t=null===(e=this.messageHandlerInstance)||void 0===e?void 0:e.parentNode)||void 0===t||t.removeChild(this.messageHandlerInstance),this.messageHandlerInstance=null,n.label=2;case 2:return[2]}})})},this.listen=function(e){t.listeners.set(e,e)},this.listenRepliedEvent=function(e,n){var r=function(i){i.replyTarget&&tP(i.replyTarget)===tP(e)&&(n(i),t.listeners.delete(r))};t.listeners.set(r,r)},this.send=function(e){return a(t,void 0,void 0,function(){var t,n,r,i,o=this;return s(this,function(a){switch(a.label){case 0:var s;if(!this.isReady())throw et("message bus is not ready to send message");return n={action:(s=e.eventName,Object.keys(W).map(function(e){return W[e]}).includes(s)?tE.BROADCAST:tE.COMMAND),identifier:this.identification.identifier||"",timestamp:(new Date).getTime()},[4,this.getEncryptedContext(e)];case 1:return n.context=a.sent(),t=n,null===(i=null===(r=this.messageHandlerInstance)||void 0===r?void 0:r.contentWindow)||void 0===i||i.postMessage({messageBusEvent:t},"*"),this.sentMessages.push(tP(t)),[4,new Promise(function(e){o.listenRepliedEvent(t,function(t){e(t.context)})})];case 2:return[2,a.sent()]}})})},this.reply=function(e,n){return a(t,void 0,void 0,function(){var t,r,i,o;return s(this,function(a){switch(a.label){case 0:if(!this.isReady())throw et("message bus is not ready to send message");if(!e.identifier||!e.timestamp)throw et(C,"target message is not valid");return r={action:tE.BROADCAST},[4,this.getEncryptedContext(n)];case 1:return r.context=a.sent(),r.identifier=this.identification.identifier||"",r.timestamp=(new Date).getTime(),r.replyTarget={action:e.action,identifier:e.identifier,timestamp:e.timestamp},t=r,null===(o=null===(i=this.messageHandlerInstance)||void 0===i?void 0:i.contentWindow)||void 0===o||o.postMessage({messageBusEvent:t},"*"),this.sentMessages.push(tP(t)),[2]}})})},this.setData=function(e,n){void 0===e&&(e="appData"),t.send({eventName:tC.SET_DATA,key:e,data:n})},this.getData=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return a(t,l([],u(e),!1),void 0,function(e){return void 0===e&&(e="appData"),s(this,function(t){switch(t.label){case 0:return[4,this.send({eventName:tC.GET_DATA,key:e})];case 1:return[2,t.sent()]}})})},this.proxyToListeners=function(e){return a(t,void 0,void 0,function(){var t,n=this;return s(this,function(r){return t=e.data.messageBusEvent,"https://liff-subwindow.line.me"!==e.origin||t&&(this.sentMessages.includes(tP(t))||t.identifier!==this.identification.identifier||t.action!==tE.BROADCAST&&!t.replyTarget||this.listeners.forEach(function(e){return a(n,void 0,void 0,function(){var n,r,i;return s(this,function(a){switch(a.label){case 0:return n=e,r=[o({},t)],i={},[4,this.getDecryptedContext(t.context)];case 1:return n.apply(void 0,[o.apply(void 0,r.concat([(i.context=a.sent(),i)]))]),[2]}})})})),[2]})})},this.getEncryptedContext=function(e){return a(t,void 0,void 0,function(){var t,n,r,i,o,c,u;return s(this,function(l){switch(l.label){case 0:var f;return n=(t=this.identification).identifier,r=t.cryptoKey,o=(i=JSON).stringify,u={eventName:e.eventName,key:e.key?e.key:void 0},e.data?[4,(f=JSON.stringify(e.data),a(void 0,void 0,void 0,function(){var e,t,i;return s(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),e=(new TextEncoder).encode(n),[4,tO(r)];case 1:return t=o.sent(),[4,window.crypto.subtle.encrypt({name:tk,iv:e},t,(new TextEncoder).encode(f))];case 2:return i=o.sent(),[2,btoa(new Uint8Array(i).reduce(function(e,t){return e+String.fromCharCode(t)},""))];case 3:throw et(C,o.sent());case 4:return[2]}})}))]:[3,2];case 1:return c=l.sent(),[3,3];case 2:c=void 0,l.label=3;case 3:return[2,o.apply(i,[(u.data=c,u)])]}})})},this.getDecryptedContext=function(e){return a(t,void 0,void 0,function(){var t,n,r,i,c,u,l,f;return s(this,function(d){switch(d.label){case 0:var h;return n=(t=this.identification).identifier,r=t.cryptoKey,(i=JSON.parse(e)).data&&"string"==typeof i.data?(f=(l=JSON).parse,[4,(h=i.data,a(void 0,void 0,void 0,function(){var e,t,i,o,a,c;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e=(new TextEncoder).encode(n),[4,tO(r)];case 1:for(t=s.sent(),i=atob(h),o=new Uint8Array(i.length),a=0;a<i.length;a++)o[a]=i.charCodeAt(a);
1return[4,window.crypto.subtle.decrypt({name:tk,iv:e},t,o.buffer)];case 2:return c=s.sent(),[2,(new TextDecoder).decode(new Uint8Array(c))];case 3:throw et(C,s.sent());case 4:return[2]}})}))]):[3,2];case 1:return u=f.apply(l,[d.sent()]),[3,3];case 2:u=void 0,d.label=3;case 3:return c=u,[2,o(o({},i),{data:c})]}})})},this.windowType=e};!function(){if("undefined"!=typeof window&&"function"!=typeof window.CustomEvent){function e(e,t){var n=t||{},r=n.bubbles,i=n.cancelable,o=n.detail,a=document.createEvent("CustomEvent");return a.initCustomEvent(e,void 0!==r&&r,void 0!==i&&i,void 0===o?void 0:o),a}e.prototype=Event.prototype,window.CustomEvent=e}}();var tA={},tF=!1;function tx(e,t){tF||(tF=!0,window.addEventListener(x,function(e){e&&e.detail&&e.detail.type&&tA[e.detail.type]&&tA[e.detail.type].forEach(function(t){return t(e)})})),tA[e]?tA[e].push(t):tA[e]=[t]}function tN(e,t){var n=tA[e];if(n&&Array.isArray(n)){var r=n.indexOf(t);r>=0&&n.splice(r,1)}}function tR(e,t,n){void 0===t&&(t={}),void 0===n&&(n="");var r=eR();if(!r)throw et(O,"Invalid featureToken for client features");if(!window._liff||!window._liff.postMessage)throw et(T,"postMessage is not available from client");p.debug("[js postMessage to client]",e,n,t),window._liff.postMessage(e,r,n,JSON.stringify(t))}function tj(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={once:!0}),eR()?(n=o({callbackId:ea(12),once:!0},n),new Promise(function(r,i){var o=function(t){if(t&&t.detail){var a=t.detail.callbackId===n.callbackId,s="string"!=typeof t.detail.callbackId;(a||s)&&(n.once&&tN(e,o),p.debug("[callback detail]",t.detail),t.detail.error?i(t.detail.error):t.detail.data?r(t.detail.data):i(t.detail))}i()};tx(e,o),tR(e,t,n.callbackId)})):Promise.reject(et(O,"Invalid featureToken for client features"))}function tU(){var e=e$();null!==e&&("ios"===e0()&&q(e,"9.19")>=0||"android"===e0()&&q(e,"11.6.0")>=0)?location.href="liff://close":window._liff&&window._liff.postMessage?null!==e&&q(e,"10.15.0")>=0?"ios"===e0()?window._liff.postMessage("closeWindow",""):window._liff.postMessage("closeWindow","","",""):tj("closeWindow"):window.close()}function tD(e){return tg((0,tb.subWindowGetOrigin)(e))}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"closeWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return tU()}}}(b);var tM={};function tB(e,t){e&&tM[e]&&tM[e].forEach(function(e){e(t)})}function tW(e,t){tM[e]||(tM[e]=[]),tM[e].push(t)}function tH(e,t){if(tM[e]){var n=tM[e].indexOf(t);n>=0&&tM[e].splice(n,1)}}var tV,tG,tK,tJ,tq,tz,t$=function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem("".concat(this.getKeyPrefix(),":").concat(e))},e.prototype.setItem=function(e,t){this.storage.setItem("".concat(this.getKeyPrefix(),":").concat(e),t)},e.prototype.removeItem=function(e){this.storage.removeItem("".concat(this.getKeyPrefix(),":").concat(e))},e.prototype.clear=function(){this.storage.clear()},e.prototype.getKeyPrefix=function(){return"".concat(N,":").concat(this.getLiffId())},e.prototype.getLiffId=function(){var e=eS().liffId;if(!e)throw et(P,"liffId is necessary for liff.init()");return e},e}(),tX=new t$(new ei),tQ="subWindowStatusUpdated";function tY(){var e=tX.getItem(tQ);return null!==e&&JSON.parse(e)}function tZ(e){tX.setItem(tQ,String(e))}function t0(){return a(this,arguments,void 0,function(e){return void 0===e&&(e=tT.MAIN),s(this,function(t){switch(t.label){case 0:return[4,(tz=new tL(e)).setup()];case 1:return t.sent(),[2,tz]}})})}var t1=new ei,t2=new t$(ew()?t1:window.sessionStorage),t4="mainWindowOrigin";function t3(){return t2.getItem(t4)}function t6(e){return a(this,arguments,void 0,function(e,t){var n,r,i,o,a,c,u;return void 0===t&&(t={}),s(this,function(s){switch(s.label){case 0:if(null==(n=tz)?void 0:n.isReady())return[3,5];if(r=JSON.stringify(t),i=eS().liffId,o=t3(),!window.opener||!o||!i)throw et(F);a=!1,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,tD(i)];case 2:return a=s.sent().subwindowCommonModule,[3,4];case 3:throw c=s.sent(),p.debug(c),et(F);case 4:return u=a?o:location.origin,[2,new Promise(function(t){window.addEventListener("message",function n(i){(i.data&&"string"==typeof i.data.type&&[W.SUBMIT,W.CANCEL].includes(i.data.type)?0:1)||(window.removeEventListener("message",n),t({status:e,result:r}))}),window.opener.postMessage({status:e,result:r},u)})];case 5:return n.send({eventName:e,data:t}),[4,new Promise(function(e){setTimeout(e,500)})];case 6:return s.sent(),[2,{status:e,result:JSON.stringify(t)}]}})})}function t5(e){var t,n=tq;if(e.origin===n){var r=e.data;if(r){var i,o=r.status,a=r.result;try{i=JSON.parse(a||"{}")}catch(e){i={}}switch(o){case V:window.clearInterval(tJ),ne();break;case W.CANCEL:case W.SUBMIT:tZ(!0),window.clearInterval(tJ),window.removeEventListener("message",t5),tB(o,i),null===(t=tG)||void 0===t||t.postMessage({type:o},tq);break;default:p.debug("unexpected message")}}}}var t7=function(e){return a(void 0,void 0,void 0,function(){var t,n,r,i;
1return s(this,function(o){if(tY())return[2];switch(n=(t=e.context).eventName,r=t.data,i=tz,n){case W.INIT:t9(!r.hasOpener);break;case W.CANCEL:case W.SUBMIT:tZ(!0),tB(n,r),null==i||i.reply(e,{eventName:n});break;case W.CLOSE:!1===tY()&&(tZ(!0),tB(W.CLOSE,{})),ne()}return[2]})})};function t8(){window.clearInterval(tK),window.clearInterval(tJ),window.removeEventListener("message",t5)}function t9(e){if(void 0===e&&(e=!1),t8(),tZ(!1),e){var t=tG;t&&(t.close(),tG=null)}}function ne(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return(e=tz)?[4,e.teardown()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}var nt=null;function nn(e){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.json()];case 1:return[2,t.sent()];case 2:return t.sent(),[2,null];case 3:return[2]}})})}var nr={height:"full",closeButtonPosition:"right",closeButtonColor:"black",closeButtonLabel:""};function ni(e){var t,n,r,i,o,c,f,d,h,p,v,g,m;return e7.subwindowOpen(),eI()?(h=e.appData,p=e.native,v=eS().liffId,g=eF(),m=ed(e.url),v?g?m?(i=(r={mainLiffId:v,subLiffId:m,mstChallenge:g,appData:h,view:(n={},Object.keys(t=Object.assign({},nr,p)).forEach(function(e){"closeButtonColor"===e?"white"===t[e]?n[e]="#ffffff":n[e]="#000000":n[e]=t[e]}),n)}).mainLiffId,o=r.subLiffId,c=r.mstChallenge,f=r.appData,d=r.view,i&&c?tg(tb.subWindowGetMSIT,{method:"POST",body:JSON.stringify({mainLiffId:i,subLiffId:o,mstChallenge:c,appData:f,view:d})}):Promise.reject(et(T,"no proper argument"))).then(function(e){var t=e.msit;return function e(t){return a(this,void 0,void 0,function(){var n,r,i,o,c,f,d,h,p,v,g,m,w,b=this;return s(this,function(y){switch(y.label){case 0:if(n=t.msit,r=t.mstChallenge,o=void 0===(i=t.reconnectCount)?0:i,c=function(){return a(b,void 0,void 0,function(){return s(this,function(i){switch(i.label){case 0:return[4,new Promise(function(e){return setTimeout(e,1e3)})];case 1:return i.sent(),[4,e({msit:n,mstChallenge:r,onSuccess:t.onSuccess,onError:t.onError,reconnectCount:o+1})];case 2:return i.sent(),[2]}})})},f=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];nt=null,t.onSuccess.apply(t,l([],u(e),!1))},d=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];nt=null,t.onError.apply(t,l([],u(e),!1))},h=Date.now(),null===nt&&(nt=h),p=h-nt,o>=10||p>6e5)return d(et(C,"Failed to connect")),[2];y.label=1;case 1:return y.trys.push([1,3,,5]),[4,tm(tb.subWindowSubscribe,{method:"POST",body:JSON.stringify({msit:n,mstChallenge:r})})];case 2:return v=y.sent(),[3,5];case 3:return y.sent(),[4,c()];case 4:return y.sent(),[2];case 5:return v.status>=500?[4,c()]:[3,7];case 6:return y.sent(),[3,17];case 7:return v.status>=400&&500>v.status?[4,nn(v)]:[3,9];case 8:return d((g=y.sent())?et(T,g.errorDetail):et(C,"Some error happened in the server")),[3,17];case 9:return 200!==v.status?[3,16]:[4,nn(v)];case 10:if(!(g=y.sent()))return d(et(C,"Some error happened in the server")),[2];switch(m=g.status,w=g.result,m){case W.ERROR:return[3,11];case W.CLOSE:case W.CANCEL:case W.SUBMIT:return[3,13]}return[3,14];case 11:return[4,c()];case 12:return y.sent(),[3,15];case 13:return f(m,w),[3,15];case 14:d(et(C,"Some error happened in the server")),y.label=15;case 15:return[3,17];case 16:d(et(C,"Some error happened in the server")),y.label=17;case 17:return[2]}})})}({msit:t,mstChallenge:g,onSuccess:function(e,t){tB(e,t)},onError:function(e){tB(W.ERROR,e)}}),t}).then(function(t){return function(e,t){return a(this,void 0,void 0,function(){var n,r,i;return s(this,function(o){switch(o.label){case 0:return n=e.url,(r=new URLSearchParams).set("msit",t),[4,null===(i=e.onBeforeTransition)||void 0===i?void 0:i.call(e)];case 1:return o.sent(),location.href="".concat("liff://subwindow","?url=").concat(encodeURIComponent(n),"&").concat(r.toString()),[2]}})})}(e,t)}):Promise.reject(et(T,"params.url must be liff url or mini url")):Promise.reject(et(E,"mst_challenge is invalid")):Promise.reject(et(E,"liffId is invali
1d"))):function(e){return a(this,void 0,void 0,function(){var t,n,r,i,o,a,c,f,d,h,p,v;return s(this,function(s){var g,m,w,b,y,I,S;switch(s.label){case 0:return(t=ed(e.url))?(t9(!0),[4,ne()]):[2,Promise.reject(et(T,"params.url must be liff url or mini url"))];case 1:return s.sent(),tG="ios"!==e0()||ev()?window.open("","liffsubwindow","width=480, height=640, menubar=no, toolbar=no, scrollbars=yes"):window.open(),n=e.url,r=e.appData,(i=new URL(n)).searchParams.append(H,"true"),[4,t0()];case 2:return o=s.sent(),i.searchParams.append(tI,o.identification.identifier),i.searchParams.append(tS,o.identification.cryptoKey),i.hostname=(m=(g=u(i.hostname.split(".")))[0],w=g.slice(1),l(["".concat(m,"-ext")],u(w),!1).join(".")),a=i.toString(),[4,tD(t)];case 3:if(f=(c=s.sent()).origin,d=c.subwindowCommonModule,!(h=tG))throw et(A);if(!d)return h.close(),[2];tq=f,o.listen(t7),o.setData("appData",r),window.addEventListener("message",t5),s.label=4;case 4:return s.trys.push([4,6,,7]),[4,null===(v=e.onBeforeTransition)||void 0===v?void 0:v.call(e)];case 5:return s.sent(),[3,7];case 6:throw p=s.sent(),h.close(),p;case 7:return h.location.href=a,b=f,y=r,I=tG,S={type:V},y&&(S.message=JSON.stringify(y)),tJ=window.setInterval(function(){null==I||I.postMessage(S,b)},100),tK=window.setInterval(function(){var e=tG;e&&e.closed&&(t8(),tG=null,!1===tY()&&(tZ(!0),tB(W.CLOSE,{})))},100),[2]}})})}(e)}function no(e){if(!e.mst||!e.status)return Promise.reject(et(T,"no proper argument"));var t=JSON.stringify(e);return tg(tb.subWindowPost,{method:"POST",body:t})}
1function na(){if(!eZ())throw et(E,"this api can be only called in child window")}function ns(e){var t;return void 0===e&&(e={}),na(),eI()?function(){return a(this,arguments,void 0,function(e){var t,n;return void 0===e&&(e={}),s(this,function(r){switch(r.label){case 0:return(t=eA())?[4,no({mst:t,status:W.CANCEL,result:e})]:[2,Promise.reject(et(E,"mst is invalid"))];case 1:return n=r.sent(),tZ(!0),[2,n]}})})}(e):(void 0===(t=e)&&(t={}),t6(W.CANCEL,t))}function nc(e){var t;return void 0===e&&(e={}),na(),eI()?function(){return a(this,arguments,void 0,function(e){var t,n;return void 0===e&&(e={}),s(this,function(r){switch(r.label){case 0:return(t=eA())?[4,no({mst:t,status:W.SUBMIT,result:e})]:[2,Promise.reject(et(E,"mst is invalid"))];case 1:return n=r.sent(),tZ(!0),[2,n]}})})}(e):(void 0===(t=e)&&(t={}),t6(W.SUBMIT,t))}function nu(){return na(),eI()?function(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return!1!==tY()?[3,2]:(e=eA())?[4,no({mst:e,status:W.CLOSE,result:{}})]:[2,Promise.reject(et(E,"mst is invalid"))];case 1:t.sent(),t.label=2;case 2:return tU(),[2]}})})}():function(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){return(null==(e=tz)?void 0:e.isReady())?(e.send({eventName:W.CLOSE}),[2,new Promise(function(e){setTimeout(function(){tU(),e()},100)})]):(tU(),[2,Promise.resolve()])})})}()}function nl(){return na(),function(){var e,t=eC(U.APP_DATA);try{e=t?JSON.parse(t):{}}catch(t){e={}}return Promise.resolve(e)}()}var nf={on:tW,off:tH,open:ni,cancel:ns,submit:nc,close:nu,getAppData:nl};function nd(e,t){return a(this,void 0,void 0,function(){var n,r,i,o,c,l,f,d,h,p,v,g,m,w;return s(this,function(b){switch(b.label){case 0:if(r=(n=u(e.split("."),3))[0],i=n[1],o=n[2],c=JSON.parse(J.decode(r)),!(l=function(e){var t=e.split(".");if(3!==t.length||t.some(function(e){return 0===e.length}))return null;try{return JSON.parse(J.decodeUnicode(t[1]))}catch(e){return null}}(e)))throw et(_,"Invalid payload in ID_TOKEN");return f=Q(J.decode(o)),d=Q("".concat(r,".").concat(i)),[4,function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,tg(tb.certs)];case 1:return[2,e.sent()]}})})}()];case 1:if(!(h=b.sent().keys.find(function(e){return e.kid===c.kid})))return[3,6];if(delete h.alg,"ES256"!==c.alg)throw et(_,'Invalid "alg" value in ID_TOKEN');p=void 0,b.label=2;case 2:return b.trys.push([2,4,,5]),[4,function(e,t,n){return a(this,void 0,void 0,function(){var r;return s(this,function(i){switch(i.label){case 0:return[4,crypto.subtle.importKey("jwk",e,{name:"ECDSA",namedCurve:"P-256"},!1,["verify"])];case 1:return r=i.sent(),[4,crypto.subtle.verify({name:"ECDSA",hash:{name:"SHA-256"}},r,n,t)];case 2:return[2,i.sent()]}})})}(h,d,f)];case 3:return p=b.sent(),[3,5];case 4:throw v=b.sent(),et(_,"".concat("Failed to use Crypto API to verify ID_TOKEN",": ").concat(v));case 5:if(p){if(g=l.iss!=="https://access.".concat("line.me"),m=l.aud!==t,w=1e3*l.exp<Date.now(),g)throw et(_,'Invalid "iss" value in ID_TOKEN');if(m)throw et(_,'Invalid "aud" value in ID_TOKEN');if(w)throw et(_,'Invalid "exp" value in ID_TOKEN');return[2,l]}throw et(_,"Invalid signature in ID_TOKEN");case 6:throw et(_,'Invalid "kid" value in ID_TOKEN');case 7:return[2]}})})}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"subWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){var e=this;return{on:tW.bind(this),off:tH.bind(this),open:function(t){return ni.call(e,o(o({},t),{onBeforeTransition:void 0}))},cancel:ns.bind(this),submit:nc.bind(this),close:nu.bind(this),getAppData:nl.bind(this)}}}(b);var nh,np=n(90709),nv=n.n(np),ng=function(){var e=this;this.type="sync",this.fns=new Set,this.on=function(t){e.fns.add(t)},this.call=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];try{for(var o=c(e.fns),a=o.next();!a.done;a=o.next())a.value.apply(void 0,l([],u(r),!1))}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}},nm=function(){var e=this;this.type="async",this.fns=new Set,this.on=function(t){e.fns.add(t)},this.call=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return a(e,void 0,void 0,function(){var e,n,r,i,o,a;return s(this,function(s){switch(s.label){case 0:e=[];try{for(r=(n=c(this.fns)).next();!r.done;r=n.next())i=r.value,e.push(i.apply(void 0,l([],u(t),!1)))}catch(e){o={error:e}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}}return[4,Promise.all(e)];case 1:return s.sent(),[2]}})})}},nw=function(e){var t,n,r,i=ea(43),o=(t=nv()(i),n="",t.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ").forEach(function(e){n+=String.fromCharCode(parseInt(e))}),window.btoa(n)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),a=eS();if(!a||!a.liffId)throw et(P,"You need to define `liffId` for liff.login()");var s={app_id:a.liffId,state:ea(12),response_type:"code",code_challenge_method:"S256",code_challenge:o,liff_sdk_version:ez()};e&&e.redirectUri&&(s.redirect_uri=e.redirectUri),eZ()&&!eI()&&((null===(r=tz)||void 0===r?void 0:r.isReady())?s.redirect_uri=window.location.href:s.disable_auto_login="true"),eE(U.LOGIN_TMP,{codeVerifier:i});var c=tb.authorize+"?"+eo.stringify(s);p.debug("[Redirect] ".concat(c)),window.location.href=c},nb=function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.hooks={before:new ng},t}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"login"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(){return this._login.bind(this)},t.prototype._login=function(e){this.hooks.before.call(e),nw(e)},t}(b),ny="undefined"==typeof navigator?"en":null!==(nh=navigator.language)&&void 0!==nh?nh:"en",nI=null,nS=!1;function nC(e){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return ny=e,[4,nE()];case 1:return t.sent(),[2]}})})}function nE(){return a(this,void 0,void 0,function(){var e,t,n,r;return s(this,function(i){switch(i.label){case 0:return i.trys.push([0,,3,4]),e=new AbortController,[4,eb(tg("".concat("https://liffsdk.line-scdn.net/xlt/manifest.json"),{method:"GET",headers:{Accept:"application/json"},signal:e.signal}),5e3,e)];case 1:return t=i.sent(),n="".concat(ny),!t.languages[n]&&ny.includes("-")&&(n=ny.split("-")[0]),t.languages[n]||(n="en"),r=new AbortController,[4,eb(tg("".concat("https://liffsdk.line-scdn.net/xlt","/").concat(t.languages[n]),{method:"GET",headers:{Accept:"application/json"},signal:r.signal}),5e3,r)];case 2:return nI=i.sent(),[3,4];case 3:return nS=!0,[7];case 4:return[2]}})})}function nT(e){if(null===nI){if(nS)return e;throw et(k,"please call xlt after liff.init")}return nI[e]}var nk=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"i18n"},enumerable:!1,configurable:!0}),t.prototype.install=function(e){return e.internalHooks.init.beforeFinished(this.beforeInitFinished.bind(this)),{setLang:nC}},t.prototype.beforeInitFinished=function(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,nE()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),p.warn("[LIFF I18n] failed to load XLT data, falling back to raw keys",e),[3,3];case 3:return[2]}})})},t}(b)),nO={iconColor:"#111111",statusBarColor:"BLACK",titleTextColor:"#111111",titleSubtextColor:"#B7B7B7",titleButtonColor:"#111111",titleBackgroundColor:"#FFFFFF",progressBarColor:"#06C755",progressBackgroundColor:"#FFFFFF",titleButtonAreaBackgroundColor:"#1FFFFFFF",titleButtonAreaBorderColor:"#26000000",baseBackgroundColor:"#FFFFFF",baseTextColor:"#000000",lightButtonBorderColor:"rgba(0, 0, 0, 0.15)"},nP={iconColor:"#FFFFFF",statusBarColor:"WHITE",titleTextColor:"#FFFFFF",titleSubtextColor:"#949494",titleButtonColor:"#FFFFFF",titleBackgroundColor:"#111111",progressBarColor:"#06C755",progressBackgroundColor:"#111111",titleButtonAreaBackgroundColor:"#1FFFFFFF",titleButtonAreaBorderColor:"#26000000",baseBackgroundColor:"#000000",baseTextColor:"#FFFFFF",lightButtonBorderColor:"rgba(255, 255, 255, 0.5)"};function n_(e){var t=eT(),n=(null==t?void 0:t.menuColorSetting)||{adaptableColorSchemes:["light"],lightModeColor:nO,darkModeColor:nP},r=n.adaptableColorSchemes,i=n.lightModeColor,a=n.darkModeColor,s=r.includes("dark");e.matches&&s?nL(o(o({},nP),a)):nL(o(o({},nO),i))}function nL(e){var t=e.iconColor,n=e.statusBarColor,r=e.titleTextColor,i=e.titleSubtextColor,o=e.titleButtonColor,a=e.titleBackgroundColor,s=e.progressBarColor,c=e.progressBackgroundColor,u=e.titleButtonAreaBackgroundColor,l=e.titleButtonAreaBorderColor,f=e.baseBackgroundColor,d=e.baseTextColor,h=e.lightButtonBorderColor;nA("--liff-base-background-color",f),nA("--liff-base-text-color",d),nA("--liff-base-background-rgb-color",X(f)),nA("--liff-base-text-rgb-color",X(d)),nA("--liff-light-button-border-color",h),nA("--liff-title-text-color",r),nA("--liff-title-background-color",a),nA("--liff-title-button-color",o),nA("--liff-icon-color",t),nA("--liff-status-bar-color",n),nA("--liff-title-subtext-color",i),nA("--liff-progress-bar-color",s),nA("--liff-progress-background-color",c),nA("--liff-title-button-area-background-color",z(u)),nA("--liff-title-button-area-border-color",z(l))}function nA(e,t){document.documentElement.style.setProperty(e,t)}var nF={addToHomeScreen:function(e){if(!new tt(e).invoke("addToHomeScreen"))throw et(O,"No permission for liff.addToHomeScreen()")},scanCode:function(e){if(!new tt(e).invoke("scanCode"))return Promise.reject(et(O,"No permission for liff.scanCode()"))},getAdvertisingId:function(e){if(!new tt(e).invoke("getAdvertisingId"))return Promise.reject(et(O,"No permission for liff.getAdvertisingId()"))},initPlugins:function(){}};function nx(e){var t=e.split(".");if(t[1])try{var n=t[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(window.atob(n))}catch(e){}return null}function nN(e){var t=e.pathname,n=e.query,r=n?"?".concat(eo.stringify(n)):"",i="".concat("liff://").concat(t).concat(r);location.href=i}var nR=null;function nj(){return Boolean(nR)}function nU(e){if(e.persisted&&e8("multipleLiffTransition")){if("ios"===e0())window.location.reload();else{var t=eS().liffId,n=eR();if(!t)throw et(k,"Invalid LIFF ID.");if(!n)throw et(O,"Invalid featureToken for client features");nN({pathname:"app/".concat(t),query:{feature_token:n}})}}}function nD(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:if(!(e=eS().liffId))throw et(k,"Invalid LIFF ID.");return[4,function(e){return a(this,void 0,void 0,function(){var t,n,r,i,o,a;return s(this,function(s){switch(s.label){case 0:return t=tb.apps,n="".concat(t,"/").concat(e,"/contextToken"),r=eM(),i={"Content-Type":"application/json",Accept:"application/json"},r&&(i.Authorization="Bearer ".concat(r)),[4,tg(n,{headers:i})];case 1:if(!(o=s.sent().contextToken))throw et(k,"Can not get context from server.");if(!(a=nx(o)))throw et(k,"Invalid context token.");return[2,a]}})})}(e)];case 1:return ek(t.sent()),[2]}})})}var nM=new(function(){function e(){var e=this;this.getAndValidateContext=function(){var e=eT();if(!e)throw et(k,"Could not get Context from server.");if(!e.endpointUrl)throw et(k,"Could not get endpointUrl from server.");if(!e.permanentLinkPattern)throw et(k,"Could not get permanentLinkPattern from server.");return e},this.decodeState=function(t){var n=e.getAndValidateContext();t=t.replace(/\n/g,"%0D%0A");var r=e.hasTrailingSlash(n.endpointUrl)||e.hasTrailingSlash(t),i=new URL(n.endpointUrl),o=i.origin,a=i.pathname,s=i.search,c=new URL("".concat(o).concat(e.attachSlashAtStart(t))),u=c.pathname,l=c.search,f=c.hash,d="".concat(s).concat(s?l.replace(/\?/g,"&"):l),h="".concat(a).concat(e.attachSlashAtStart(u)).replace("//","/");
1return(h=e.attachSlashAtStart("".concat(h))).endsWith("/")&&!r&&(h=h.substring(0,h.length-1)),"".concat(o).concat(h).concat(d).concat(f).replace(/%0D%0A/g,"\n")}}return e.prototype.attachSlashAtStart=function(e){return"".concat(e&&e.length>0&&!e.startsWith("/")?"/":"").concat(e)},e.prototype.hasTrailingSlash=function(e){var t=e.indexOf("?"),n=e.indexOf("#"),r=-1;return(r=-1===t&&-1===n?e.length:-1===t?n:-1===n?t:Math.min(t,n))>0&&"/"===e[r-1]},e.prototype.invoke=function(){return a(this,void 0,void 0,function(){var e,t,n,r,i;return s(this,function(o){switch(o.label){case 0:if("string"!=typeof(t=(e=eo.parse(window.location.search))["liff.state"]))return[2];o.label=1;case 1:return o.trys.push([1,4,,5]),n=location.href,(r=this.decodeState(t))===n?[3,3]:(e["liff.hback"]?location.replace(eu(r,{"liff.hback":e["liff.hback"]})):location.replace(r),[4,new Promise(function(){})]);case 2:o.sent(),o.label=3;case 3:return[3,5];case 4:if((i=o.sent()).code===k)throw i;return p.debug(i),[3,5];case 5:return[2]}})})},e}()),nB=function(e,t){return new Promise(function(n,r){if(e){var i=document.createElement("script");i.type="module",i.onload=function(){n()},i.src=e,document.head.appendChild(i)}else r(et(P,t))})},nW=function(e){var t="https://static.line-scdn.net/lui/edge/versions/1.13.0/lui-alert.js";return t&&e&&(t=t.replace(/\d{1,2}\.\d{1,2}\.\d{1,3}/,e)),nB(t,"LUI_ALERT_URL is not defined")},nH="liffAlert",nV=function(){return a(void 0,void 0,void 0,function(){var e;return s(this,function(t){var n;switch(t.label){case 0:return(e=function(){var e,t=document.querySelector('script[src*="luivendor.js"]');if(t&&(null===(e=t.src.match(/\d{1,2}\.\d{1,2}\.\d{1,3}/g))||void 0===e?void 0:e.length))return t.src.match(/\d{1,2}\.\d{1,2}\.\d{1,3}/g)[0]}())?[3,2]:[4,nB("https://static.line-scdn.net/lui/edge/versions/1.13.0/luivendor.js","LUI_VENDOR_URL is not defined")];case 1:t.sent(),t.label=2;case 2:return[4,nW(e)];case 3:return t.sent(),[4,(n=ea(6),new Promise(function(){var e=document.createElement("div");e.innerHTML='<lui-alert id="'.concat(nH,"-").concat(n,'" shown title="').concat(nT("alert.android.extBrowser.autoLoginWorkaround.title"),'" message="').concat(nT("alert.android.extBrowser.autoLoginWorkaround.desc"),'" button="').concat(nT("alert.android.extBrowser.autoLoginWorkaround.button.text"),'"></lui-alert>'),document.body.appendChild(e);var t=document.getElementById("".concat(nH,"-").concat(n));t&&t.addEventListener("lui-button-click",function(){var e=window.open(eu(window.location.href,{liffIsEscapedFromApp:"true"}),"_blank");e&&(e.location.href=eu(window.location.href,{liffIsEscapedFromApp:"true"}),window.close())})}))];case 4:return t.sent(),[2]}})})},nG=function(e){try{return new URL(e).searchParams.get("lineAppVersion")}catch(e){return null}},nK=function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.hooks={before:new nm,after:new nm},t.internalHooks={beforeFinished:new nm,beforeSuccess:new nm,error:new nm},t}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"init"},enumerable:!1,configurable:!0}),t.prototype.install=function(e){var t=e.liff;return this.liffForWindow=t,this.init.bind(this)},t.prototype.init=function(e,t,n){return a(this,void 0,void 0,function(){var r;return s(this,function(i){var o,u,l;switch(i.label){case 0:return[4,this.hooks.before.call()];case 1:i.sent(),o=this.liffForWindow,window&&!window.liff&&(window.liff=o),i.label=2;case 2:return i.trys.push([2,9,,11]),[4,Promise.all([function(e){return a(this,void 0,void 0,function(){var t,n;return s(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,tr?function(){var e,t,n,r;return e=this,t=void 0,n=void 0,r=function(){return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,function(e){switch(e.label){case 0:return[3,2];case 1:return[2,e.sent().default];case 2:return[2,eb(new Promise(function(e,t){var n,r=document.createElement("script");r.onload=function(){var n=window.liffClientExtension;n?e(n):t(et(k,"Unable to load client features. (Extension is empty)"))}
1,r.onerror=function(e){t(et(k,"Unable to load client features.",{cause:e}))},r.src="ios"===e0()?(n=e$())&&0>q(n,"9.19.0")?"https://static.line-scdn.net/liff/edge/2/ios-918-extensions_2_22_0.js":"https://static.line-scdn.net/liff/edge/2/ios-extensions_2_22_0.js":"https://static.line-scdn.net/liff/edge/2/non-ios-extensions_2_22_0.js",r.type="text/javascript",document.body.appendChild(r)}),1e4)]}})},new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}():Promise.resolve(void 0)];case 1:return(t=r.sent())?(t.install(e,nF),[3,3]):[2];case 2:return n=r.sent(),p.warn("[LIFF Init] failed to load legacy extensions, related APIs will be unavailable",n),[3,3];case 3:return[2]}})})}(this.liffForWindow),function(e,t){return a(this,void 0,void 0,function(){var n,r;return s(this,function(i){var o,u,l,f,d;switch(i.label){case 0:if(!e.liffId)throw et(P,"liffId is necessary for liff.init()");return window.__liffConfig=e,!eI()&&eq()&&(d=eS(),Y.get("".concat(N,":").concat(U.EXPIRES,":").concat(d.liffId))||to()),n=eo.parse(window.location.search),!eZ()||eI()?[3,2]:[4,function e(){return a(this,void 0,void 0,function(){var t,n,r,i,o,c,u=this;return s(this,function(l){switch(l.label){case 0:return(n=tz)?[3,2]:[4,t0(tT.SUB)];case 1:n=l.sent(),l.label=2;case 2:return(t=n).isReady()?(r=ea(8),[4,t.getData("appData")]):[3,8];case 3:return o=(i=l.sent()).eventName,c=i.data,o!==tC.NOT_FOUND?[3,6]:[4,t.teardown()];case 4:return l.sent(),[4,e()];case 5:return[2,l.sent()];case 6:c&&eL(JSON.stringify(c)),l.label=7;case 7:return t.listen(function(e){return a(u,void 0,void 0,function(){var n,i;return s(this,function(o){return i=(n=e.context).data,n.eventName===W.INIT&&(null==i?void 0:i.subWindowId)!==r&&tU(),n.eventName!==W.CANCEL&&n.eventName!==W.SUBMIT||t.teardown(),[2]})})}),eq()&&t.send({eventName:W.INIT,data:{subWindowId:r,hasOpener:!!window.opener}}),[3,10];case 8:return t3()?[3,10]:[4,new Promise(function(e){window.addEventListener("message",function t(n){var r=n.data,i=n.source,o=n.origin;if(r){var a=r.type,s=r.message;a===V&&(window.removeEventListener("message",t),s&&eL(s),t2.setItem(t4,o),i&&i.postMessage&&i.postMessage({status:V},o),e())}})})];case 9:return[2,l.sent()];case 10:return[2]}})})}()];case 1:i.sent(),i.label=2;case 2:if(n.error&&n.liffOAuth2Error)throw l=n.error,f=n.error_description.replace(/\+/g," "),et(k,"".concat(l,": ").concat(f));return o=n.code,u=eH(),Boolean(o&&!eq()&&u&&u.codeVerifier)?[4,function(e){return a(this,void 0,void 0,function(){var t,n,r=this;return s(this,function(i){switch(i.label){case 0:t=function(){return a(r,void 0,void 0,function(){var t,n,r,i,o,a;return s(this,function(s){var c,u,l,f,d;switch(s.label){case 0:return[4,(c=eS(),u=eo.parse(window.location.search),l=eH(),f={grant_type:"authorization_code",client_id:u.liffClientId,appId:c.liffId,code:u.code,code_verifier:l.codeVerifier,redirect_uri:c.redirectUri||u.liffRedirectUri,id_token_key_type:"JWK"},d=eo.stringify(f),tg(tb.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:d}))];case 1:return n=(t=s.sent()).access_token,r=t.id_token,i=t.expires_in,eN(e),eB(n),eG(new Date(Date.now()+1e3*i)),eV(),r?(eD(r),[4,nd(r,e)]):[3,3];case 2:(o=s.sent())&&eJ(o),s.label=3;case 3:return(a=eo.parse(location.hash).context_token)?(ek(nx(a)),[3,6]):[3,4];case 4:return[4,nD()];case 5:s.sent(),s.label=6;case 6:return[2]}})})},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,t()];case 2:return i.sent(),[3,4];case 3:throw n=i.sent(),eV(),n;case 4:return[2]}})})}(n.liffClientId)]:[3,4];case 3:i.sent(),i.label=4;case 4:return eI()?[4,function(e){return a(this,void 0,void 0,function(){var t,n,r,i,o,u,l,f,d,h,v,g,m,w,b,y,I;return s(this,function(S){var C,E,O,P;switch(S.label){case 0:return[4,new Promise(function(e){var t=e$();if(!t||0>q(t,"9.5.0"))e();else if(window._liff&&window._liff.features)e();else{p.debug("cannot find window._liff.features, listen to ready event");var n=function(){p.debug("ready event is fired"),tN("ready",n),e()};tx("ready",n)}})];case 1:return S.sent(),"boolean"==typeof nR&&p.warn("liff.init is not expected to be called more than once"),nR=!!Boolean(eC(U.IS_SUBSEQUENT_LIFF_APP))||!(!eI()||eo.parse(window.location.hash).feature_token||eR())&&(eE(U.IS_SUBSEQUENT_LIFF_APP,!0),!0),[4,function(e){return a(this,void 0,void 0,function(){var t,n,r,i;return s(this,function(o){switch(o.label){case 0:return t=eo.parse(window.location.hash),n=function(e){for(var t,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=function(t){Object.keys(t).filter(function(e){return null!==t[e]&&void 0!==t[e]}
1).forEach(function(n){e[n]=t[n]})};try{for(var a=c(r),s=a.next();!s.done;s=a.next())o(s.value)}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return e}({access_token:eM(),context_token:eC(U.RAW_CONTEXT),feature_token:eR(),id_token:eU(),client_id:ex(),mst_challenge:eF(),mst_verifier:eC(U.MST_VERIFIER),msit:eC(U.MSIT)},t),nj()?eq()?[4,tg("".concat(tb.apps,"/").concat(e,"/featureToken"))]:[3,2]:[3,3];case 1:r=o.sent().featureToken,n.feature_token||(n.feature_token=r),o.label=2;case 2:(i=en(e))&&(n.client_id=i),o.label=3;case 3:return[2,n]}})})}(e.liffId)];case 2:if(n=(t=S.sent()).access_token,r=t.context_token,i=t.feature_token,o=t.id_token,u=t.client_id,l=t.mst_verifier,f=t.mst_challenge,d=t.msit,r){if("string"!=typeof r)throw et(k,"Cannot get context token, perhaps there is an incorrect parameter in permanent link");ek(nx(r))}if(void 0!==(null===(y=eT())||void 0===y?void 0:y.liffId)&&(null===(I=eT())||void 0===I?void 0:I.liffId)!==e.liffId)throw et(k,"Invalid LIFF ID");return!eZ()&&i&&(C=e.liffId,E=i,e8("multipleLiffTransition")&&nN({pathname:"app/".concat(C),query:{feature_token:E}}),nj()&&ej(i)),f&&eE(U.MST_CHALLENGE,f),l&&(O=l,eE(U.MST_VERIFIER,O)),u&&eN(u),d&&(P=d,eE(U.MSIT,P)),window.addEventListener("pageshow",nU),eq()?[3,5]:i&&n?[3,5]:nj()?(nw({redirectUri:eu(location.href,{"liff.hback":"2"})}),[4,new Promise(function(){})]):[3,4];case 3:S.sent(),S.label=4;case 4:throw nw(),et(k,"Failed to parse feature_token or access_token");case 5:return n&&i?[4,ty(n)]:[3,7];case 6:if(v=(h=S.sent()).client_id,g=h.expires_in,v!==en(e.liffId))throw nw(),et(k,"Failed to verify access_token");ej(i),eG(new Date(Date.now()+1e3*g)),eB(n),S.label=7;case 7:return[4,function(e,t){return a(this,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:var i,o,a;return(n=eA())?[2,n]:e&&t?[4,(o=(i={msit:e,mstVerifier:t}).msit,a=i.mstVerifier,o&&a?tg(tb.subWindowGetMSTByMSIT,{method:"POST",body:JSON.stringify({msit:o,mstVerifier:a})}):Promise.reject(et(T,"no proper argument")))]:[3,2];case 1:return[2,r.sent().mst];case 2:return[2,null]}})})}(d,l)];case 8:return(m=S.sent())?(eE(U.MST,m),[4,m?tg(tb.subWindowGetAppData,{method:"POST",body:JSON.stringify({mst:m})}):Promise.reject(et(T,"no proper argument"))]):[3,10];case 9:(w=S.sent().data)&&eL(JSON.stringify(w)),S.label=10;case 10:return o&&!eU()&&eD(o),o&&u&&!eK()?[4,nd(o,u)]:[3,12];case 11:(b=S.sent())&&eJ(b),S.label=12;case 12:return[2]}})})}(e)]:[3,6];case 5:return i.sent(),[3,8];case 6:return eq()?[3,8]:[4,nD()];case 7:i.sent(),i.label=8;case 8:return[4,nM.invoke()];case 9:if(i.sent(),r=eT())try{td(location.href,r.endpointUrl)}catch(e){p.warn("liff.init() was called with a current URL that is not related to the endpoint URL.\n".concat(location.href," is not under ").concat(r.endpointUrl))}return[4,t()];case 10:return i.sent(),ec(window.location.href),[2]}})})}(e,this.internalHooks.beforeFinished.call)])];case 3:return i.sent(),nA("color-scheme",((null==(u=eT())?void 0:u.menuColorSetting)||{adaptableColorSchemes:["light"]}).adaptableColorSchemes.join(" ")),n_({matches:null==(l=window.matchMedia("(prefers-color-scheme: dark)"))?void 0:l.matches,media:null==l?void 0:l.media}),l.addEventListener?l.addEventListener("change",n_):l.addListener&&l.addListener(n_),[4,this.internalHooks.beforeSuccess.call()];case 4:return i.sent(),!e.withLoginOnExternalBrowser||eq()?[3,6]:(nw(),[4,new Promise(function(){})]);case 5:i.sent(),i.label=6;case 6:return[4,function(){return a(this,void 0,void 0,function(){var e,t,n;return s(this,function(r){switch(r.label){case 0:return(e=null!==(n=nG(window.location.href))&&void 0!==n?n:nG(window.document.referrer))&&q(e,"13.10.0")>=0?[2]:eI()||"android"!==e0()||(t=eo.parse(window.location.search))[tI]||t.liffIsEscapedFromApp?[2]:t.liffClientId&&document.referrer.includes("access.".concat("line.me"))?(window.location.href=eu(window.location.href,{liffIsEscapedFromApp:"true"}),[2]):t.liffClientId&&document.referrer.includes("android-app://")?[4,nV()]:[3,2];case 1:r.sent(),r.label=2;case 2:return t.liffClientId&&""===document.referrer&&1===window.history.length?[4,nV()]:[3,4];case 3:r.sent(),r.label=4;case 4:return!document.referrer.includes("liffClientId")||document.referrer.includes("liffIsEscapedFromApp")?[3,6]:[4,nV()];case 5:r.sent(),r.label=6;case 6:return[2]}})})}()];case 7:return i.sent(),[4,this.hooks.after.call()];case 8:return i.sent(),"function"==typeof t&&t(),h(),[3,11];case 9:return r=i.sent(),[4,this.internalHooks.error.call(r)];case 10:throw i.sent(),"function"==typeof n&&n(r),r;case 11:return[2]}})})},t}(b);function nJ(){return{liffApp:"https://liff.".concat("line.me"),liffServer:"https://api.".concat("line.me"),miniApp:"https://miniapp.".concat("line.me")}}function nq(){return navigator.language}function nz(){var e=e$();if(!e||!eI()||"ios"!==e0())return navigator.language;if(q(e,"14.11.0")>=0){var t=window.prompt("LIFF:GET_APP_LANGUAGE");if(t)return t}return navigator.language}function n$(e){return a(this,void 0,void 0,function(){var t,n,r,i,o,a;return s(this,function(s){switch(s.label){case 0:return!function(e){if(!G.includes(e))throw et(T,"Unexpected permission name.");var t=eT();return!!(null==t?void 0:t.scope.includes(e))}(e)?[2,{state:"unavailable"}]:(t=eM())?[4,ty(t)]:[3,2];case 1:n=unescape(s.sent().scope).split(" ");try{for(i=(r=c(n)).next();!i.done;i=r.next())if(i.value.includes(e))return[2,{state:"granted"}]}catch(e){o={error:e}}finally{try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(o)throw o.error}}return[2,{state:"prompt"}];case 2:throw et(E,"Need access_token for api call, Please login first")}})})}function nX(){var e,t,n=eT();return!!n&&"square_chat"!==n.type&&(e8("skipChannelVerificationScreen")||!eI()&&(null===(t=null===(e=n.availability)||void 0===e?void 0:e.skipChannelVerificationScreen)||void 0===t?void 0:t.permission))}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getOrigins"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return nJ()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getLanguage"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return nq()}}}(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getAppLanguage"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return nz()}}}(b);var nQ,nY=nf.on,nZ=nf.off,n0=nf.open,n1=function(){function e(e,t){var n=this;this.onSubmit=function(e){return a(n,[e],void 0,function(e){var t=e.newAccessToken,n=e.newIdToken,r=e.ICA_ERROR;return s(this,function(e){return t?this.resolve({newAccessToken:t,newIdToken:n}):r&&this.reject(et(C,r)),this.teardown(),[2]})})},this.onClose=function(){return a(n,void 0,void 0,function(){return s(this,function(e){return this.reject(et(E,"user didn't allow the agreement")),this.teardown(),[2]})})},this.onCancel=function(){return a(n,void 0,void 0,function(){return s(this,function(e){return this.reject(et(E,"user didn't allow the agreement")),this.teardown(),[2]})})},this.onError=function(e){return a(n,void 0,void 0,function(){return s(this,function(t){return this.reject(e),this.teardown(),[2]})})},this.resolve=e,this.reject=t,this.setup()}return e.prototype.setup=function(){nY("submit",this.onSubmit),nY("close",this.onClose),nY("cancel",this.onCancel),nY("error",this.onError)},e.prototype.teardown=function(){nZ("submit",this.onSubmit),nZ("close",this.onClose),nZ("cancel",this.onCancel),nZ("error",this.onError),nQ=void 0},e.prototype.open=function(e){var t=eS().liffId;t?n0({url:"".concat("https://liff.line.me/1656032314-Xgrw5Pmk"),appData:{liffId:t,channelId:en(t),accessToken:eM()},onBeforeTransition:e}).catch(this.reject):this.reject(et(E,"liffId is required"))},e}();function n2(){return a(this,void 0,void 0,function(){var e,t,n,r,i,o,c=this;return s(this,function(u){switch(u.label){case 0:if(!nX())throw et(O,"SkipChannelVerificationScreen is unavailable.");return nQ&&nQ.teardown(),e=function(){return a(c,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,function(){var e=eS().liffId;if(e)return tg("".concat(tb.unauthorizedPermissions,"?liffId=").concat(e),{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer ".concat(eM())}});throw et(E,"liffId is required")}()];case 1:if(e=t.sent(),(eI()?e:e.filter(function(e){return"chat_message.write"!==e})).length<=0)throw et(O,"All permissions have already been approved.");return[2]}})})},[4,new Promise(function(t,n){(nQ=new n1(t,n)).open(e)})];case 1:return n=(t=u.sent()).newAccessToken,r=t.newIdToken,eB(n),r&&(i=ex())?[4,nd(r,i)]:[3,3];case 2:(o=u.sent())&&(eD(r),eJ(o)),u.label=3;case 3:return[2]}})})}function n4(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:if(!(e=eM()))throw et(E,"Need access_token for api call, Please login first");return[4,ty(e)];case 1:return[2,decodeURIComponent(t.sent().scope).split(" ").filter(function(e){return""!==e})]}})})}function n3(e,t){var n=this;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return a(n,void 0,void 0,function(){var n,i,o;return s(this,function(a){switch(a.label){case 0:return i=void 0!==(n=(r.length>0?r[r.length-1]:{}).ignorePermissionCheck)&&n,[4,n$(t)];case 1:if("unavailable"!==(o=a.sent().state))return[3,2];throw et(O,"The permission is not in LIFF app scope.");case 2:return"prompt"===o&&nX()&&!i&&(eI()||"chat_message.write"!==t)?[4,n2()]:[3,4];case 3:return a.sent(),[3,5];case 4:i&&r.pop(),a.label=5;case 5:return[4,e.apply(void 0,l([],u(r),!1))];case 6:return[2,a.sent()]}})})}}var n6=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"permission"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return{query:n$,requestAll:n2,getGrantedAll:n4}},t}(b));function n5(){return tg(tb.profile)}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getProfile"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(){return n3(n5,"profile")}}(b);var n7="is_liff_external_open_window";function n8(e){if(!function(e){if(!e||"object"!=typeof e)return!1;var t=e.url,n=u([typeof t,typeof e.external],2),r=n[0],i=n[1];return"string"===r&&""!==t&&("undefined"===i||"boolean"===i)}(e))throw et(T,"Invalid parameters for liff.openWindow()");var t=e$();if(eI()){if(null!==t&&"ios"===e0()&&q(t,"9.19")>=0||!window._liff.postMessage){var n,r,i,o,a,s,c,l,f,d,h,p,v=e.url,g=e.external;window.open((-1!==v.indexOf("#")&&-1!==v.indexOf("?")&&v.indexOf("#")<v.indexOf("?")||-1===v.indexOf("?")&&-1!==v.indexOf("#")?(f=(i=u(v.split("#"),2))[0],d=(a=u((void 0===(o=i[1])?"":o).split("?"),2))[0],h=a[1]):(f=(s=u(v.split("?"),2))[0],h=(l=u((void 0===(c=s[1])?"":c).split("#"),2))[0],d=l[1]),n=h,r=d,p=n?"&".concat(n.split("&").filter(function(e){return -1===e.indexOf(n7)}).join("&").concat("".concat(r?"#".concat(r):""))):"".concat(r?"#".concat(r):""),"".concat(f,"?").concat(n7,"=").concat(!!(void 0!==g&&g)).concat(p)))}else tj("openWindow",e)}else window.open(e.url,"_blank")}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"openWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(e){return n8(e)}}}(b);var n9=function(e){var t;return"object"==typeof e&&null!==e&&("string"==typeof(t=e.type)||t instanceof String)};function re(e){return Promise.reject(et(T,e))}function rt(e){if(!(Array.isArray(e)&&e.every(n9)))return re("Parameter 'messages' must be an array of { type, ... }");var t=e.length;return t<1||t>5?re("Number of messages should be in range 1 to ".concat(5,".")):tg(tb.message,{method:"POST",body:JSON.stringify({messages:e})}).catch(rn)}var rn=function(e){if("403"===e.code){var t="12.0.0"===e$(),n="ios"===e0(),r=ev();t&&(n||r)&&window.alert("LINEã¢ããªãLINE 12.0.1以éã«ã¢ãããã¼ããã¦ãã ããã\nPlease update your LINE app to LINE 12.0.1 or later.")}throw e};function rr(){return tg(tb.friendship)}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"sendMessages"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return n3(rt,"chat_message.write")}})(b),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getFriendship"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return n3(rr,"profile")}}(b);var ri,ro=function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.utsExtra={isLiffSuccessful:!1,isLoggedIn:!1,id:"",version:""},t.injected=!1,t}return i(t,e),Object.defineProperty(t,"CUSTOMPLACEID_INIT",{get:function(){return"liff.init"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"CUSTOMTYPE",{get:function(){return"liffSdk"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"LiffUtsLoginStatus",{get:function(){return{isLoggedIn:1,isLiffSuccessful:2}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return"analytics"},enumerable:!1,configurable:!0}),t.prototype.install=function(e){var t=e.liff,n=e.internalHooks;this.liffCore=t,n.init.beforeFinished(this.beforeInitFinished.bind(this)),n.init.beforeSuccess(this.beforeInitSuccess.bind(this)),n.init.error(this.initError.bind(this))},t.prototype.createDeprecatedUtsProxy=function(e){return new Proxy(e,{get:function(e,t){var n=e[t];return"function"==typeof n?function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return p.warn("[LIFF Analytics] ".concat("LIFF Analytics is deprecated and will be removed in a future version. Please migrate to alternative analytics solutions."," Called method: ").concat(String(t))),n.apply(e,r)}:n}})},t.prototype.changeRatioToUTSFormat=function(e){if(e&&Number.isFinite(e))return Math.round(100*e)},t.prototype.setExtra=function(){var e,n=this.utsExtra,r=n.isLiffSuccessful,i=n.isLoggedIn,o=n.id,a=n.version,s=(i?t.LiffUtsLoginStatus.isLoggedIn:0)|(r?t.LiffUtsLoginStatus.isLiffSuccessful:0);null===(e=this.uts)||void 0===e||e.setExtra("liff",{id:o,loginStatus:s,version:a})},t.prototype.assignUtsExtra=function(e){Object.assign(this.utsExtra,e)},t.prototype.setVersion=function(e){this.assignUtsExtra({version:e}
1),p.debug("[LIFFUTS][SDK version] ".concat(e)),this.setExtra()},t.prototype.setLiffId=function(e){this.assignUtsExtra({id:e}),p.debug("[LIFFUTS][LIFFID] ".concat(e)),this.setExtra()},t.prototype.setIsLoggedIn=function(e){this.assignUtsExtra({isLoggedIn:e}),p.debug("[LIFFUTS][isLoggedIn] ".concat(e)),this.setExtra()},t.prototype.sendLiffInit=function(){var e;p.debug("[LIFFUTS][sendCustom] liff.init"),null===(e=this.uts)||void 0===e||e.sendCustom({type:t.CUSTOMTYPE,params:{placeId:t.CUSTOMPLACEID_INIT}})},t.prototype.setIsLiffSuccessful=function(e){this.assignUtsExtra({isLiffSuccessful:e}),p.debug("[LIFFUTS][isLiffInitSuccessful] ".concat(e)),this.setExtra()},t.prototype.prepareReferrer=function(e){var t={};Object.keys(e).forEach(function(n){if(B.includes(n)){var r=e[n];"string"==typeof r&&r&&(t[n.replace(/^liff\.ref\./,"")]=r)}}),Object.keys(t).length>0&&(this.referrer=t)},t.prototype.beforeInitFinished=function(){return a(this,void 0,void 0,function(){var e,t,n,r,i,c,u,l,f,d,h,v;return s(this,function(g){switch(g.label){case 0:if(e=eo.parse(window.location.search),this.prepareReferrer(e),!(n=null==(t=eT())?void 0:t.utsTracking))return[2];if(i=(r=eS()).liffId,c=r.analytics,"auto"!==n.mode||!c)return[3,6];p.warn("[LIFF Analytics] LIFF Analytics is deprecated and will be removed in a future version. Please migrate to alternative analytics solutions."),p.debug("[LIFFUTS] ".concat((new Date).toUTCString())),g.label=1;case 1:return g.trys.push([1,3,,4]),u=this,[4,new Promise(function(e,t){var n=window.uts,r=document.createElement("script");r.type="text/javascript",r.src="https://static.line-scdn.net/uts/edge/4.1.0/uts.js",r.onload=function(){e(window.uts),window.uts=n},r.onerror=function(e){t(e)},document.getElementsByTagName("head")[0].appendChild(r)})];case 2:return u.uts=g.sent(),[3,4];case 3:return l=g.sent(),p.debug("[LIFFUTS] cannot load UTS, reason: ".concat(l)),[2];case 4:return f=o(o({}
1,c.context),{utsId:c.context.utsId,appName:c.context.appName,appEnv:c.context.appEnv||"release"}),d=o(o({endpoint:"https://uts-front.line-apps.com"},c.options),{sampleRate:this.changeRatioToUTSFormat(n.sendRatio),version:"current"}),this.uts.init(f,d),[4,function(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,function(){return a(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:if(!eq())return[3,6];n.label=1;case 1:return n.trys.push([1,5,,6]),(e=eK())&&e.sub?[2,e.sub]:[3,2];case 2:return[4,n5()];case 3:if((t=n.sent())&&t.userId)return[2,t.userId];n.label=4;case 4:return[3,6];case 5:return n.sent(),p.debug("can't retrieve Mid/Uid because of something wrong"),[3,6];case 6:return[2]}})})}()];case 1:return(e=t.sent())&&"u"===e.substring(0,1)?[2,e]:[2]}})})}()];case 5:(h=g.sent())&&(p.debug("[LIFFUTS][mid] ".concat(h)),this.uts.setMid(h)),(null==t?void 0:t.tid)&&(p.debug("[LIFFUTS][tid] ".concat(t.tid)),this.uts.setTid(t.tid)),this.referrer&&(p.debug("liff.ref.referrer",this.referrer),this.uts.setSessionParams(this.referrer)),i&&this.setLiffId(i),this.setIsLoggedIn(eq()),this.setVersion(ez()),v=es(location.href),p.debug("[LIFFUTS][url] ".concat(v)),this.uts.setUrl(v),this.liffCore.analytics=this.createDeprecatedUtsProxy(this.uts),this.injected=!0,g.label=6;case 6:return[2]}})})},t.prototype.beforeInitSuccess=function(){return this.injected&&(this.setIsLiffSuccessful(!0),this.sendLiffInit()),Promise.resolve()},t.prototype.initError=function(){return this.injected&&(this.setIsLiffSuccessful(!1),this.sendLiffInit()),Promise.resolve()},t}(b),ra=function(e){p.warn("[LIFF Analytics] LIFF Analytics is deprecated and will be removed in a future version. Please migrate to alternative analytics solutions. Called function: sendShareTargetPicker"),p.debug("[LIFFUTS][sendCustom] liff.shareTargetPicker"),e.sendCustom({type:"liffSdk",params:{placeId:"liff.shareTargetPicker"}})},rs=function(){function e(e,t){var n=this;this.resolve=e,this.reject=t,this.onSubmit=function(e){var t=e.message;n.resolve({value:t}),n.destroy()},this.onClose=function(){n.resolve({value:null}),n.destroy()},this.onCancel=function(){n.resolve({value:null}),n.destroy()},this.onError=function(e){n.reject(e),n.destroy()},this.start()}return e.prototype.start=function(){nf.on("submit",this.onSubmit),nf.on("close",this.onClose),nf.on("cancel",this.onCancel),nf.on("error",this.onError)},e.prototype.destroy=function(){nf.off("submit",this.onSubmit),nf.off("close",this.onClose),nf.off("cancel",this.onCancel),nf.off("error",this.onError),ri=void 0},e}();function rc(){return a(this,void 0,void 0,function(){return s(this,function(e){return e7.scanCodeV2(),ri&&ri.destroy(),[2,new Promise(function(e,t){ri=new rs(e,t),nf.open({url:"https://liff.line.me/1656359117-jxmx5e11"}).catch(function(e){null==ri||ri.destroy(),t(e)})})]})})}var ru=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"scanCodeV2"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return rc},t}(b)),rl={};function rf(e,t){var n=rl,r=u(t.split("."),1)[0],i=n[t];i&&e.removeEventListener(r,i),n[t]=null}var rd=!1,rh=!1;function rp(e,t,n,r){if(void 0===n&&(n={}),"object"!=typeof e||!e.postMessage)throw et(T,"target must be window object");if("string"!=typeof t)throw et(T,"keyname must be string");if("object"!=typeof n)throw et(T,"incorrect body format. It should be Object or Array comprised of Object");if(!r)throw et(T,"serverEndPointUrl isn't passed. please fill up with proper url");if("*"===r)throw Error("serverEndPointUrl doesn't allow to set '*'");var i={name:t,body:n};e.postMessage(i,r)}var rv=function(){function e(){this.payloadToShareTargetPicker=null,this.popupWindow=null,this.doesWaitForSubwindowResult=!1}return e.getInstance=function(){return e.instance?e.instance.reset():e.instance=new e,e.instance},e.prototype.init=function(e){return a(this,void 0,void 0,function(){var t,n;return s(this,function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),this.liffId=e.referrer.liffId,this.doesWaitForSubwindowResult=!(!e.options||!e.options.waitForSubwindowResult),this.allowPostMessageOrigin=this.initAllowPostMessageOrigin(),this.payloadToShareTargetPicker=this.buildPayloadToShareTargetPicker(e),window.AbortController&&(this.abortController=new window.AbortController),this.prepareAnotherWindow(),[4,this.initOtt()];
1case 1:return r.sent(),this.initListener(),this.openAnotherWindow(),this.doesWaitForSubwindowResult?[4,this.pollingShareResult()]:[3,3];case 2:return t=r.sent(),this.finalize(),[2,t];case 3:case 6:return[2];case 4:return[3,6];case 5:if(n=r.sent(),this.finalize(),"AbortError"!==n.name)throw n;return[3,6]}})})},e.prototype.resetAllVariables=function(){this.liffId="",this.allowPostMessageOrigin="",this.payloadToShareTargetPicker=null,this.ott="",this.popupWindow=null,this.timeoutIDForHealthCheck=null,this.abortController=null,this.internalError=null,this.doesWaitForSubwindowResult=!1},e.prototype.reset=function(){this.finalize(),this.resetAllVariables()},e.prototype.finalize=function(){var e,t;this.abortController&&this.abortController.abort(),eI()||(e=this.timeoutIDForHealthCheck,t=this.popupWindow,rf(window,"message.receivedHealthcheck"),e&&clearTimeout(e),t&&!t.closed&&t.close())},e.prototype.buildPayloadToShareTargetPicker=function(e){return{messages:e.messages,isMultiple:e.isMultiple,referrer:e.referrer}},e.prototype.initAllowPostMessageOrigin=function(e){var t;return void 0===e&&(e=tb.shareTargetPicker),(t=e.match(/^(https?:\/\/.*?)\//))&&t[1]||""},e.prototype.initOtt=function(){return a(this,void 0,void 0,function(){var e,t,n;return s(this,function(r){switch(r.label){case 0:return this.abortController&&(e=this.abortController.signal),t="".concat(tb.shareTargetPickerOtt,"/").concat(this.liffId,"/ott"),n=this,[4,tg(t,{method:"GET",signal:e}).then(function(e){return e.ott})];case 1:return n.ott=r.sent(),[2]}})})},e.prototype.prepareAnotherWindow=function(){eI()||("ios"!==e0()||ev()?this.popupWindow=window.open("","liffpopup","width=480, height=640, menubar=no, toolbar=no, scrollbars=yes"):this.popupWindow=window.open())},e.prototype.openAnotherWindow=function(){var e,t,n,r;if(eI()&&this.payloadToShareTargetPicker)e={liffId:this.liffId,ott:this.ott,data:JSON.stringify(this.payloadToShareTargetPicker),closeModals:!1},location.href="".concat("line://picker","?").concat(eo.stringify(e));else{if(this.timeoutIDForHealthCheck=window.setTimeout(this.healthCheck.bind(this),1e3),!this.popupWindow)throw et(A);t=this.popupWindow,n=this.liffId,r=this.ott,t.location.href="".concat(tb.shareTargetPicker,"?").concat(eo.stringify({liffId:n,ott:r}))}},e.prototype.initListener=function(){var e,t,n,r,i,o,a,s;eI()||(e=this.onReceivedHealthcheck.bind(this),t=this.allowPostMessageOrigin,n=window,r="receivedHealthcheck",i="message.".concat(r),o=function(n){p.debug("messageReceive",n),n.origin===t&&n.data.name===r&&e(n)},rd||(rh=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,!1}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}(),rd=!0),s=u(i.split("."),1)[0],new Promise(function(e){var t=function(t){e(t),o&&o(t),a&&a.once&&rf(n,i)};rl[i]=t,n.addEventListener(s,t,!!rh&&a)}))},e.prototype.healthCheck=function(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:if(this.popupWindow&&!this.popupWindow.closed)return[3,7];if(!this.doesWaitForSubwindowResult)return[3,5];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.onCanceled()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),this.internalError=e,[3,4];case 4:return[3,6];case 5:this.finalize(),t.label=6;case 6:return[3,8];case 7:rp(this.popupWindow,"healthcheck",void 0,this.allowPostMessageOrigin),this.timeoutIDForHealthCheck=window.setTimeout(this.healthCheck.bind(this),1e3),t.label=8;case 8:return[2]}})})},e.prototype.onReceivedHealthcheck=function(){if(!this.popupWindow||!this.payloadToShareTargetPicker)throw et(A);rp(this.popupWindow,"ready",this.payloadToShareTargetPicker,this.allowPostMessageOrigin)},e.prototype.onCanceled=function(){return a(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:if(eI()||!this.ott)throw Error("need to call with ott in client");return this.abortController&&(e=this.abortController.signal),t={liffId:this.liffId,ott:this.ott},[4,tg("".concat(tb.shareTargetPickerResult,"?").concat(eo.stringify(t)),{method:"POST",signal:e,headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:"result=CANCEL"})];case 1:return[2,"ok"===n.sent().status]}})})},e.prototype.getShareResult=function(){return a(this,void 0,void 0,function(){var e,t;return s(this,function(n){if(!this.ott)throw Error("need to call with ott in client");return this.abortController&&(e=this.abortController.signal),t={liffId:this.liffId,ott:this.ott},p.debug("fetch: getShareResult"),[2,tg("".concat(tb.shareTargetPickerResult,"?").concat(eo.stringify(t)),{method:"GET",headers:{Accept:"application/json"},signal:e})]})})},e.isPollingTimeOut=function(e,t){return(t-e)/6e4>=10},e.prototype.pollingShareResult=function(){return a(this,void 0,void 0,function(){var t,n;return s(this,function(r){switch(r.label){case 0:t=Date.now(),r.label=1;case 1:if(e.isPollingTimeOut(t,Date.now()))return[3,4];if(this.internalError)throw this.internalError;
1return[4,this.getShareResult()];case 2:if((n=r.sent())&&n.result)switch(n.result){case"SUCCESS":return[2,{status:"success"}];case"CANCEL":return[2];default:throw Error(n.resultDescription)}return[4,new Promise(function(e){setTimeout(e,500)})];case 3:return r.sent(),[3,1];case 4:throw Error("Timeout: not finished within ".concat(10,"min"))}})})},e}(),rg=new(function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.shareTargetPicker=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return a(t,l([e],u(n),!1),void 0,function(e,t){var n,r,i,o,a,c,u;return void 0===t&&(t={}),s(this,function(s){switch(s.label){case 0:if(e7.shareTargetPicker(),!e||!Array.isArray(e)||0===e.length)throw et(T,"no proper argument");if(e.length>5)throw et(T,"exceed the limit of num of messages");if(!(n=eS().liffId))throw et(P);window.liff&&(r=window.liff).analytics&&ra(r.analytics),i=void 0===t.isMultiple||t.isMultiple,s.label=1;case 1:return s.trys.push([1,3,,4]),o=rv.getInstance(),a=e$(),c={waitForSubwindowResult:!0},eI()&&a&&0>q(a,"10.11.0")&&(c.waitForSubwindowResult=!1),[4,o.init({messages:e,isMultiple:i,referrer:{liffId:n,url:location.origin},options:c})];case 2:return[2,s.sent()];case 3:throw(u=s.sent())instanceof ee?u:et(F,u.message);case 4:return[2]}})})},t}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"shareTargetPicker"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this.shareTargetPicker},t}(b));function rm(e,t){return a(this,void 0,void 0,function(){var n,r;return s(this,function(i){switch(i.label){case 0:return n=tb.createShortcutOnHomeScreen,(r=new URL(n)).searchParams.append("liffId",e),r.searchParams.append("url",t.url),t.description&&r.searchParams.append("description",t.description),[4,tg(r.toString())];case 1:return[2,i.sent().shortcutPageUrl]}})})}function rw(e){if(ep(e))throw et(T,"LINE URL scheme are not supported in the current environment.")}function rb(e){if(void 0===e.url||null===e.url||""===e.url)throw et(T,"no proper argument");var t,n=eT();if(!(null===(t=null==n?void 0:n.availability.addToHomeLineScheme)||void 0===t?void 0:t.permission)){if(ep(e.url))throw et(O,"No permission to specify line schema in url.");if(e.description)throw et(O,"No permission to specify description.")}if(!ep(e.url)){if(!n)throw et(O,"Could not get Context from server.");n.liffId!==ed(e.url)&&td(e.url,n.endpointUrl)}}function ry(e){return a(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:if(!(t=eS().liffId))throw et(k,"Invalid LIFF ID.");return"ios"===e0()?[4,function(e,t){return a(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return rw(t.url),[4,rm(e,t)];case 1:return n8({url:n.sent(),external:!0}),[2]}})})}(t,e)]:[3,2];case 1:return n.sent(),[3,4];case 2:return[4,function(e,t){return a(this,void 0,void 0,function(){var n,r;return s(this,function(i){switch(i.label){case 0:return n={liffId:e,targetUrl:t.url,description:t.description},r="".concat("line://shortcut/liff","?").concat(eo.stringify(n)),location.href=r,[4,function(e,t){return a(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return eI()?[2]:[4,new Promise(function(e){setTimeout(e,1e3)})];case 1:return n.sent(),"hidden"===document.visibilityState?[2]:(rw(t.url),[4,rm(e,t)]);case 2:return n8({url:n.sent(),external:!0}),[2]}})})}(e,t)];case 1:return i.sent(),[2]}})})}(t,e)];case 3:n.sent(),n.label=4;case 4:return[2]}})})}var rI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"createShortcutOnHomeScreen"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(e){return function(e){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return rb(e),e7.createShortcutOnHomeScreen(),[4,ry(e)];case 1:return t.sent(),[2]}})})}(e)}},t}(b),rS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"internalCreateShortcutOnHomeScreen"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(e){return function(e){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return rb(e),e7.internalCreateShortcutOnHomeScreen(),[4,ry(e)];case 1:return t.sent(),[2]}})})}(e)}},t}(b);function rC(e){return a(this,arguments,void 0,function(e){var t=e.productIds;return s(this,function(e){switch(e.label){case 0:return[4,tj("iap.getPlatformProducts",{productIds:t}).catch(function(e){if(e.code&&e.description)throw et(e.code,e.description);throw et(C,"Failed to get platform products",{cause:e})})];case 1:return[2,e.sent().products]}})})}var rE,rT=function(e){return a(void 0,[e],void 0,function(e){var t,n=e.productId,r=e.orderId;return s(this,function(e){switch(e.label){case 0:return(null==(t=eT())?void 0:t.isIapSandbox)?[4,a(void 0,[{productId:n,orderId:r}],void 0,function(e){var t=e.productId,n=e.orderId;return s(this,function(e){switch(e.label){case 0:if(!window.confirm("Proceed with a test in-app purchase?"))throw et("CANCELED","Transaction was canceled.");return[4,tg(tb.iapVirtualConfirm,{method:"POST",body:JSON.stringify({productId:t,orderId:n})})];case 1:return e.sent(),[2]}})})]:[3,2];case 1:case 3:return e.sent(),[2];case 2:return[4,tj("iap.createPayment",{productId:n,orderId:r}).catch(function(e){if(e.code&&e.description)throw et(e.code,e.description);throw et(C,"Failed to get platform products",{cause:e})})]}})})},rk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"iap"},enumerable:!1,configurable:!0}),t.prototype.install=function(){var e=this;return{getPlatformProducts:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return a(e,void 0,void 0,function(){return s(this,function(e){return e7.iap(),[2,rC.apply(void 0,l([],u(t),!1))]})})},createPayment:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return a(e,void 0,void 0,function(){return s(this,function(e){return e7.iap(),[2,rT.apply(void 0,l([],u(t),!1))]})})},requestConsentAgreement:function(){return a(e,void 0,void 0,function(){return s(this,function(e){return e7.iap(),[2,a(void 0,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,tj("iap.requestConsentAgreement").catch(function(e){if(e.code&&e.description)throw et(e.code,e.description);throw et(C,"Failed to request consent agreement",{cause:e})})];case 1:return e.sent(),[2]}})})]})})}}},t}(b),rO=nf.on,rP=nf.off,r_=nf.open,rL=function(){function e(e,t){var n=this;this.onSubmit=function(e){return a(n,void 0,void 0,function(){return s(this,function(t){return e.ADD_FRIEND_ERROR?this.reject(et(F,e.ADD_FRIEND_ERROR_MESSAGE||e.ADD_FRIEND_ERROR)):this.resolve(),this.teardown(),[2]})})},this.onClose=function(){return a(n,void 0,void 0,function(){return s(this,function(e){return this.resolve(),this.teardown(),[2]})})},this.onCancel=function(){return a(n,void 0,void 0,function(){return s(this,function(e){return this.reject(et(E,"user didn't complete the friend request")),this.teardown(),[2]})})},this.onError=function(e){return a(n,void 0,void 0,function(){return s(this,function(t){return this.reject(e),this.teardown(),[2]})})},this.resolve=e,this.reject=t,this.setup()}return e.prototype.setup=function(){rO("submit",this.onSubmit),rO("close",this.onClose),rO("cancel",this.onCancel),rO("error",this.onError)},e.prototype.teardown=function(){rP("submit",this.onSubmit),rP("close",this.onClose),rP("cancel",this.onCancel),rP("error",this.onError),rE=void 0},e.prototype.open=function(e){var t=eS().liffId;t?r_({url:"".concat("https://liff.line.me/1656032314-CWSCEjzU"),appData:{liffId:t,accessToken:eM()},onBeforeTransition:e}).catch(this.reject):this.reject(et(P,"liffId is required"))},e}();function rA(){return a(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:e=eS().liffId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,tm("".concat(tb.oaAddFriendRateLimit,"?liffId=").concat(e),{method:"POST"})];case 2:return t=n.sent(),[3,4];case 3:throw n.sent(),et(C,"Failed to check rate limit");case 4:if(429===t.status)throw et("RATE_LIMIT_EXCEEDED","Rate limit exceeded for friend request");
1if(!t.ok)throw et(C,"Failed to check rate limit");return[2]}})})}function rF(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return e7.requestFriendship(),rE&&rE.teardown(),[4,new Promise(function(e,t){(rE=new rL(e,t)).open(rA)})];case 1:return e.sent(),[2]}})})}var rx=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"requestFriendship"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return rF},t}(b)),rN=new ei,rR="activityCallState",rj="activityRecordingState",rU=function(e){rN.setItem(rR,JSON.stringify(e))},rD=function(){var e=rN.getItem(rR);return null===e?null:JSON.parse(e)},rM=function(e){rN.setItem(rj,JSON.stringify(e))},rB=function(){var e=rN.getItem(rj);return null===e?null:JSON.parse(e)};function rW(){e7.activityGetCallState();var e=rD();if(null===e)throw et(L,"Call state has not been received from the native client yet");return e}function rH(){e7.activityGetRecordingState();var e=rB();if(null===e)throw et(L,"Recording state has not been received from the native client yet");return e}var rV=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"activity"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return!ew()&&eI()&&(tx("activityCallStateChange",function(e){var t;(null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.data)&&rU(e.detail.data)}),tx("activityRecordingStateChange",function(e){var t;(null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.data)&&rM(e.detail.data)})),{getCallState:rW,getRecordingState:rH}},t}(b)),rG=Object.defineProperties({},{getOS:{value:e0,enumerable:!0,writable:!0},getVersion:{value:ez,enumerable:!0,writable:!0},getLanguage:{value:nq,enumerable:!0,writable:!0},getAppLanguage:{value:nz,enumerable:!0,writable:!0},getOrigins:{value:nJ,enumerable:!0,writable:!0},isInClient:{value:eI,enumerable:!0,writable:!0},isLoggedIn:{value:eq,enumerable:!0,writable:!0},logout:{value:to,enumerable:!0,writable:!0},getAccessToken:{value:eM,enumerable:!0,writable:!0},getIDToken:{value:eU,enumerable:!0,writable:!0},getDecodedIDToken:{value:eK,enumerable:!0,writable:!0},getContext:{value:eT,enumerable:!0,writable:!0},openWindow:{value:n8,enumerable:!0,writable:!0},closeWindow:{value:tU,enumerable:!0,writable:!0},getFriendship:{value:n3(rr,"profile"),enumerable:!0,writable:!0},getAId:{value:eO,enumerable:!0,writable:!0},getProfilePlus:{value:e_,enumerable:!0,writable:!0},getIsVideoAutoPlay:{value:eP,enumerable:!0,writable:!0},getLineVersion:{value:e$,enumerable:!0,writable:!0},isApiAvailable:{value:e8,enumerable:!0,writable:!0},getProfile:{value:n3(n5,"profile"),enumerable:!0,writable:!0},sendMessages:{value:n3(rt,"chat_message.write"),enumerable:!0,writable:!0},subWindow:{value:nf,enumerable:!0,writable:!0},ready:{value:S,enumerable:!0,writable:!0},id:{get:function(){return eS().liffId||null},enumerable:!0},_dispatchEvent:{value:function(e){var t,n={};try{n=JSON.parse(e)}catch(e){throw et(T,e.message)}var r=(t=n,new CustomEvent(x,{detail:t}));p.debug("[client dispatchEvent to js]",{type:r.type,detail:r.detail}),window.dispatchEvent(r)},enumerable:!0,writable:!0},_call:{value:tj,enumerable:!0,writable:!0},_addListener:{value:tx,enumerable:!0,writable:!0},_removeListener:{value:tN,enumerable:!0,writable:!0},_postMessage:{value:tR,enumerable:!0,writable:!0}}),rK=new w,rJ=new m(rK,rG),rq=new I(rK,rJ).install();[new I(rK,rJ),new nb,new nK,new ro,ru,th,eY,n6,rg,nk,new ti,new rI,new rS,new rk,rx,rV].forEach(function(e){rq.call(rG,e)});var rz=rG}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.