1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b5903716-2b34-42bb-88e1-961d86d07f6c",e._sentryDebugIdIdentifier="sentry-dbid-b5903716-2b34-42bb-88e1-961d86d07f6c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1571],{77800:function(e,t){"use strict";self.Headers,self.Request,self.Response,self.fetch},25720:function(e,t){var n,r,i;r=[],void 0!==(i="function"==typeof(n=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+="\0";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),w=f;for(r=0,f=f.slice(0,8);r<64;r++){var m=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(m,7)^n(m,18)^m>>>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]+w[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})?n.apply(t,r):n)&&(e.exports=i)},21571:function(e,t,n){"use strict";n.d(t,{Z:function(){return rC}}),n(77800);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},w=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}(),m=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",T="UNAUTHORIZED",E="INVALID_ARGUMENT",k="INIT_FAILED",O="FORBIDDEN",P="INVALID_CONFIG",_="INVALID_ID_TOKEN",L="CREATE_SUBWINDOW_FAILED",A="EXCEPTION_IN_SUBWINDOW",x="liffEvent",F="LIFF_STORE",N="https://liff.".concat("line.me","/"),j="https://miniapp.".concat("line.me","/"),R={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"},U="isInClient",D=["context_token","feature_token","access_token","id_token","client_id","mst_verifier","mst_challenge","msit"],M=["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"},B="liff.subwindow",H="healthCheck",V=["profile","chat_message.write","openid","email"];function G(e){return window.atob(e.replace(/-/g,"+").replace(/_/g,"/"))}var K={decode:G,decodeUnicode:function(e){return decodeURIComponent(G(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}};function J(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 q(e){var t=e.replace("#","").match(/.{2}/g)||[];if(4!==t.length)return p.warn("convertArgbToRgba: Received invalid ARGB color"),"";var n=Math.round(z(t[0])/255*100)/100,r=z(t[1]),i=z(t[2]),o=z(t[3]);return"rgba(".concat(r,", ").concat(i,", ").concat(o,", ").concat(n,")")}function z(e){return parseInt(e,16)}function $(e){var t=e.replace("#","").match(/.{2}/g)||[];if(3!==t.length)return p.warn("convertArgbToRgba: Received invalid hex color"),"";var n=z(t[0]),r=z(t[1]),i=z(t[2]);return"".concat(n,", ").concat(r,", ").concat(i)}function X(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 Q=function(e){var t=new RegExp("(?:(?:^|.*;\\s*)".concat(e,"\\s*\\=\\s*([^;]*).*$)|^.*$"));return document.cookie.replace(t,"$1")},Y=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},Z=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},ee=new Set(["400","401","403","404","429","500"]),et=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 en(e,t,n){return(null==n?void 0:n.cause)&&console.error("This is the cause of LiffError described below.",n.cause),new et(e,t||"",n||{})}function er(e){var t=e.match(/([^-]+)-[^-]+/);return t&&t[1]}var ei,eo=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}(),ea={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("&")}},es="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function ec(e){for(var t="",n=0;n<e;n++)t+=es[Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967296*es.length)];return t}function eu(e){var t=new URL(e),n=t.hash.slice(1).split("&").filter(function(e){return!D.some(function(t){return e.startsWith("".concat(t,"="))})}).join("&");return t.hash=n,t.toString()}var el=function(e){var t=eu(e);
1if(t!==e){var n,r,i,o=(n=new URL(t)).toString().replace(new RegExp(String.raw(ed||(r=["^",""],i=["^",""],Object.defineProperty?Object.defineProperty(r,"raw",{value:i}):r.raw=i,ed=r),n.origin)),"");window.history.replaceState(history.state,"",o)}};function ef(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 ed,eh=((ei={})[N]=function(){var e=ev(N);return new RegExp("^".concat(e,"(\\d+-\\w+)"))},ei[j]=function(){var e=ev(j);return new RegExp("^".concat(e,"((\\d+-\\w+)|(\\w+$))"))},ei);function ep(e){for(var t in eh){var n=e.match(eh[t]());if(n)return n[1]}return null}function ev(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eg(e){return e.startsWith("line:")}function ew(e){return void 0===e&&(e=window.navigator.userAgent),/ipad/.test(e.toLowerCase())}function em(e){return void 0===e&&(e=window.navigator.userAgent),/Line\/\d+\.\d+\.\d+/.test(e)}function eb(e){return void 0===e&&(e=window.navigator.userAgent),/Line\/\d+\.\d+\.\d+ LIFF/.test(e)}var ey=function(){return"undefined"==typeof window},eI=null;function eS(){return null===eI&&(eI=eb()||em()&&/[#|&]access_token=/.test(location.hash)||"1"===sessionStorage.getItem("".concat(F,":").concat(U)),sessionStorage.setItem("".concat(F,":").concat(U),eI?"1":"0")),!!eI}function eC(){var e;return null!==(e=window.__liffConfig)&&void 0!==e?e:{}}function eT(e){return function(e,t){if(!t)throw en(P,"liffId is necessary for liff.init()");var n=(eS()?sessionStorage:localStorage).getItem("".concat(F,":").concat(t,":").concat(e));try{return null===n?null:JSON.parse(n)}catch(e){return null}}(e,eC().liffId)}function eE(e,t){var n=eC().liffId;if(!n)throw en(P,"liffId is necessary for liff.init()");(eS()?sessionStorage:localStorage).setItem("".concat(F,":").concat(n,":").concat(e),JSON.stringify(t))}function ek(){return eT(R.CONTEXT)}function eO(e){eE(R.CONTEXT,e)}function eP(){return((ek()||{}).d||{}).aId}function e_(){return((ek()||{}).d||{}).autoplay||!1}function eL(){return(ek()||{}).profilePlus}function eA(e){eE(R.APP_DATA,e)}function ex(){return eT(R.MST)}function eF(){return eT(R.MST_CHALLENGE)}function eN(e){eE(R.CLIENT_ID,e)}function ej(){return eT(R.FEATURE_TOKEN)}function eR(e){eE(R.FEATURE_TOKEN,e)}function eU(){return eT(R.ID_TOKEN)}function eD(e){eE(R.ID_TOKEN,e)}function eM(){return eT(R.ACCESS_TOKEN)}function eW(e){eE(R.ACCESS_TOKEN,e)}function eB(e){var t=eC().liffId;if(!t)throw en(P,"liffId is necessary for liff.init()");(eS()?sessionStorage:localStorage).removeItem("".concat(F,":").concat(t,":").concat(e))}function eH(){return eT(R.LOGIN_TMP)}function eV(){eB(R.LOGIN_TMP)}function eG(e){var t=eC();Y("".concat(F,":").concat(R.EXPIRES,":").concat(t.liffId),e.getTime(),{expires:e.toUTCString(),path:"/",secure:null})}function eK(){return eT(R.DECODED_ID_TOKEN)}function eJ(e){eE(R.DECODED_ID_TOKEN,e)}function eq(){return!!eM()}function ez(){return"2.27.2"}(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 eS()}}})(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 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"getAId"},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"getIsVideoAutoPlay"},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"getProfilePlus"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return eL()}}}(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.27.2"}}}(b);var e$=function(){function e(){}return e.prototype.invoke=function(){var e;return void 0===e&&(e=window.navigator.userAgent),/LIFF\/SubWindow/.test(e)},e}(),eX=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(B)&&this.setInSubWindow(!0),!(!this.getInSubWindow()&&!this.getSubWindowIdentifier())},e.prototype.getInSubWindow=function(){var t=this.storage.getItem("".concat(F,":").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(F,":").concat(this.getLiffId(),":").concat(e.IN_SUB_WINDOW_KEY),String(t))},e.prototype.getLiffId=function(){var e=eC().liffId;if(!e)throw en(P,"liffId is necessary for liff.init()");return e},e}(),eQ=new(function(e){function t(){var t=e.call(this)||this;return ey()?t.impl={invoke:function(){return!1}}:eS()?t.impl=new e$:t.impl=new eX(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)),eY=eQ.install();function eZ(){var e=navigator.userAgent.match(/Line\/\d+(\.\d+)*/i);return e?e[0].slice(5):null}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=ek();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=eZ())&&!(s&&J(r,s)>0)&&J(r,a)>=0,u=eS();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 LIFF app")}}}(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 eZ()}}})(b),function(e){function t(){return e.call(this)||this}i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"getOS"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(){return e0()}}}(b);var e4=function(){return eq()?!eb()&&em()?{available:!1,error:{code:O,message:"Subwindow is not supported in this browser"}}:eY()?{available:!1,error:{code:O,message:"this api can be only called in parent window"}}:e2("subwindowOpen",!0):{available:!1,error:{code:T,message:"Need access_token for api call, Please login first"}}},e3=["subwindowOpen","shareTargetPicker","multipleLiffTransition","scanCode","scanCodeV2","getAdvertisingId","addToHomeScreen","bluetoothLeFunction","skipChannelVerificationScreen","createShortcutOnHomeScreen","internalCreateShortcutOnHomeScreen","iap"],e6={scanCode:function(){return e2("scanCode")},getAdvertisingId:function(){return e2("getAdvertisingId")},bluetoothLeFunction:function(){return e2("bluetoothLeFunction")},shareTargetPicker:function(){return eY()?{available:!1,error:{code:O,message:"this api can be only called in parent window"}}:eq()?e2("shareTargetPicker",!0):{available:!1,error:{code:T,message:"Need access_token for api call, Please login first"}}},multipleLiffTransition:function(){var e=e1("multipleLiffTransition");return e&&e.permission?eS()?{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:T,message:"Need access_token for api call, Please login first"}};var e=e4();return e.available?e2("scanCodeV2",!0):e},addToHomeScreen:function(){return eY()?{available:!1,error:{code:O,message:"this api can be only called
1in parent window"}}:e2("addToHomeScreen")},skipChannelVerificationScreen:function(){var e=ek();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(eY())return{available:!1,error:{code:O,message:"this api can be only called in parent window"}};if(!eq())return{available:!1,error:{code:T,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(eY())return{available:!1,error:{code:O,message:"this api can be only called in parent window"}};if(!eq())return{available:!1,error:{code:T,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
1in mobile device"}};var t=e2("addToHomeV2",!0,"internalCreateShortcutOnHomeScreen");return t.available?e2("addToHomeLineScheme",!0,"internalCreateShortcutOnHomeScreen"):t},iap:function(){return eS()?eq()?eY()?{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:T,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"}}}},e5=function(e){return function(){var t=e();if(!t.available)throw en(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)};function e8(e){if(!e3.some(function(t){return t===e}))throw en(E,"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){J(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;Object.keys(R).forEach(function(e){eB(R[e])}),e=eC(),Z("".concat(F,":").concat(R.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 en(E,"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)&&!!e})},tu=function(e,t){var n=e.substring(t.length);return"/"===n?"":(n.length>0&&"/"!==n[0]&&(n="/"+n),n)},tl=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},tf=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=new URLSearchParams(e.replace(/\+/g,"%2B")),i=[];try{for(var o=c(r.entries()),a=o.next();!a.done;a=o.next()){var s=u(a.value,2),l=s[0],f=s[1];i.push("".concat(tl(l),"=").concat(tl(f)))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}if(0===i.length)return[""];var d=e.split("&");return i.map(function(e,t){return e.endsWith("=")&&!d[t].endsWith("=")?e.slice(0,-1):e})}(tc(e).join("&")),tc(t)).join("&");return""!==n?"?".concat(n):""},td=function(e){var t=new RegExp("^".concat(D.join("|"))),n=e.substring(1).split("&").filter(function(e){return!t.test(e)&&!!e}).join("&");return n?"#".concat(n):""},th=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])},tp=function(e,t){var n=ts(e),r=new URL(t);if(n.username!==r.username||n.password!==r.password||r.origin!==n.origin||!th(r.pathname,n.pathname))throw en(E,"invalid URL.")},tv=new(function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.extraParams="",t.getAndValidateContext=function(){var e=ek();if(!e)throw en(k,"Could not get Context from server.");if(!e.endpointUrl)throw en(k,"Could not get endpointUrl from server.");if(!e.permanentLinkPattern)throw en(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||!th(s.pathname,r))throw en(P,"Current page is not under entrypoint.");var c=r.substring(s.pathname.length);c.length>0&&"/"!==c[0]&&(c="/"+c);var u=new RegExp("^".concat(D.join("|"))),l=o.substring(1).split("&").filter(function(e){return!u.test(e)&&!!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)&&!!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],w=h.indexOf(g);w>-1&&h.splice(w,1)}var m=h.join("&"),b="".concat(c).concat(""!==m?"?".concat(m):"").concat(f?"#".concat(f):"");return"".concat(N).concat(eC().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){if(!(t=eC().liffId))throw en(k,"Should run after liff init.");return tp(e,(n=this.getAndValidateContext()).endpointUrl),r=ts(e),i=new URL(n.endpointUrl),o=n.miniDomainAllowed?j:N,a=n.miniDomainAllowed&&n.miniAppId?n.miniAppId:t,[2,o.concat(a,tu(r.pathname,i.pathname),tf(r.search,i.search),td(r.hash))]})})},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"}
1,enumerable:!1,configurable:!0}),t}(b));function tg(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=ee.has(t)?t:C,[4,e.json().catch(function(){throw en(n,e.statusText)})];case 5:throw en((r=i.sent()).error||n,r.error_description||r.message)}})})}function tw(e){var t=function(e){if(e)return e;var t=eM();if(!t)throw en(T,"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 tm(e,t){var n;try{n=tw(t)}catch(e){return Promise.reject(e)}return fetch(e,n).then(tg)}function tb(e){var t=e.subdomain,n=e.pathname;return"https://".concat(void 0===t?"api":t,".").concat("line.me","/").concat(n)}var ty={token:tb({pathname:"oauth2/v2.1/token"}),certs:tb({pathname:"oauth2/v2.1/certs"}),"openid-configuration":tb({subdomain:"access",pathname:".well-known/openid-configuration"}),authorize:tb({subdomain:"access",pathname:"liff/v1/authorize"}),profile:tb({pathname:"v2/profile"}),message:tb({pathname:"message/v3/share"}),friendship:tb({pathname:"friendship/v1/status"}),shareTargetPicker:tb({subdomain:"access",pathname:"oauth2/v2.1/liff/shareTargetPicker"}),shareTargetPickerOtt:tb({pathname:"liff/v2/apps"}),shareTargetPickerResult:tb({subdomain:"access",pathname:"oauth2/v2.1/liff/shareTargetPicker/result"}),apps:tb({pathname:"liff/v2/apps"}),subWindowGetMSIT:tb({pathname:"liff/v2/sub/msit"}),subWindowGetMSTByMSIT:tb({pathname:"liff/v2/sub/mst"}),subWindowSubscribe:tb({subdomain:"liff",pathname:"liff/v2/sub/waitResult"}),subWindowPost:tb({pathname:"liff/v2/sub/result"}),subWindowGetAppData:tb({pathname:"liff/v2/sub/appData"}),subWindowGetOrigin:function(e){return tb({pathname:"liff/v2/sub/".concat(e,"/origin")})},accessTokenVerify:tb({pathname:"oauth2/v2.1/verify"}),unauthorizedPermissions:tb({subdomain:"liff",pathname:"liff/v2/incrementalAgreement/unauthorizedPermissions"}),permanentLink:tb({subdomain:"liff",pathname:"liff/v2/permanentLink"}),createShortcutOnHomeScreen:tb({subdomain:"liff-shortcut",pathname:"api/shortcut"})};function tI(e){return tm("".concat(ty.accessTokenVerify,"?access_token=").concat(encodeURIComponent(e)),{headers:{"Content-Type":"application/json",Accept:"application/json"}})}var tS="liff.subwindow.identifier",tC="liff.subwindow.cryptokey",tT=o(o({},W),{GET_DATA:"getData",SET_DATA:"setData",NOT_FOUND:"notFound",TEARDOWN:"teardown"}),tE={BROADCAST:"broadcast",COMMAND:"command"},tk={MAIN:"main",SUB:"sub"},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:"AES-GCM"},!1,["encrypt","decrypt"])];case 1:return[2,t.sent()];case 2:throw en(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=tk.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===tk.MAIN?ec(12):e.get("liff.subwindow.identifier")||t("liff.subwindow.identifier")||""},this.windowType!==tk.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:"AES-GCM",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 en(C,"failed to generate key");return[2,t.k];case 3:throw en(C,n.sent());case 4:return[2]}})})];case 1:return r=o.sent(),[3,3];case 2:r=e.get(tC)||t(tC)||"",o.label=3;case 3:return n.identification=(i.cryptoKey=r,i),[2]}})})}
1,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},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 en(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:tT.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 en("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 en("message bus is not ready to send message");if(!e.identifier||!e.timestamp)throw en(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:tT.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:tT.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;return s(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=(new TextEncoder).encode(n),[4,tO(r)];case 1:return t=i.sent(),[4,window.crypto.subtle.encrypt({name:"AES-GCM",iv:e},t,(new TextEncoder).encode(f))];case 2:return[2,btoa(new Uint8Array(i.sent()).reduce(function(e,t){return e+String.fromCharCode(t)},""))];case 3:throw en(C,i.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(),o=new Uint8Array((i=atob(h)).length),a=0;a<i.length;a++)o[a]=i.charCodeAt(a);
1return[4,window.crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,o.buffer)];case 2:return c=s.sent(),[2,(new TextDecoder).decode(new Uint8Array(c))];case 3:throw en(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={},tx=!1;function tF(e,t){tx||(tx=!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 tj(e,t,n){void 0===t&&(t={}),void 0===n&&(n="");var r=ej();if(!r)throw en(O,"Invalid featureToken for client features");if(!window._liff||!window._liff.postMessage)throw en(E,"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 tR(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={once:!0}),ej()?(n=o({callbackId:ec(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()};tF(e,o),tj(e,t,n.callbackId)})):Promise.reject(en(O,"Invalid featureToken for client features"))}function tU(){var e=eZ();null!==e&&("ios"===e0()&&J(e,"9.19")>=0||"android"===e0()&&J(e,"11.6.0")>=0)?location.href="liff://close":window._liff&&window._liff.postMessage?null!==e&&J(e,"10.15.0")>=0?"ios"===e0()?window._liff.postMessage("closeWindow",""):window._liff.postMessage("closeWindow","","",""):tR("closeWindow"):window.close()}function tD(e){return tm((0,ty.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 tW(e,t){e&&tM[e]&&tM[e].forEach(function(e){e(t)})}function tB(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(F,":").concat(this.getLiffId())},e.prototype.getLiffId=function(){var e=eC().liffId;if(!e)throw en(P,"liffId is necessary for liff.init()");return e},e}(),tX=new t$(new eo);function tQ(){var e=tX.getItem("subWindowStatusUpdated");return null!==e&&JSON.parse(e)}function tY(e){tX.setItem("subWindowStatusUpdated",String(e))}function tZ(){return a(this,arguments,void 0,function(e){return void 0===e&&(e=tk.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 t0=new eo,t1=new t$(ey()?t0:window.sessionStorage);function t2(){return t1.getItem("mainWindowOrigin")}function t4(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=eC().liffId,o=t2(),!window.opener||!o||!i)throw en(A);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),en(A);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)&&(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 t3(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 H:window.clearInterval(tJ),t8();break;case W.CANCEL:case W.SUBMIT:tY(!0),window.clearInterval(tJ),window.removeEventListener("message",t3),tW(o,i),null===(t=tG)||void 0===t||t.postMessage({type:o},tq);break;default:p.debug("unexpected message")}}}}var t6=function(e){return a(void 0,void 0,void 0,function(){var t,n,r,i;
1return s(this,function(o){if(tQ())return[2];switch(n=(t=e.context).eventName,r=t.data,i=tz,n){case W.INIT:t7(!r.hasOpener);break;case W.CANCEL:case W.SUBMIT:tY(!0),tW(n,r),null==i||i.reply(e,{eventName:n});break;case W.CLOSE:!1===tQ()&&(tY(!0),tW(W.CLOSE,{})),t8()}return[2]})})};function t5(){window.clearInterval(tK),window.clearInterval(tJ),window.removeEventListener("message",t3)}function t7(e){if(void 0===e&&(e=!1),t5(),tY(!1),e){var t=tG;t&&(t.close(),tG=null)}}function t8(){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 t9=null;function ne(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 nt={height:"full",closeButtonPosition:"right",closeButtonColor:"black",closeButtonLabel:""};function nn(e){var t,n,r,i,o,c,f,d,h,p,v,g,w;return e7.subwindowOpen(),eS()?(h=e.appData,p=e.native,v=eC().liffId,g=eF(),w=ep(e.url),v?g?w?(i=(r={mainLiffId:v,subLiffId:w,mstChallenge:g,appData:h,view:(n={},Object.keys(t=Object.assign({},nt,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?tm(ty.subWindowGetMSIT,{method:"POST",body:JSON.stringify({mainLiffId:i,subLiffId:o,mstChallenge:c,appData:f,view:d})}):Promise.reject(en(E,"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,w,m,b,y=this;return s(this,function(I){switch(I.label){case 0:if(n=t.msit,r=t.mstChallenge,o=void 0===(i=t.reconnectCount)?0:i,c=function(){return a(y,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];t9=null,t.onSuccess.apply(t,l([],u(e),!1))},d=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t9=null,t.onError.apply(t,l([],u(e),!1))},h=Date.now(),null===t9&&(t9=h),p=h-t9,o>=10||p>6e5)return d(en(C,"Failed to connect")),[2];I.label=1;case 1:return I.trys.push([1,3,,5]),[4,function(e,t){var n;try{n=tw(t)}catch(e){return Promise.reject(e)}return fetch(e,n)}(ty.subWindowSubscribe,{method:"POST",body:JSON.stringify({msit:n,mstChallenge:r})})];case 2:return v=I.sent(),[3,5];case 3:return I.sent(),[4,c()];case 4:return I.sent(),[2];case 5:return v.status>=500?[4,c()]:[3,7];case 6:return I.sent(),[3,17];case 7:return v.status>=400&&500>v.status?[4,ne(v)]:[3,9];case 8:return g=(w=I.sent())?en(E,w.errorDetail):en(C,"Some error happened in the server"),d(g),[3,17];case 9:return 200!==v.status?[3,16]:[4,ne(v)];case 10:if(!(w=I.sent()))return d(en(C,"Some error happened in the server")),[2];switch(m=w.status,b=w.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 I.sent(),[3,15];case 13:return f(m,b),[3,15];case 14:d(en(C,"Some error happened in the server")),I.label=15;case 15:return[3,17];case 16:d(en(C,"Some error happened in the server")),I.label=17;case 17:return[2]}})})}({msit:t,mstChallenge:g,onSuccess:function(e,t){tW(e,t)},onError:function(e){tW(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(en(E,"params.url must be liff url or mini url")):Promise.reject(en(T,"mst_challenge is invali
1d")):Promise.reject(en(T,"liffId is invalid"))):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,w,m,b,y,I,S;switch(s.label){case 0:return(t=ep(e.url))?(t7(!0),[4,t8()]):[2,Promise.reject(en(E,"params.url must be liff url or mini url"))];case 1:return s.sent(),tG="ios"!==e0()||ew()?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(B,"true"),[4,tZ()];case 2:return o=s.sent(),i.searchParams.append(tS,o.identification.identifier),i.searchParams.append(tC,o.identification.cryptoKey),i.hostname=(w=(g=u(i.hostname.split(".")))[0],m=g.slice(1),l(["".concat(w,"-ext")],u(m),!1).join(".")),a=i.toString(),[4,tD(t)];case 3:if(f=(c=s.sent()).origin,d=c.subwindowCommonModule,!(h=tG))throw en(L);if(!d)return h.close(),[2];tq=f,o.listen(t6),o.setData("appData",r),window.addEventListener("message",t3),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:H},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&&(t5(),tG=null,!1===tQ()&&(tY(!0),tW(W.CLOSE,{})))},100),[2]}})})}(e)}function nr(e){if(!e.mst||!e.status)return Promise.reject(en(E,"no proper argument"));var t=JSON.stringify(e);return tm(ty.subWindowPost,{method:"POST",body:t})}
1function ni(){if(!eY())throw en(T,"this api can be only called in child window")}function no(e){var t;return void 0===e&&(e={}),ni(),eS()?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=ex())?[4,nr({mst:t,status:W.CANCEL,result:e})]:[2,Promise.reject(en(T,"mst is invalid"))];case 1:return n=r.sent(),tY(!0),[2,n]}})})}(e):(void 0===(t=e)&&(t={}),t4(W.CANCEL,t))}function na(e){var t;return void 0===e&&(e={}),ni(),eS()?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=ex())?[4,nr({mst:t,status:W.SUBMIT,result:e})]:[2,Promise.reject(en(T,"mst is invalid"))];case 1:return n=r.sent(),tY(!0),[2,n]}})})}(e):(void 0===(t=e)&&(t={}),t4(W.SUBMIT,t))}function ns(){return ni(),eS()?function(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return!1!==tQ()?[3,2]:(e=ex())?[4,nr({mst:e,status:W.CLOSE,result:{}})]:[2,Promise.reject(en(T,"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 nc(){return ni(),function(){var e,t=eT(R.APP_DATA);try{e=t?JSON.parse(t):{}}catch(t){e={}}return Promise.resolve(e)}()}var nu={on:tB,off:tH,open:nn,cancel:no,submit:na,close:ns,getAppData:nc};(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:tB.bind(this),off:tH.bind(this),open:function(t){return nn.call(e,o(o({},t),{onBeforeTransition:void 0}))},cancel:no.bind(this),submit:na.bind(this),close:ns.bind(this),getAppData:nc.bind(this)}}})(b);var nl,nf=n(25720),nd=n.n(nf),nh=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}}}},np=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]}})})}},nv=function(e){var t,n,r,i,o=ec(43),a=(n=nd()(o),r="",n.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ").forEach(function(e){r+=String.fromCharCode(parseInt(e))}),window.btoa(r)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),s=eC();if(!s||!s.liffId)throw en(P,"You need to define `liffId` for liff.login()");var c={app_id:s.liffId,state:ec(12),response_type:"code",code_challenge_method:"S256",code_challenge:a,liff_sdk_version:ez()};e&&e.redirectUri&&(c.redirect_uri=e.redirectUri),eY()&&!eS()&&((null===(i=tz)||void 0===i?void 0:i.isReady())?c.redirect_uri=window.location.href:c.disable_auto_login="true"),t={codeVerifier:o},eE(R.LOGIN_TMP,t);var u=ty.authorize+"?"+ea.stringify(c);p.debug("[Redirect] ".concat(u)),window.location.href=u},ng=function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.hooks={before:new nh},t}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"login"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this._login.bind(this)},t.prototype._login=function(e){this.hooks.before.call(e),nv(e)},t}(b),nw="undefined"==typeof navigator?"en":null!==(nl=navigator.language)&&void 0!==nl?nl:"en",nm=null;function nb(e){return a(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return nw=e,[4,ny()];case 1:return t.sent(),[2]}})})}function ny(){return a(this,void 0,void 0,function(){var e,t;return s(this,function(n){switch(n.label){case 0:return[4,tm("".concat("https://liffsdk.line-scdn.net/xlt/manifest.json"),{method:"GET",headers:{Accept:"application/json"}})];case 1:return e=n.sent(),t="".concat(nw),!e.languages[t]&&nw.includes("-")&&(t=nw.split("-")[0]),e.languages[t]||(t="en"),[4,tm("".concat("https://liffsdk.line-scdn.net/xlt","/").concat(e.languages[t]),{method:"GET",headers:{Accept:"application/json"}})];case 2:return nm=n.sent(),[2]}})})}function nI(e){if(null===nm)throw en(k,"please call xlt after liff.init");return nm[e]}var nS=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"}
1,enumerable:!1,configurable:!0}),t.prototype.install=function(e){return e.internalHooks.init.beforeFinished(this.beforeInitFinished.bind(this)),{setLang:nb}},t.prototype.beforeInitFinished=function(){return a(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,ny()];case 1:return e.sent(),[2]}})})},t}(b)),nC={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)"},nT={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 nE(e){var t=ek(),n=(null==t?void 0:t.menuColorSetting)||{adaptableColorSchemes:["light"],lightModeColor:nC,darkModeColor:nT},r=n.adaptableColorSchemes,i=n.lightModeColor,a=n.darkModeColor,s=r.includes("dark");e.matches&&s?nk(o(o({},nT),a)):nk(o(o({},nC),i))}function nk(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;nO("--liff-base-background-color",f),nO("--liff-base-text-color",d),nO("--liff-base-background-rgb-color",$(f)),nO("--liff-base-text-rgb-color",$(d)),nO("--liff-light-button-border-color",h),nO("--liff-title-text-color",r),nO("--liff-title-background-color",a),nO("--liff-title-button-color",o),nO("--liff-icon-color",t),nO("--liff-status-bar-color",n),nO("--liff-title-subtext-color",i),nO("--liff-progress-bar-color",s),nO("--liff-progress-background-color",c),nO("--liff-title-button-area-background-color",q(u)),nO("--liff-title-button-area-border-color",q(l))}function nO(e,t){document.documentElement.style.setProperty(e,t)}var nP={addToHomeScreen:function(e){if(!new tt(e).invoke("addToHomeScreen"))throw en(O,"No permission for liff.addToHomeScreen()")},scanCode:function(e){if(!new tt(e).invoke("scanCode"))return Promise.reject(en(O,"No permission for liff.scanCode()"))},getAdvertisingId:function(e){if(!new tt(e).invoke("getAdvertisingId"))return Promise.reject(en(O,"No permission for liff.getAdvertisingId()"))},initPlugins:function(){}};function n_(e,t){return a(this,void 0,void 0,function(){var n,r,i,o,c,l,f,d,h,p,v,g,w,m;return s(this,function(b){switch(b.label){case 0:return r=(n=u(e.split("."),3))[0],i=n[1],o=n[2],c=JSON.parse(K.decode(r)),l=JSON.parse(K.decodeUnicode(i)),f=X(K.decode(o)),d=X("".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,tm(ty.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 en(_,'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(),en(_,"".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"),w=l.aud!==t,m=1e3*l.exp<Date.now(),g)throw en(_,'Invalid "iss" value in ID_TOKEN');if(w)throw en(_,'Invalid "aud" value in ID_TOKEN');if(m)throw en(_,'Invalid "exp" value in ID_TOKEN');return[2,l]}throw en(_,"Invalid signature in ID_TOKEN");case 6:throw en(_,'Invalid "kid" value in ID_TOKEN');case 7:return[2]}})})}function nL(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 nA(e){var t=e.pathname,n=e.query,r=n?"?".concat(ea.stringify(n)):"",i="".concat("liff://").concat(t).concat(r);location.href=i}var nx=null;function nF(e){if(e.persisted&&e8("multipleLiffTransition")){if("ios"===e0())window.location.reload();else{var t=eC().liffId,n=ej();if(!t)throw en(k,"Invalid LIFF ID.");if(!n)throw en(O,"Invalid featureToken for client features");nA({pathname:"app/".concat(t),query:{feature_token:n}})}}}function nN(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:if(!(e=eC().liffId))throw en(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=ty.apps,n="".concat(t,"/").concat(e,"/contextToken"),r=eM(),i={"Content-Type":"application/json",Accept:"application/json"},r&&(i.Authorization="Bearer ".concat(r)),[4,tm(n,{headers:i})];case 1:if(!(o=s.sent().contextToken))throw en(k,"Can not get context from server.");if(!(a=nL(o)))throw en(k,"Invalid context token.");return[2,a]}})})}(e)];case 1:return eO(t.sent()),[2]}})})}var nj=new(function(){function e(){var e=this;this.getAndValidateContext=function(){var e=ek();if(!e)throw en(k,"Could not get Context from server.");if(!e.endpointUrl)throw en(k,"Could not get endpointUrl from server.");if(!e.permanentLinkPattern)throw en(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=ea.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(ef(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}()),nR=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(en(P,t))})},nU=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)),nR(t,"LUI_ALERT_URL is not defined")},nD=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,nR("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,nU(e)];case 3:return t.sent(),[4,(n=ec(6),new Promise(function(){var e=document.createElement("div");e.innerHTML='<lui-alert id="'.concat("liffAlert","-").concat(n,'" shown title="').concat(nI("alert.android.extBrowser.autoLoginWorkaround.title"),'" message="').concat(nI("alert.android.extBrowser.autoLoginWorkaround.desc"),'" button="').concat(nI("alert.android.extBrowser.autoLoginWorkaround.button.text"),'"></lui-alert>'),document.body.appendChild(e);var t=document.getElementById("".concat("liffAlert","-").concat(n));t&&t.addEventListener("lui-button-click",function(){var e=window.open(ef(window.location.href,{liffIsEscapedFromApp:"true"}),"_blank");e&&(e.location.href=ef(window.location.href,{liffIsEscapedFromApp:"true"}),window.close())})}))];case 4:return t.sent(),[2]}})})},nM=function(e){try{return new URL(e).searchParams.get("lineAppVersion")}catch(e){return null}},nW=function(e){function t(){var t=e.apply(this,l([],u(arguments),!1))||this;return t.hooks={before:new np,after:new np},t.internalHooks={beforeFinished:new np,beforeSuccess:new np,error:new np},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;return s(this,function(n){switch(n.label){case 0:return[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,new Promise(function(e,t){var n,r=document.createElement("script"),i="ios"===e0()?(n=eZ())&&0>J(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.onload=function(){var n=window.liffClientExtension;n?e(n):t(en(k,"Unable to load client features. (Extension is empty)"))},r.onerror=function(e){t(en(k,"Unable to load client features.",{cause:e}))},r.src=i,r.type="text/javascript",document.body.appendChild(r)})]}})}
1,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=n.sent())&&t.install(e,nP),[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 en(P,"liffId is necessary for liff.init()");return window.__liffConfig=e,!eS()&&eq()&&(d=eC(),Q("".concat(F,":").concat(R.EXPIRES,":").concat(d.liffId))||to()),n=ea.parse(window.location.search),!eY()||eS()?[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,tZ(tk.SUB)];case 1:n=l.sent(),l.label=2;case 2:return(t=n).isReady()?(r=ec(8),[4,t.getData("appData")]):[3,8];case 3:return o=(i=l.sent()).eventName,c=i.data,o!==tT.NOT_FOUND?[3,6]:[4,t.teardown()];case 4:return l.sent(),[4,e()];case 5:return[2,l.sent()];case 6:c&&eA(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 t2()?[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===H&&(window.removeEventListener("message",t),s&&eA(s),t1.setItem("mainWindowOrigin",o),i&&i.postMessage&&i.postMessage({status:H},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," "),en(k,"".concat(l,": ").concat(f));return o=n.code,u=eH(),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=eC(),u=ea.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=ea.stringify(f),tm(ty.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),eW(n),eG(new Date(Date.now()+1e3*i)),eV(),r?(eD(r),[4,n_(r,e)]):[3,3];case 2:(o=s.sent())&&eJ(o),s.label=3;case 3:return(a=ea.parse(location.hash).context_token)?(eO(nL(a)),[3,6]):[3,4];case 4:return[4,nN()];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 eS()?[4,function(e){return a(this,void 0,void 0,function(){var t,n,r,i,o,u,l,f,d,h,v,g,w,m,b,y,I;return s(this,function(S){var C,T,O,P;switch(S.label){case 0:return[4,new Promise(function(e){var t=eZ();if(!t||0>J(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()};tF("ready",n)}})];case 1:return S.sent(),"boolean"==typeof nx&&p.warn("liff.init is not expected to be called more than once"),nx=!!eT(R.IS_SUBSEQUENT_LIFF_APP)||!(!eS()||ea.parse(window.location.hash).feature_token||ej())&&(eE(R.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=ea.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:eT(R.RAW_CONTEXT),feature_token:ej(),id_token:eU(),client_id:eT(R.CLIENT_ID),mst_challenge:eF(),mst_verifier:eT(R.MST_VERIFIER),msit:eT(R.MSIT)},t),nx?eq()?[4,tm("".concat(ty.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=er(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 en(k,"Cannot get context token, perhaps there is an incorrect parameter in permanent link");eO(nL(r))}if(void 0!==(null===(y=ek())||void 0===y?void 0:y.liffId)&&(null===(I=ek())||void 0===I?void 0:I.liffId)!==e.liffId)throw en(k,"Invalid LIFF ID");return!eY()&&i&&(C=e.liffId,T=i,e8("multipleLiffTransition")&&nA({pathname:"app/".concat(C),query:{feature_token:T}}),nx&&eR(i)),f&&eE(R.MST_CHALLENGE,f),l&&(O=l,eE(R.MST_VERIFIER,O)),u&&eN(u),d&&(P=d,eE(R.MSIT,P)),window.addEventListener("pageshow",nF),eq()?[3,5]:i&&n?[3,5]:nx?(nv({redirectUri:ef(location.href,{"liff.hback":"2"})}),[4,new Promise(function(){})]):[3,4];case 3:S.sent(),S.label=4;case 4:throw nv(),en(k,"Failed to parse feature_token or access_token");case 5:return n&&i?[4,tI(n)]:[3,7];case 6:if(v=(h=S.sent()).client_id,g=h.expires_in,v!==er(e.liffId))throw nv(),en(k,"Failed to verify access_token");eR(i),eG(new Date(Date.now()+1e3*g)),eW(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=ex())?[2,n]:e&&t?[4,(o=(i={msit:e,mstVerifier:t}).msit,a=i.mstVerifier,o&&a?tm(ty.subWindowGetMSTByMSIT,{method:"POST",body:JSON.stringify({msit:o,mstVerifier:a})}):Promise.reject(en(E,"no proper argument")))]:[3,2];case 1:return[2,r.sent().mst];case 2:return[2,null]}})})}(d,l)];case 8:return(w=S.sent())?(eE(R.MST,w),[4,w?tm(ty.subWindowGetAppData,{method:"POST",body:JSON.stringify({mst:w})}):Promise.reject(en(E,"no proper argument"))]):[3,10];case 9:(m=S.sent().data)&&eA(JSON.stringify(m)),S.label=10;case 10:return o&&!eU()&&eD(o),o&&u&&!eK()?[4,n_(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,nN()];case 7:i.sent(),i.label=8;case 8:return[4,nj.invoke()];case 9:if(i.sent(),r=ek())try{tp(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(),el(window.location.href),[2]}})})}(e,this.internalHooks.beforeFinished.call)])];case 3:return i.sent(),nO("color-scheme",((null==(u=ek())?void 0:u.menuColorSetting)||{adaptableColorSchemes:["light"]}).adaptableColorSchemes.join(" ")),nE({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",nE):l.addListener&&l.addListener(nE),[4,this.internalHooks.beforeSuccess.call()];case 4:return i.sent(),!e.withLoginOnExternalBrowser||eq()?[3,6]:(nv(),[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=nM(window.location.href))&&void 0!==n?n:nM(window.document.referrer))&&J(e,"13.10.0")>=0?[2]:eS()||"android"!==e0()||(t=ea.parse(window.location.search))[tS]||t.liffIsEscapedFromApp?[2]:t.liffClientId&&document.referrer.includes("access.".concat("line.me"))?(window.location.href=ef(window.location.href,{liffIsEscapedFromApp:"true"}),[2]):t.liffClientId&&document.referrer.includes("android-app://")?[4,nD()]:[3,2];case 1:r.sent(),r.label=2;case 2:return t.liffClientId&&""===document.referrer&&1===window.history.length?[4,nD()]:[3,4];case 3:r.sent(),r.label=4;case 4:return!document.referrer.includes("liffClientId")||document.referrer.includes("liffIsEscapedFromApp")?[3,6]:[4,nD()];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 nB(){return{liffApp:"https://liff.".concat("line.me"),liffServer:"https://api.".concat("line.me"),miniApp:"https://miniapp.".concat("line.me")}}function nH(){return navigator.language}function nV(){var e=eZ();if(!e||!eS()||"ios"!==e0())return navigator.language;if(J(e,"14.11.0")>=0){var t=window.prompt("LIFF:GET_APP_LANGUAGE");if(t)return t}return navigator.language}function nG(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(!V.includes(e))throw en(E,"Unexpected permission name.");var t=ek();return!!(null==t?void 0:t.scope.includes(e))}(e)?[2,{state:"unavailable"}]:(t=eM())?[4,tI(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 en(T,"Need access_token for api call, Please login first")}})})}function nK(){var e,t,n=ek();return!!n&&"square_chat"!==n.type&&(e8("skipChannelVerificationScreen")||!eS()&&(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 nB()}}})(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 nH()}}}(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 nV()}}}(b);var nJ,nq=nu.on,nz=nu.off,n$=nu.open,nX=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.ICA_ERROR;return s(this,function(e){return t?this.resolve({newAccessToken:t}):n&&this.reject(en(C,n)),this.teardown(),[2]})})},this.onClose=function(){return a(n,void 0,void 0,function(){return s(this,function(e){return this.reject(en(T,"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(en(T,"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(){nq("submit",this.onSubmit),nq("close",this.onClose),nq("cancel",this.onCancel),nq("error",this.onError)},e.prototype.teardown=function(){nz("submit",this.onSubmit),nz("close",this.onClose),nz("cancel",this.onCancel),nz("error",this.onError),nJ=void 0},e.prototype.open=function(e){var t=eC().liffId;t?n$({url:"".concat("https://liff.line.me/1656032314-Xgrw5Pmk"),appData:{liffId:t,channelId:er(t),accessToken:eM()},onBeforeTransition:e}).catch(this.reject):this.reject(en(T,"liffId is required"))},e}();function nQ(){return a(this,void 0,void 0,function(){var e,t=this;return s(this,function(n){switch(n.label){case 0:if(!nK())throw en(O,"SkipChannelVerificationScreen is unavailable.");return nJ&&nJ.teardown(),e=function(){return a(t,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:return[4,function(){var e=eC().liffId;if(e)return tm("".concat(ty.unauthorizedPermissions,"?liffId=").concat(e),{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer ".concat(eM())}});throw en(T,"liffId is required")}()];case 1:if(e=t.sent(),(eS()?e:e.filter(function(e){return"chat_message.write"!==e})).length<=0)throw en(O,"All permissions have already been approved.");return[2]}})})},[4,new Promise(function(t,n){(nJ=new nX(t,n)).open(e)})];case 1:return eW(n.sent().newAccessToken),[2]}})})}function nY(){return a(this,void 0,void 0,function(){var e;return s(this,function(t){switch(t.label){case 0:if(!(e=eM()))throw en(T,"Need access_token for api call, Please login first");return[4,tI(e)];case 1:return[2,decodeURIComponent(t.sent().scope).split(" ").filter(function(e){return""!==e})]}})})}function nZ(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,nG(t)];case 1:if("unavailable"!==(o=a.sent().state))return[3,2];throw en(O,"The permission is not in LIFF app scope.");case 2:return"prompt"===o&&nK()&&!i&&(eS()||"chat_message.write"!==t)?[4,nQ()]:[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 n0=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:nG,requestAll:nQ,getGrantedAll:nY}},t}(b));function n1(){return tm(ty.profile)}function n2(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 en(E,"Invalid parameters for liff.openWindow()");var t=eZ();if(eS()){if(null!==t&&"ios"===e0()&&J(t,"9.19")>=0||!window._liff.postMessage){var n,r,i,o,a,s,c,l,f,d,h,p,v,g=e.url,
1w=e.external;window.open((n=void 0!==w&&w,-1!==g.indexOf("#")&&-1!==g.indexOf("?")&&g.indexOf("#")<g.indexOf("?")||-1===g.indexOf("?")&&-1!==g.indexOf("#")?(d=(o=u(g.split("#"),2))[0],h=(s=u((void 0===(a=o[1])?"":a).split("?"),2))[0],p=s[1]):(d=(c=u(g.split("?"),2))[0],p=(f=u((void 0===(l=c[1])?"":l).split("#"),2))[0],h=f[1]),r=p,i=h,v=r?"&".concat(r.split("&").filter(function(e){return -1===e.indexOf("is_liff_external_open_window")}).join("&").concat("".concat(i?"#".concat(i):""))):"".concat(i?"#".concat(i):""),"".concat(d,"?").concat("is_liff_external_open_window","=").concat(!!n).concat(v)))}else tR("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"getProfile"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return nZ(n1,"profile")}})(b),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 n2(e)}}}(b);var n4=function(e){var t;return"object"==typeof e&&null!==e&&("string"==typeof(t=e.type)||t instanceof String)};function n3(e){return Promise.reject(en(E,e))}function n6(e){if(!(Array.isArray(e)&&e.every(n4)))return n3("Parameter 'messages' must be an array of { type, ... }");var t=e.length;return t<1||t>5?n3("Number of messages should be in range 1 to ".concat(5,".")):tm(ty.message,{method:"POST",body:JSON.stringify({messages:e})}).catch(n5)}var n5=function(e){if("403"===e.code){var t="12.0.0"===eZ(),n="ios"===e0(),r=ew();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 n7(){return tm(ty.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 nZ(n6,"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 nZ(n7,"profile")}}(b);var n8,n9=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(M.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=ea.parse(window.location.search),this.prepareReferrer(e),!(n=null==(t=ek())?void 0:t.utsTracking))return[2];if(i=(r=eC()).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,n1()];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=eu(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),re=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"}})},rt=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(){nu.on("submit",this.onSubmit),nu.on("close",this.onClose),nu.on("cancel",this.onCancel),nu.on("error",this.onError)},e.prototype.destroy=function(){nu.off("submit",this.onSubmit),nu.off("close",this.onClose),nu.off("cancel",this.onCancel),nu.off("error",this.onError),n8=void 0},e}();function rn(){return a(this,void 0,void 0,function(){return s(this,function(e){return e7.scanCodeV2(),n8&&n8.destroy(),[2,new Promise(function(e,t){n8=new rt(e,t),nu.open({url:"https://liff.line.me/1656359117-jxmx5e11"}).catch(function(e){null==n8||n8.destroy(),t(e)})})]})})}var rr=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 rn},t}(b)),ri={},ro=!1,ra=!1;function rs(e,t,n,r){if(void 0===n&&(n={}),"object"!=typeof e||!e.postMessage)throw en(E,"target must be window object");if("string"!=typeof t)throw en(E,"keyname must be string");if("object"!=typeof n)throw en(E,"incorrect body format. It should be Object or Array comprised of Object");if(!r)throw en(E,"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 rc=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,n,r,i,o;this.abortController&&this.abortController.abort(),eS()||(e=this.timeoutIDForHealthCheck,t=this.popupWindow,n=window,i=u((r="message.receivedHealthcheck").split("."),1)[0],(o=ri[r])&&n.removeEventListener(i,o),ri[r]=null,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=ty.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(ty.shareTargetPickerOtt,"/").concat(this.liffId,"/ott"),n=this,[4,tm(t,{method:"GET",signal:e}).then(function(e){return e.ott})];case 1:return n.ott=r.sent(),[2]}})})},e.prototype.prepareAnotherWindow=function(){eS()||("ios"!==e0()||ew()?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(eS()&&this.payloadToShareTargetPicker)e={liffId:this.liffId,ott:this.ott,data:JSON.stringify(this.payloadToShareTargetPicker),closeModals:!1},location.href="".concat("line://picker","?").concat(ea.stringify(e));else{if(this.timeoutIDForHealthCheck=window.setTimeout(this.healthCheck.bind(this),1e3),!this.popupWindow)throw en(L);t=this.popupWindow,n=this.liffId,r=this.ott,t.location.href="".concat(ty.shareTargetPicker,"?").concat(ea.stringify({liffId:n,ott:r}))}},e.prototype.initListener=function(){var e,t,n,r,i,o,a,s;eS()||(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)},ro||(ra=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}(),ro=!0),s=u(i.split("."),1)[0],new Promise(function(e){var t=function(t){e(t),o&&o(t)};ri[i]=t,n.addEventListener(s,t,!!ra&&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:rs(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 en(L);rs(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(eS()||!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,tm("".concat(ty.shareTargetPickerResult,"?").concat(ea.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,tm("".concat(ty.shareTargetPickerResult,"?").concat(ea.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}(),ru=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 en(E,"no proper argument");if(e.length>5)throw en(E,"exceed the limit of num of messages");if(!(n=eC().liffId))throw en(P);window.liff&&(r=window.liff).analytics&&re(r.analytics),i=void 0===t.isMultiple||t.isMultiple,s.label=1;case 1:return s.trys.push([1,3,,4]),o=rc.getInstance(),a=eZ(),c={waitForSubwindowResult:!0},eS()&&a&&0>J(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 et?u:en(A,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 rl(e,t){return a(this,void 0,void 0,function(){var n;return s(this,function(r){switch(r.label){case 0:return(n=new URL(ty.createShortcutOnHomeScreen)).searchParams.append("liffId",e),n.searchParams.append("url",t.url),t.description&&n.searchParams.append("description",t.description),[4,tm(n.toString())];case 1:return[2,r.sent().shortcutPageUrl]}})})}function rf(e){if(eg(e))throw en(E,"LINE URL scheme are not supported in the current environment.")}function rd(e){if(void 0===e.url||null===e.url||""===e.url)throw en(E,"no proper argument");var t,n=ek();if(!(null===(t=null==n?void 0:n.availability.addToHomeLineScheme)||void 0===t?void 0:t.permission)){if(eg(e.url))throw en(O,"No permission to specify line schema in url.");if(e.description)throw en(O,"No permission to specify description.")}if(!eg(e.url)){if(!n)throw en(O,"Could not get Context from server.");n.liffId!==ep(e.url)&&tp(e.url,n.endpointUrl)}}function rh(e){return a(this,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:if(!(t=eC().liffId))throw en(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 rf(t.url),[4,rl(e,t)];case 1:return n2({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(ea.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 eS()?[2]:[4,new Promise(function(e){setTimeout(e,1e3)})];case 1:return n.sent(),"hidden"===document.visibilityState?[2]:(rf(t.url),[4,rl(e,t)]);case 2:return n2({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 rp=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 rd(e),e7.createShortcutOnHomeScreen(),[4,rh(e)];case 1:return t.sent(),[2]}})})}(e)}},t}(b),rv=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 rd(e),e7.internalCreateShortcutOnHomeScreen(),[4,rh(e)];case 1:return t.sent(),[2]}})})}(e)}},t}(b);function rg(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,tR("iap.getPlatformProducts",{productIds:t}).catch(function(e){if(e.code&&e.description)throw en(e.code,e.description);throw en(C,"Failed to get platform products",{cause:e})})];case 1:return[2,e.sent().products]}})})}var rw=function(e){return a(void 0,[e],void 0,function(e){var t=e.productId,n=e.orderId;return s(this,function(e){switch(e.label){case 0:return[4,tR("iap.createPayment",{productId:t,orderId:n}).catch(function(e){if(e.code&&e.description)throw en(e.code,e.description);throw en(C,"Failed to get platform products",{cause:e})})];case 1:return e.sent(),[2]}})})},rm=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,rg.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,rw.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,tR("iap.requestConsentAgreement").catch(function(e){if(e.code&&e.description)throw en(e.code,e.description);throw en(C,"Failed to request consent agreement",{cause:e})})];case 1:return e.sent(),[2]}})})]})})}}},t}(b),rb=Object.defineProperties({},{getOS:{value:e0,enumerable:!0,writable:!0},getVersion:{value:ez,enumerable:!0,writable:!0},getLanguage:{value:nH,enumerable:!0,writable:!0},getAppLanguage:{value:nV,enumerable:!0,writable:!0},getOrigins:{value:nB,enumerable:!0,writable:!0},isInClient:{value:eS,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:ek,enumerable:!0,writable:!0},openWindow:{value:n2,enumerable:!0,writable:!0},closeWindow:{value:tU,enumerable:!0,writable:!0},getFriendship:{value:nZ(n7,"profile"),enumerable:!0,writable:!0},getAId:{value:eP,enumerable:!0,writable:!0},getProfilePlus:{value:eL,enumerable:!0,writable:!0},getIsVideoAutoPlay:{value:e_,enumerable:!0,writable:!0},getLineVersion:{value:eZ,enumerable:!0,writable:!0},isApiAvailable:{value:e8,enumerable:!0,writable:!0},getProfile:{value:nZ(n1,"profile"),enumerable:!0,writable:!0},sendMessages:{value:nZ(n6,"chat_message.write"),enumerable:!0,writable:!0},subWindow:{value:nu,enumerable:!0,writable:!0},ready:{value:S,enumerable:!0,writable:!0},id:{get:function(){return eC().liffId||null},enumerable:!0},_dispatchEvent:{value:function(e){var t={};try{t=JSON.parse(e)}catch(e){throw en(E,e.message)}var n=new CustomEvent(x,{detail:t});p.debug("[client dispatchEvent to js]",{type:n.type,detail:n.detail}),window.dispatchEvent(n)},enumerable:!0,writable:!0},_call:{value:tR,enumerable:!0,writable:!0},_addListener:{value:tF,enumerable:!0,writable:!0},_removeListener:{value:tN,enumerable:!0,writable:!0},_postMessage:{value:tj,enumerable:!0,writable:!0}}),ry=new m,rI=new w(ry,rb),rS=new I(ry,rI).install();[new I(ry,rI),new ng,new nW,new n9,rr,tv,eQ,n0,ru,nS,new ti,new rp,new rv,new rm].forEach(function(e){rS.call(rb,e)});var rC=rb}}]);
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.