@bootpay/client-js 5.0.1 → 5.0.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -2,14 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## Change Log
|
|
4
4
|
|
|
5
|
-
### 5.0.
|
|
5
|
+
### 5.0.2 ( Stable Latest )
|
|
6
|
+
|
|
7
|
+
* 위젯 render parameters interface partial 참조로 변경
|
|
8
|
+
|
|
9
|
+
### 5.0.1
|
|
6
10
|
|
|
7
11
|
* 위젯 현재 선택된 Parameters 값의 정보를 반환하는 함수 추가
|
|
8
12
|
* 위젯 Parameters Validate 를 별도 함수로 분리
|
|
13
|
+
* 정기결제 위젯 추가
|
|
9
14
|
|
|
10
|
-
### 5.0.0
|
|
15
|
+
### 5.0.0
|
|
11
16
|
|
|
12
|
-
* Compiler Target ES5 -> ES6 로 변경되었습니다
|
|
17
|
+
* Compiler Target ES5 -> ES6 로 변경되었습니다
|
|
13
18
|
* Typescript 4.x -> 5.x 로 업데이트 되었습니다
|
|
14
19
|
* 내부 Builder가 Babel -> Vite 로 변경 되었습니다
|
|
15
20
|
* ie11 지원이 중단되었습니다. 이제 레거시 ie11은 지원하지 않습니다. ie11을 지원하시려면 4.3.x 이전 버전을 사용해주세요
|
|
@@ -18,11 +23,11 @@
|
|
|
18
23
|
* 결제창 open_type iframe -> redirect가 기본으로 변경되었습니다. iframe을 사용하시려면 extra: { open_type: 'iframe' } 를 사용해주세요.
|
|
19
24
|
* redirect 모드 일 경우 승인 전 { event: 'confirm_ready' } 값이 { event: 'confirm' } 으로 변경 되었습니다.
|
|
20
25
|
|
|
21
|
-
### 4.3.4
|
|
26
|
+
### 4.3.4
|
|
22
27
|
|
|
23
|
-
* Utf8 내부 함수 동작시 stringify override 해서 사용하는 프레임워크 혹은 솔루션의 경우 JSON 파싱이 안되는 문제 해결
|
|
28
|
+
* Utf8 내부 함수 동작시 stringify override 해서 사용하는 프레임워크 혹은 솔루션의 경우 JSON 파싱이 안되는 문제 해결
|
|
24
29
|
|
|
25
|
-
### 4.3.3
|
|
30
|
+
### 4.3.3
|
|
26
31
|
|
|
27
32
|
* 보안이슈로 eval -> reduce key access 방식으로 변경
|
|
28
33
|
|
package/dist/index.es.js
CHANGED
|
@@ -1099,7 +1099,7 @@ class SessionStorageManager extends StorageManager {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
const SessionStorage = new SessionStorageManager();
|
|
1101
1101
|
const name = "@bootpay/client-js";
|
|
1102
|
-
const version = "5.0.1";
|
|
1102
|
+
const version = "5.0.2-beta.1";
|
|
1103
1103
|
const main = "dist/index.es.js";
|
|
1104
1104
|
const types = "dist/src/index.d.ts";
|
|
1105
1105
|
const styles = "dist/index.css";
|
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;inset:0;text-align:center;z-index:200000;white-space:nowrap}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background:before{display:inline-block;height:100%;content:" ";vertical-align:middle}.bootpay-progress-background .progress-message-window{display:inline-block;text-align:center;max-width:600px;border-radius:3px;width:100%;background-color:transparent;padding:0;vertical-align:middle}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:1rem}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:inline-block;width:50px;height:50px;border-radius:50%;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2);border-left:2px solid #ffffff;animation:spin 1s infinite linear}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:1rem}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-weight:400;color:#eee}@keyframes spin{0%{transform:rotate(0);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}50%{transform:rotate(180deg);border-left:3px solid #ffffff;border-top:2px solid rgba(255,255,255,.4);border-right:2px solid rgba(255,255,255,.4);border-bottom:2px solid rgba(255,255,255,.4)}to{transform:rotate(360deg);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}}body.bootpay-open{position:fixed!important;inset:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:#000000b3}}body.bootpay-open .bootpay-payment-background{position:fixed;inset:0;display:block;text-align:center;background-color:#000000b3;z-index:9999}body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{position:absolute;max-width:400px;width:100%;background-color:#fff;border-radius:12px;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 0 10px #0000001a}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-in{animation:__bootpay-fade-in .1s linear}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-out{animation:__bootpay-fade-out .1s linear}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header{padding:1rem;text-align:left;font-size:20px;font-weight:600;position:relative}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{top:40%;transform:translateY(-50%);padding:0;right:1rem}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{right:8px;top:50%;transform:translateY(-55%)}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after{background-color:#333;width:1px}}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body{padding:1.5rem 1rem;text-align:center;font-size:16px;color:#333;line-height:1.5}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer{display:flex;justify-content:flex-end;border-top:1px solid #f2f2f2}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:0 1 50%;padding:1rem;background-color:#fff;color:#333;font-size:16px;cursor:pointer;border:0;outline:none}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right{border-right:1px solid #f2f2f2}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#e0e0e0}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{color:#507cf3;font-weight:600}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{color:#3f6be2}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;inset:0;border-radius:0!important}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;inset:0;height:100%}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:#fff;font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#fff!important}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:#000;padding:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#000!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:relative;width:400px;height:600px;display:none;background-color:#fff;border-radius:5px;overflow:hidden}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;inset:0;width:100%;height:100%;border-radius:0}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:50px;color:#333;background-color:#fff;text-align:left}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;inset:50px 0 72px;padding:1rem;text-align:left;font-size:14px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{font-size:16px;color:#888;font-weight:400!important;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{font-size:36px;color:#333;font-weight:700;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{position:absolute;bottom:1rem;left:0;right:0;color:#888;font-size:14px;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;height:72px;padding:0 1rem;margin:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button{display:block;width:100%;padding:1rem;outline:none;border:none;background-color:#507cf3;border-radius:5px;color:#fff;font-size:16px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{outline:none;box-shadow:none}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:0;height:0;border:0;outline:0;border-radius:0!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:20px!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-open .bootpay-payment-background>.bootpay-confirm-window>iframe{display:none;width:1px;height:1px;background:transparent;border:0!important;outline:0!important}.bootpay-close-btn{position:absolute;box-shadow:none;background-color:transparent;outline:0;z-index:10001;right:8px;top:8px;height:21px;width:21px;border:0!important;outline:none!important}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;background:transparent;outline:none!important;border:0!important}}.bootpay-close-btn.active,.bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:24px;width:1px;background-color:#333}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:#fff}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}@keyframes __bootpay-slide-up{0%{transform:translateY(150%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translateY(0);opacity:1}to{transform:translateY(150%);opacity:0}}@keyframes __bootpay-fade-in{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes __bootpay-fade-out{0%{opacity:1;scale:1}to{opacity:0;scale:.9}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Bootpay={})}(this,(function(e){"use strict";var t=Object.defineProperty,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,o=(e,r,i)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,s=(e,t,r)=>new Promise(((i,n)=>{var o=e=>{try{a(r.next(e))}catch(t){n(t)}},s=e=>{try{a(r.throw(e))}catch(t){n(t)}},a=e=>e.done?i(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())}));const a={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX:e=>`__bootpay_track_${e}__`},c=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),d=e=>{let t=!1;return t="string"==typeof e||Array.isArray(e)?0===e.length:null==e||u(e,"object")&&e.constructor===Object&&0===Object.keys(e).length,t},l=e=>!d(e),u=(e,t)=>typeof e===t,p=(e,t)=>{for(let r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e};var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function y(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),r}var m={exports:{}};var v={exports:{}};const g=y(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var _;function w(){return _||(_=1,v.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==h&&h.crypto&&(r=h.crypto),!r)try{r=g}catch(m){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(m){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(m){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},a=s.Base=function(){return{extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,i=this.sigBytes,n=e.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var a=0;a<n;a+=4)t[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(i());return new c.init(t,e)}}),d=o.enc={},l=d.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new c.init(r,t/2)}},u=d.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new c.init(r,t)}},p=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,a=o/(4*s),d=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*d,o);if(d){for(var u=0;u<d;u+=s)this._doProcessBlock(n,u);r=n.splice(0,d),i.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=f.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new y.HMAC.init(e,r).finalize(t)}}});var y=o.algo={};return o}(Math),e)),v.exports;var e}m.exports=w().enc.Utf8;const b=f(m.exports);var $,k={exports:{}};function E(){return $||($=1,function(e,t){var r;e.exports=(r=w(),function(){var e=r,t=e.lib.WordArray;function i(e,r,i){for(var n=[],o=0,s=0;s<r;s++)if(s%4){var a=i[e.charCodeAt(s-1)]<<s%4*2|i[e.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return t.create(n,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,i=this._map;e.clamp();for(var n=[],o=0;o<r;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)n.push(i.charAt(s>>>6*(3-a)&63));var c=i.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return i(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)}(k)),k.exports}const S=f(E());class x{$blank(e){return d(e)}$present(e){return!this.$blank(e)}$type(e,t){return u(e,t)}$uuid(){return c()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),S.stringify(b.parse(e))}$decrypt(e){return b.stringify(S.parse(e))}getUserAgent(){return window.navigator.userAgent}}const P=1,I=2,T=3,A=4,B={level:T,setLogLevel(e){this.level=e},messageStringify(e,t){try{return`${e}: ${u(t,"object")?JSON.stringify(t):t}`}catch(r){console.error(`log parse error: ${r}`)}},debug(e,t){this.level<=P&&console.log(this.messageStringify(e,t))},info(e,t){this.level<=I&&console.info(this.messageStringify(e,t))},warn(e,t){this.level<=T&&console.warn(this.messageStringify(e,t))},error(e,t){this.level<=A&&console.error(this.messageStringify(e,t))}};class O extends x{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch(r){t=this.$storage[e]}return this.$present(t)?this.$decrypt(t):void 0}set(e,t){try{window.localStorage.setItem(e,this.$encrypt(t))}catch(r){this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=a.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=a.STORAGE_PREFIX("uuid");return this.set(t,e)}getToJSON(e){const t=this.get(e);return this.$present(t)?this.caseMarshalToJson(t):t}setToJSON(e,t){return this.set(e,JSON.stringify(t)),t}caseMarshalToJson(e){try{return JSON.parse(e)}catch(t){return JSON.parse(e.replace(/\\\"/g,'"'))}}}const R=new class extends O{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round((new Date).getTime()/1e3),t=a.STORAGE_PREFIX("session"),r=this.getToJSON(t);if(this.$blank(r)||r.time+1800<e){return this.setToJSON(t,{time:e,term:this.$blank(r)?-1:e-r.time,uuid:`${this.$uuid()}-${e}`}).uuid}return r.uuid}currentTimeTerm(){const e=a.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=a.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.time)?-1:t.time}setTime(e){const t=Math.round((new Date).getTime()/1e3),r=a.STORAGE_PREFIX("session"),i=this.getToJSON(r),n=this.$blank(i)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:i;n.time=e,this.setToJSON(r,n)}generateKey(){return`${this.$uuid()}-${(new Date).getTime()}`}setUser(e){return this.set(a.STORAGE_PREFIX("user"),void 0===e?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(a.STORAGE_PREFIX("user")))}catch(e){return void B.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`)}}},C="5.0.1",D={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:C,applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set(e){this.mode=e},setApplicationId(e){return this.applicationId=e,this.currentApplicationId(void 0)},setLocale(e){this.locale=e,this.isSetLocale=!0},currentApplicationId(e=void 0){return void 0===e?this.applicationId:e},setDevelopmentHost(e){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,e)},setVersion(e,t,r=void 0){this.sdkName=void 0===this.sdkNames[t]?0:this.sdkNames[t],this.sdkVersion=e,this.packageVersion=void 0===r||""===r?C:r},toApi(e){return[this.API_URL[this.mode],e].join("/")},toDoor(e){return[this.DOOR_URL[this.mode],e].join("/")},toWidget(e){return[this.WIDGET_URL[this.mode],e].join("/")},isMobile(){if("undefined"==typeof window)return!1;const e=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(e)},isMobileSafari(){if("undefined"==typeof window)return!1;const e=window.navigator.userAgent;return(e.match(/iPad/i)||e.match(/iPhone/i))&&!e.match(/CriOS/i)},toAnalytics(e){return[this.ANALYTICS_URL[this.mode],e].join("/")}};class U extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const M={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||("undefined"!=typeof window&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),"undefined"!=typeof document&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),"undefined"!=typeof Element&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),this.isBind=!0)},on(e,t,r=void 0){return d(M.__BOOTPAY_NAMESPACE)&&(M.__BOOTPAY_NAMESPACE={}),this.addEventListener(e.split(".")[0],t,r||!1),M.__BOOTPAY_NAMESPACE[e]=t,this},off(e){return l(M.__BOOTPAY_NAMESPACE)&&l(M.__BOOTPAY_NAMESPACE[e])&&this.removeEventListener(e.split(".")[0],M.__BOOTPAY_NAMESPACE[e]),this}};class N extends x{constructor(){super(),this.$resolve=null,this.$reject=null,M.initialize()}reject(e){null!==this.$reject&&this.$reject(e)}resolve(e){null!==this.$resolve&&this.$resolve(e)}setCallbackFunction(e,t){this.$resolve=e,this.$reject=t}parseEvent(e){let t={};if(this.$present(e)&&this.$type(e,"string")){try{t=JSON.parse(e)}catch(r){B.info("json parsing failed",`data: ${e}, message: ${F(r)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}return null}}const F=e=>"string"==typeof e?e.toUpperCase():e instanceof Error?e.message:e;class L extends x{constructor(){super(),this.$windowId="",this.$template=""}byId(e){return document.getElementById(e)}createTemplateHtml(){null===this.byId(this.$windowId)&&document.body.insertAdjacentHTML("beforeend",this.$template)}bodyOpen(e=void 0){const t=document.querySelector("body");this.$present(t.className)?t.className=`${t.className} bootpay-open`:t.className="bootpay-open",this.$present(e)&&(t.className=`${t.className} ${e}`)}bodyClose(){const e=document.querySelector("body");e.className=e.className.replace("bootpay-open","")}templateResize(e,t){const r=this.byId(e);if(void 0!==r)for(let i in Object.keys(t)){let e=Object.keys(t)[i],n=t[e];this.$present(n)&&!String(n).match(/%/)&&(e.match(/width/)||e.match(/Width/)||e.match(/height/)||e.match(/Height/))&&(n=`${String(t[e]).replace(/px/gi,"")}px`),r.style.setProperty(e,n)}}}const H=new class extends L{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`\n<div class="bootpay-progress-background" id="${this.$alfredId}" style="display: none;">\n<div class="progress-message-window">\n <div class="alfred-loading">\n <div class="bootpay-spinner"></div> \n </div>\n <div class="alfred-text">\n <span class="alfred-inner-text" id="${this.$alfredTextId}">${e}</span>\n </div>\n</div> \n</div>\n `}showProgress(e){this.$present(this.byId(this.$alfredId))?this.byId(this.$alfredTextId).innerText=e:document.body.insertAdjacentHTML("beforeend",this.template(e)),this.byId(this.$alfredId).style.setProperty("display","block")}hideProgress(){try{this.byId(this.$alfredId).outerHTML=""}catch(e){}}};var j={exports:{}},W=function(e,t){return function(){for(var r=new Array(arguments.length),i=0;i<r.length;i++)r[i]=arguments[i];return e.apply(t,r)}},z=W,q=Object.prototype.toString,K=function(e){return function(t){var r=q.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function J(e){return e=e.toLowerCase(),function(t){return K(t)===e}}function G(e){return Array.isArray(e)}function V(e){return void 0===e}var Y=J("ArrayBuffer");function X(e){return null!==e&&"object"==typeof e}function Z(e){if("object"!==K(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var Q=J("Date"),ee=J("File"),te=J("Blob"),re=J("FileList");function ie(e){return"[object Function]"===q.call(e)}var ne=J("URLSearchParams");function oe(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),G(e))for(var r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}var se=function(e){return function(t){return e&&t instanceof e}}("undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array)),ae={isArray:G,isArrayBuffer:Y,isBuffer:function(e){return null!==e&&!V(e)&&null!==e.constructor&&!V(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||q.call(e)===t||ie(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Y(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:X,isPlainObject:Z,isUndefined:V,isDate:Q,isFile:ee,isBlob:te,isFunction:ie,isStream:function(e){return X(e)&&ie(e.pipe)},isURLSearchParams:ne,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:oe,merge:function e(){var t={};function r(r,i){Z(t[i])&&Z(r)?t[i]=e(t[i],r):Z(r)?t[i]=e({},r):G(r)?t[i]=r.slice():t[i]=r}for(var i=0,n=arguments.length;i<n;i++)oe(arguments[i],r);return t},extend:function(e,t,r){return oe(t,(function(t,i){e[i]=r&&"function"==typeof t?z(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var i,n,o,s={};t=t||{};do{for(n=(i=Object.getOwnPropertyNames(e)).length;n-- >0;)s[o=i[n]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:K,kindOfTest:J,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var i=e.indexOf(t,r);return-1!==i&&i===r},toArray:function(e){if(!e)return null;var t=e.length;if(V(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:se,isFileList:re},ce=ae;function de(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var le=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(ce.isURLSearchParams(t))i=t.toString();else{var n=[];ce.forEach(t,(function(e,t){null!=e&&(ce.isArray(e)?t+="[]":e=[e],ce.forEach(e,(function(e){ce.isDate(e)?e=e.toISOString():ce.isObject(e)&&(e=JSON.stringify(e)),n.push(de(t)+"="+de(e))})))})),i=n.join("&")}if(i){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e},ue=ae;function pe(){this.handlers=[]}pe.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},pe.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},pe.prototype.forEach=function(e){ue.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var he=pe,fe=ae,ye=ae;function me(e,t,r,i,n){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}ye.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var ve=me.prototype,ge={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){ge[e]={value:e}})),Object.defineProperties(me,ge),Object.defineProperty(ve,"isAxiosError",{value:!0}),me.from=function(e,t,r,i,n,o){var s=Object.create(ve);return ye.toFlatObject(e,s,(function(e){return e!==Error.prototype})),me.call(s,e.message,t,r,i,n),s.name=e.name,o&&Object.assign(s,o),s};var _e=me,we={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},be=ae;var $e,ke,Ee,Se,xe=function(e,t){t=t||new FormData;var r=[];function i(e){return null===e?"":be.isDate(e)?e.toISOString():be.isArrayBuffer(e)||be.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(n,o){if(be.isPlainObject(n)||be.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+o);r.push(n),be.forEach(n,(function(r,n){if(!be.isUndefined(r)){var s,a=o?o+"."+n:n;if(r&&!o&&"object"==typeof r)if(be.endsWith(n,"{}"))r=JSON.stringify(r);else if(be.endsWith(n,"[]")&&(s=be.toArray(r)))return void s.forEach((function(e){!be.isUndefined(e)&&t.append(a,i(e))}));e(r,a)}})),r.pop()}else t.append(o,i(n))}(e),t};var Pe,Ie,Te,Ae,Be,Oe,Re,Ce,De,Ue,Me,Ne,Fe=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Le=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},He=function(e,t){return e&&!Fe(t)?Le(e,t):t};function je(){if(Oe)return Be;Oe=1;var e=_e;function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return ae.inherits(t,e,{__CANCEL__:!0}),Be=t}function We(){if(Ue)return De;Ue=1;var e=ae,t=function(){if(ke)return $e;ke=1;var e=_e;return $e=function(t,r,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?r(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}}(),r=function(){if(Se)return Ee;Se=1;var e=ae;return Ee=e.isStandardBrowserEnv()?function(){return{write:function(t,r,i,n,o,s){var a=[];a.push(t+"="+encodeURIComponent(r)),e.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),e.isString(n)&&a.push("path="+n),e.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()}(),i=le,n=He,o=function(){if(Ie)return Pe;Ie=1;var e=ae,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Pe=function(r){var i,n,o,s={};return r?(e.forEach(r.split("\n"),(function(r){if(o=r.indexOf(":"),i=e.trim(r.substr(0,o)).toLowerCase(),n=e.trim(r.substr(o+1)),i){if(s[i]&&t.indexOf(i)>=0)return;s[i]="set-cookie"===i?(s[i]?s[i]:[]).concat([n]):s[i]?s[i]+", "+n:n}})),s):s}}(),s=function(){if(Ae)return Te;Ae=1;var e=ae;return Te=e.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(e){var t=e;return r&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=n(window.location.href),function(r){var i=e.isString(r)?n(r):r;return i.protocol===t.protocol&&i.host===t.host}}():function(){return function(){return!0}}()}(),a=we,c=_e,d=je(),l=Ce?Re:(Ce=1,Re=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""});return De=function(u){return new Promise((function(p,h){var f,y=u.data,m=u.headers,v=u.responseType;function g(){u.cancelToken&&u.cancelToken.unsubscribe(f),u.signal&&u.signal.removeEventListener("abort",f)}e.isFormData(y)&&e.isStandardBrowserEnv()&&delete m["Content-Type"];var _=new XMLHttpRequest;if(u.auth){var w=u.auth.username||"",b=u.auth.password?unescape(encodeURIComponent(u.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var $=n(u.baseURL,u.url);function k(){if(_){var e="getAllResponseHeaders"in _?o(_.getAllResponseHeaders()):null,r={data:v&&"text"!==v&&"json"!==v?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:e,config:u,request:_};t((function(e){p(e),g()}),(function(e){h(e),g()}),r),_=null}}if(_.open(u.method.toUpperCase(),i($,u.params,u.paramsSerializer),!0),_.timeout=u.timeout,"onloadend"in _?_.onloadend=k:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(k)},_.onabort=function(){_&&(h(new c("Request aborted",c.ECONNABORTED,u,_)),_=null)},_.onerror=function(){h(new c("Network Error",c.ERR_NETWORK,u,_,_)),_=null},_.ontimeout=function(){var e=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",t=u.transitional||a;u.timeoutErrorMessage&&(e=u.timeoutErrorMessage),h(new c(e,t.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,u,_)),_=null},e.isStandardBrowserEnv()){var E=(u.withCredentials||s($))&&u.xsrfCookieName?r.read(u.xsrfCookieName):void 0;E&&(m[u.xsrfHeaderName]=E)}"setRequestHeader"in _&&e.forEach(m,(function(e,t){void 0===y&&"content-type"===t.toLowerCase()?delete m[t]:_.setRequestHeader(t,e)})),e.isUndefined(u.withCredentials)||(_.withCredentials=!!u.withCredentials),v&&"json"!==v&&(_.responseType=u.responseType),"function"==typeof u.onDownloadProgress&&_.addEventListener("progress",u.onDownloadProgress),"function"==typeof u.onUploadProgress&&_.upload&&_.upload.addEventListener("progress",u.onUploadProgress),(u.cancelToken||u.signal)&&(f=function(e){_&&(h(!e||e&&e.type?new d:e),_.abort(),_=null)},u.cancelToken&&u.cancelToken.subscribe(f),u.signal&&(u.signal.aborted?f():u.signal.addEventListener("abort",f))),y||(y=null);var S=l($);S&&-1===["http","https","file"].indexOf(S)?h(new c("Unsupported protocol "+S+":",c.ERR_BAD_REQUEST,u)):_.send(y)}))}}var ze=ae,qe=function(e,t){fe.forEach(e,(function(r,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[i])}))},Ke=_e,Je=xe,Ge={"Content-Type":"application/x-www-form-urlencoded"};function Ve(e,t){!ze.isUndefined(e)&&ze.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Ye,Xe={transitional:we,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Ye=We()),Ye),transformRequest:[function(e,t){if(qe(t,"Accept"),qe(t,"Content-Type"),ze.isFormData(e)||ze.isArrayBuffer(e)||ze.isBuffer(e)||ze.isStream(e)||ze.isFile(e)||ze.isBlob(e))return e;if(ze.isArrayBufferView(e))return e.buffer;if(ze.isURLSearchParams(e))return Ve(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,i=ze.isObject(e),n=t&&t["Content-Type"];if((r=ze.isFileList(e))||i&&"multipart/form-data"===n){var o=this.env&&this.env.FormData;return Je(r?{"files[]":e}:e,o&&new o)}return i||"application/json"===n?(Ve(t,"application/json"),function(e,t,r){if(ze.isString(e))try{return(t||JSON.parse)(e),ze.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Xe.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,n=!r&&"json"===this.responseType;if(n||i&&ze.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw Ke.from(o,Ke.ERR_BAD_RESPONSE,this,null,this.response);throw o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne?Me:(Ne=1,Me=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ze.forEach(["delete","get","head"],(function(e){Xe.headers[e]={}})),ze.forEach(["post","put","patch"],(function(e){Xe.headers[e]=ze.merge(Ge)}));var Ze,Qe,et=Xe,tt=ae,rt=et;function it(){return Qe?Ze:(Qe=1,Ze=function(e){return!(!e||!e.__CANCEL__)})}var nt=ae,ot=function(e,t,r){var i=this||rt;return tt.forEach(r,(function(r){e=r.call(i,e,t)})),e},st=it(),at=et,ct=je();function dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ct}var lt,ut,pt=ae,ht=function(e,t){t=t||{};var r={};function i(e,t){return pt.isPlainObject(e)&&pt.isPlainObject(t)?pt.merge(e,t):pt.isPlainObject(t)?pt.merge({},t):pt.isArray(t)?t.slice():t}function n(r){return pt.isUndefined(t[r])?pt.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function o(e){if(!pt.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return pt.isUndefined(t[r])?pt.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function a(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return pt.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||n,i=t(e);pt.isUndefined(i)&&t!==a||(r[e]=i)})),r};function ft(){return ut?lt:(ut=1,lt={version:"0.27.2"})}var yt=ft().version,mt=_e,vt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){vt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var gt={};vt.transitional=function(e,t,r){function i(e,t){return"[Axios v"+yt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,o){if(!1===e)throw new mt(i(n," has been removed"+(t?" in "+t:"")),mt.ERR_DEPRECATED);return t&&!gt[n]&&(gt[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}};var _t,wt,bt,$t,kt,Et,St=ae,xt=le,Pt=he,It=function(e){return dt(e),e.headers=e.headers||{},e.data=ot.call(e,e.data,e.headers,e.transformRequest),e.headers=nt.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),nt.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||at.adapter)(e).then((function(t){return dt(e),t.data=ot.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return st(t)||(dt(e),t&&t.response&&(t.response.data=ot.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Tt=ht,At=He,Bt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),n=i.length;n-- >0;){var o=i[n],s=t[o];if(s){var a=e[o],c=void 0===a||s(a,o,e);if(!0!==c)throw new mt("option "+o+" must be "+c,mt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new mt("Unknown option "+o,mt.ERR_BAD_OPTION)}},validators:vt},Ot=Bt.validators;function Rt(e){this.defaults=e,this.interceptors={request:new Pt,response:new Pt}}Rt.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Tt(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Bt.assertOptions(r,{silentJSONParsing:Ot.transitional(Ot.boolean),forcedJSONParsing:Ot.transitional(Ot.boolean),clarifyTimeoutError:Ot.transitional(Ot.boolean)},!1);var i=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!n){var a=[It,void 0];for(Array.prototype.unshift.apply(a,i),a=a.concat(s),o=Promise.resolve(t);a.length;)o=o.then(a.shift(),a.shift());return o}for(var c=t;i.length;){var d=i.shift(),l=i.shift();try{c=d(c)}catch(u){l(u);break}}try{o=It(c)}catch(u){return Promise.reject(u)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},Rt.prototype.getUri=function(e){e=Tt(this.defaults,e);var t=At(e.baseURL,e.url);return xt(t,e.params,e.paramsSerializer)},St.forEach(["delete","get","head","options"],(function(e){Rt.prototype[e]=function(t,r){return this.request(Tt(r||{},{method:e,url:t,data:(r||{}).data}))}})),St.forEach(["post","put","patch"],(function(e){function t(t){return function(r,i,n){return this.request(Tt(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Rt.prototype[e]=t(),Rt.prototype[e+"Form"]=t(!0)}));var Ct=ae,Dt=W,Ut=Rt,Mt=ht;var Nt=function e(t){var r=new Ut(t),i=Dt(Ut.prototype.request,r);return Ct.extend(i,Ut.prototype,r),Ct.extend(i,r),i.create=function(r){return e(Mt(t,r))},i}(et);Nt.Axios=Ut,Nt.CanceledError=je(),Nt.CancelToken=function(){if(wt)return _t;wt=1;var e=je();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var i=this;this.promise.then((function(e){if(i._listeners){var t,r=i._listeners.length;for(t=0;t<r;t++)i._listeners[t](e);i._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){i.subscribe(e),t=e})).then(e);return r.cancel=function(){i.unsubscribe(t)},r},t((function(t){i.reason||(i.reason=new e(t),r(i.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},t.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},_t=t}(),Nt.isCancel=it(),Nt.VERSION=ft().version,Nt.toFormData=xe,Nt.AxiosError=_e,Nt.Cancel=Nt.CanceledError,Nt.all=function(e){return Promise.all(e)},Nt.spread=$t?bt:($t=1,bt=function(e){return function(t){return e.apply(null,t)}}),Nt.isAxiosError=function(){if(Et)return kt;Et=1;var e=ae;return kt=function(t){return e.isObject(t)&&!0===t.isAxiosError}}(),j.exports=Nt,j.exports.default=Nt;const Ft=f(j.exports);var Lt,Ht={exports:{}},jt={exports:{}};function Wt(){return Lt||(Lt=1,function(e,t){var r;e.exports=(r=w(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var i=t+r,n=e[i];e[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=e[t+0],c=e[t+1],h=e[t+2],f=e[t+3],y=e[t+4],m=e[t+5],v=e[t+6],g=e[t+7],_=e[t+8],w=e[t+9],b=e[t+10],$=e[t+11],k=e[t+12],E=e[t+13],S=e[t+14],x=e[t+15],P=o[0],I=o[1],T=o[2],A=o[3];P=d(P,I,T,A,s,7,a[0]),A=d(A,P,I,T,c,12,a[1]),T=d(T,A,P,I,h,17,a[2]),I=d(I,T,A,P,f,22,a[3]),P=d(P,I,T,A,y,7,a[4]),A=d(A,P,I,T,m,12,a[5]),T=d(T,A,P,I,v,17,a[6]),I=d(I,T,A,P,g,22,a[7]),P=d(P,I,T,A,_,7,a[8]),A=d(A,P,I,T,w,12,a[9]),T=d(T,A,P,I,b,17,a[10]),I=d(I,T,A,P,$,22,a[11]),P=d(P,I,T,A,k,7,a[12]),A=d(A,P,I,T,E,12,a[13]),T=d(T,A,P,I,S,17,a[14]),P=l(P,I=d(I,T,A,P,x,22,a[15]),T,A,c,5,a[16]),A=l(A,P,I,T,v,9,a[17]),T=l(T,A,P,I,$,14,a[18]),I=l(I,T,A,P,s,20,a[19]),P=l(P,I,T,A,m,5,a[20]),A=l(A,P,I,T,b,9,a[21]),T=l(T,A,P,I,x,14,a[22]),I=l(I,T,A,P,y,20,a[23]),P=l(P,I,T,A,w,5,a[24]),A=l(A,P,I,T,S,9,a[25]),T=l(T,A,P,I,f,14,a[26]),I=l(I,T,A,P,_,20,a[27]),P=l(P,I,T,A,E,5,a[28]),A=l(A,P,I,T,h,9,a[29]),T=l(T,A,P,I,g,14,a[30]),P=u(P,I=l(I,T,A,P,k,20,a[31]),T,A,m,4,a[32]),A=u(A,P,I,T,_,11,a[33]),T=u(T,A,P,I,$,16,a[34]),I=u(I,T,A,P,S,23,a[35]),P=u(P,I,T,A,c,4,a[36]),A=u(A,P,I,T,y,11,a[37]),T=u(T,A,P,I,g,16,a[38]),I=u(I,T,A,P,b,23,a[39]),P=u(P,I,T,A,E,4,a[40]),A=u(A,P,I,T,s,11,a[41]),T=u(T,A,P,I,f,16,a[42]),I=u(I,T,A,P,v,23,a[43]),P=u(P,I,T,A,w,4,a[44]),A=u(A,P,I,T,k,11,a[45]),T=u(T,A,P,I,x,16,a[46]),P=p(P,I=u(I,T,A,P,h,23,a[47]),T,A,s,6,a[48]),A=p(A,P,I,T,g,10,a[49]),T=p(T,A,P,I,S,15,a[50]),I=p(I,T,A,P,m,21,a[51]),P=p(P,I,T,A,k,6,a[52]),A=p(A,P,I,T,f,10,a[53]),T=p(T,A,P,I,b,15,a[54]),I=p(I,T,A,P,c,21,a[55]),P=p(P,I,T,A,_,6,a[56]),A=p(A,P,I,T,x,10,a[57]),T=p(T,A,P,I,v,15,a[58]),I=p(I,T,A,P,E,21,a[59]),P=p(P,I,T,A,y,6,a[60]),A=p(A,P,I,T,$,10,a[61]),T=p(T,A,P,I,h,15,a[62]),I=p(I,T,A,P,w,21,a[63]),o[0]=o[0]+P|0,o[1]=o[1]+I|0,o[2]=o[2]+T|0,o[3]=o[3]+A|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var o=e.floor(i/4294967296),s=i;r[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,d=0;d<4;d++){var l=c[d];c[d]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,r,i,n,o,s){var a=e+(t&r|~t&i)+n+s;return(a<<o|a>>>32-o)+t}function l(e,t,r,i,n,o,s){var a=e+(t&i|r&~i)+n+s;return(a<<o|a>>>32-o)+t}function u(e,t,r,i,n,o,s){var a=e+(t^r^i)+n+s;return(a<<o|a>>>32-o)+t}function p(e,t,r,i,n,o,s){var a=e+(r^(t|~i))+n+s;return(a<<o|a>>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)}(jt)),jt.exports}var zt,qt={exports:{}},Kt={exports:{}};function Jt(){return zt||(zt=1,function(e,t){var r,i,n,o,s,a,c,d;e.exports=(d=w(),i=(r=d).lib,n=i.WordArray,o=i.Hasher,s=r.algo,a=[],c=s.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],d=0;d<80;d++){if(d<16)a[d]=0|e[t+d];else{var l=a[d-3]^a[d-8]^a[d-14]^a[d-16];a[d]=l<<1|l>>>31}var u=(i<<5|i>>>27)+c+a[d];u+=d<20?1518500249+(n&o|~n&s):d<40?1859775393+(n^o^s):d<60?(n&o|n&s|o&s)-1894007588:(n^o^s)-899497514,c=s,s=o,o=n<<30|n>>>2,n=i,i=u}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(i+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=o._createHelper(c),r.HmacSHA1=o._createHmacHelper(c),d.SHA1)}(Kt)),Kt.exports}var Gt,Vt,Yt={exports:{}};function Xt(){return Gt||(Gt=1,function(e,t){var r,i,n,o;e.exports=(r=w(),n=(i=r).lib.Base,o=i.enc.Utf8,void(i.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),s=this._iKey=t.clone(),a=n.words,c=s.words,d=0;d<r;d++)a[d]^=1549556828,c[d]^=909522486;n.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))}(Yt)),Yt.exports}function Zt(){return Vt||(Vt=1,function(e,t){var r,i,n,o,s,a,c,d;e.exports=(d=w(),Jt(),Xt(),i=(r=d).lib,n=i.Base,o=i.WordArray,s=r.algo,a=s.MD5,c=s.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,i=this.cfg,n=i.hasher.create(),s=o.create(),a=s.words,c=i.keySize,d=i.iterations;a.length<c;){r&&n.update(r),r=n.update(e).finalize(t),n.reset();for(var l=1;l<d;l++)r=n.finalize(r),n.reset();s.concat(r)}return s.sigBytes=4*c,s}}),r.EvpKDF=function(e,t,r){return c.create(r).compute(e,t)},d.EvpKDF)}(qt)),qt.exports}var Qt,er,tr={exports:{}};function rr(){return Qt||(Qt=1,function(e,t){var r;e.exports=(r=w(),Zt(),void(r.lib.Cipher||function(e){var t=r,i=t.lib,n=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=t.enc;a.Utf8;var c=a.Base64,d=t.algo.EvpKDF,l=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?_:v}return function(t){return{encrypt:function(r,i,n){return e(i).encrypt(t,r,i,n)},decrypt:function(r,i,n){return e(i).decrypt(t,r,i,n)}}}}()});i.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var u=t.mode={},p=i.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=u.CBC=function(){var t=p.extend();function r(t,r,i){var n,o=this._iv;o?(n=o,this._iv=e):n=this._prevBlock;for(var s=0;s<i;s++)t[r+s]^=n[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize;r.call(this,e,t,n),i.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),t.Decryptor=t.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize,o=e.slice(t,t+n);i.decryptBlock(e,t),r.call(this,e,t,n),this._prevBlock=o}}),t}(),f=(t.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,i=r-e.sigBytes%r,n=i<<24|i<<16|i<<8|i,s=[],a=0;a<i;a+=4)s.push(n);var c=o.create(s,i);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};i.BlockCipher=l.extend({cfg:l.cfg.extend({mode:h,padding:f}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,i=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=i.createEncryptor:(e=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(i,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var y=i.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(t=o.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},v=i.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(e,t,r,i){i=this.cfg.extend(i);var n=e.createEncryptor(r,i),o=n.finalize(t),s=n.cfg;return y.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,r,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(r,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),g=(t.kdf={}).OpenSSL={execute:function(e,t,r,i){i||(i=o.random(8));var n=d.create({keySize:t+r}).compute(e,i),s=o.create(n.words.slice(t),4*r);return n.sigBytes=4*t,y.create({key:n,iv:s,salt:i})}},_=i.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:g}),encrypt:function(e,t,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,e.keySize,e.ivSize);i.iv=n.iv;var o=v.encrypt.call(this,e,t,n.key,i);return o.mixIn(n),o},decrypt:function(e,t,r,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var n=i.kdf.execute(r,e.keySize,e.ivSize,t.salt);return i.iv=n.iv,v.decrypt.call(this,e,t,n.key,i)}})}()))}(tr)),tr.exports}function ir(){return er||(er=1,function(e,t){var r;e.exports=(r=w(),E(),Wt(),Zt(),rr(),function(){var e=r,t=e.lib.BlockCipher,i=e.algo,n=[],o=[],s=[],a=[],c=[],d=[],l=[],u=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,i=0;for(t=0;t<256;t++){var f=i^i<<1^i<<2^i<<3^i<<4;f=f>>>8^255&f^99,n[r]=f,o[f]=r;var y=e[r],m=e[y],v=e[m],g=257*e[f]^16843008*f;s[r]=g<<24|g>>>8,a[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,d[r]=g,g=16843009*v^65537*m^257*y^16843008*r,l[f]=g<<24|g>>>8,u[f]=g<<16|g>>>16,p[f]=g<<8|g>>>24,h[f]=g,r?(r=y^e[e[e[v^y]]],i^=e[e[i]]):r=i=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],y=i.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,i=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s<i;s++)s<r?o[s]=t[s]:(d=o[s-1],s%r?r>6&&s%r==4&&(d=n[d>>>24]<<24|n[d>>>16&255]<<16|n[d>>>8&255]<<8|n[255&d]):(d=n[(d=d<<8|d>>>24)>>>24]<<24|n[d>>>16&255]<<16|n[d>>>8&255]<<8|n[255&d],d^=f[s/r|0]<<24),o[s]=o[s-r]^d);for(var a=this._invKeySchedule=[],c=0;c<i;c++){if(s=i-c,c%4)var d=o[s];else d=o[s-4];a[c]=c<4||s<=4?d:l[n[d>>>24]]^u[n[d>>>16&255]]^p[n[d>>>8&255]]^h[n[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,d,n)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,u,p,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,i,n,o,s,a){for(var c=this._nRounds,d=e[t]^r[0],l=e[t+1]^r[1],u=e[t+2]^r[2],p=e[t+3]^r[3],h=4,f=1;f<c;f++){var y=i[d>>>24]^n[l>>>16&255]^o[u>>>8&255]^s[255&p]^r[h++],m=i[l>>>24]^n[u>>>16&255]^o[p>>>8&255]^s[255&d]^r[h++],v=i[u>>>24]^n[p>>>16&255]^o[d>>>8&255]^s[255&l]^r[h++],g=i[p>>>24]^n[d>>>16&255]^o[l>>>8&255]^s[255&u]^r[h++];d=y,l=m,u=v,p=g}y=(a[d>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&p])^r[h++],m=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[p>>>8&255]<<8|a[255&d])^r[h++],v=(a[u>>>24]<<24|a[p>>>16&255]<<16|a[d>>>8&255]<<8|a[255&l])^r[h++],g=(a[p>>>24]<<24|a[d>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^r[h++],e[t]=y,e[t+1]=m,e[t+2]=v,e[t+3]=g},keySize:8});e.AES=t._createHelper(y)}(),r.AES)}(Ht)),Ht.exports}const nr=f(ir());class or{constructor(){this.$http=Ft.create({timeout:6e4})}static encryptParams(e){u(e,"object")&&(e=JSON.stringify(e));let t=nr.encrypt(e,c());return{payload:t.ciphertext.toString(S),token:`${t.key.toString(S)}##${t.iv.toString(S)}`}}static toUnderscore(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}static toCamelcase(e){return e.replace(/(\_[a-z])/g,(function(e){return e.toUpperCase().replace(/_/g,"")}))}static objectKeyToUnderscore(e){let t;return l(e)&&(Array.isArray(e)?(t=[],e.forEach((e=>{let r={};Object.keys(e).forEach((t=>{r[this.toUnderscore(t)]=e[t]})),t.push(r)}))):(t={},Object.keys(e).forEach((r=>{t[this.toUnderscore(r)]=e[r]})))),t}static objectKeyToCamel(e){let t;return l(e)&&(Array.isArray(e)?(t=[],e.forEach((e=>{let r={};Object.keys(e).forEach((t=>{r[this.toCamelcase(t)]=e[t]})),t.push(r)}))):(t={},Object.keys(e).forEach((r=>{u(e[r],"object")&&Object.keys(e[r]).length>0?t[this.toCamelcase(r)]=this.objectKeyToCamel(e[r]):t[this.toCamelcase(r)]=e[r]})))),t}static axiosMultipayConfigure(){Ft.defaults.headers.common["Content-Type"]="application/json",Ft.defaults.headers.common.Accept="application/json",Ft.interceptors.request.use((e=>(l(e.data),this.isHttpBodyUsedMethod(e.method)&&(e.data=or.encryptParams(or.objectKeyToUnderscore(e.data))),void 0!==e.headers&&l(e.headers.progress)&&delete e.headers.progress,e)),(e=>Promise.reject(e))),Ft.interceptors.response.use((e=>e),(function(e){if(l(e.response)){let t=e.response.data;return t.status=e.response.status,Promise.reject(t)}return Promise.reject(e)}))}static isHttpBodyUsedMethod(e){return["post","put"].indexOf(e)>-1}}or.axiosMultipayConfigure();const sr=new class extends or{constructor(){super()}pollingStatus(e,t,r,i){return s(this,null,(function*(){try{const n=yield this.$http.get([e,"s",t].join("/"),{params:{application_id:r,tk:i}});return Promise.resolve(n)}catch(n){return Promise.reject(n)}}))}};const ar=new class extends N{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""},this.$pollingEvent=sr,this.pollingInterval=3e3,this.isDone=!1}bind(e,t){this.isDone=!1,this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,(e=>{const t=this.parseEvent(e.data);if(B.debug("event received",JSON.stringify(t)),l(t))switch(B.debug("event",t),t.event){case"error":case"cancel":return this.reject({event:t.event,pg_error_code:t.pg_error_code,error_code:t.error_code,message:t.message,payload:t.payload});case"setConfirmParameters":const e=`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${t.application_id}`;"redirect"===t.open_type?lr.setConfirmRedirect(e):lr.setConfirmFormUrl(e);break;case"confirm":return this.resolve({event:t.event,receipt_id:t.receipt_id,gateway_url:t.gateway_url,order_id:t.order_id});case"redirect":return lr.destroy(!1),void(location.href=t.url);case"moveRedirectUrl":lr.hidePaymentiFrame(),H.showProgress("결제 진행 중입니다. 잠시만 기다려주세요."),location.replace(((e,t)=>{if(l(t)){const r="string"!=typeof t?new URLSearchParams(JSON.parse(JSON.stringify(t))).toString():t;return/\?/.test(e)?`${e}&${r}`:`${e}?${r}`}return e})(t.url,t.parameters)),setTimeout((()=>{lr.destroy(!1)}),5e3);break;case"polling":return void 0!==this.$pollingData&&(this.$pollingData.receiptId=t.receipt_id,this.$pollingData.gatewayUrl=t.gateway_url),this.startPollingEvent();case"issued":case"done":if(!this.isDone)return this.isDone=!0,this.clearPollingEvent(),this.resolve(t);break;case"iFrameStyle":lr.iFrameSetStyle(t.styles);break;case"windowStyle":lr.windowStyle(t.styles);break;case"hideProgress":H.hideProgress();break;case"showProgress":H.showProgress(t.message);break;case"resize":lr.iFrameResize(t.resizeData);break;case"hidePayment":lr.closePopup(),lr.hidePaymentiFrame();break;case"showPayment":lr.showPaymentiFrame(!!this.$present(t.showCloseButton)&&t.showCloseButton);break;case"popup":lr.createPopupButton({gatewayUrl:t.url,receiptId:t.receipt_id,name:t.name,price:t.price});break;case"close":lr.destroy();break;default:return}}))}setDefaultPaymentData(e,t){void 0!==this.$pollingData&&(this.$pollingData.applicationId=e,this.$pollingData.transactionKey=t)}callBootpayDOMEvent(e,t=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,e].join(""),{detail:t}))}startPollingEvent(){this.$pollingInterval=setInterval((()=>s(this,null,(function*(){if(void 0!==this.$pollingData)try{const e=yield this.$pollingEvent.pollingStatus(this.$pollingData.gatewayUrl,this.$pollingData.receiptId,this.$pollingData.applicationId,this.$pollingData.transactionKey);let t={bootpay_event:!0,event:"",data:e.data};if(void 0!==e.data){if(B.debug("polling event",`receive data: ${JSON.stringify(t)}`),1===e.data.status)return t.event="done",window.postMessage(JSON.stringify(t),"*");if(5===e.data.status)return t.event="issued",window.postMessage(JSON.stringify(t),"*")}}catch(e){return this.reject({error_code:"RC_RECEIPT_POLLING_INVALID",message:"결제 상태 체크에 실패하였습니다."})}}))),this.pollingInterval)}clearPollingEvent(){void 0!==this.$pollingInterval&&clearInterval(this.$pollingInterval),this.$pollingInterval=void 0,this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""}}allClearEvent(){this.clearPollingEvent(),window.removeBootpayEventListener(this.$messageEventName)}};const cr=new class extends or{constructor(){super(),this.$session=R,this.$applicationId=void 0,this.$tk=void 0,this.$platformType=1,this.$receiptId=void 0}setTokenKey(e){this.$tk=e}setReceiptId(e){this.$receiptId=e}clearInstance(){this.$applicationId=void 0,this.$receiptId=void 0}send(e){try{if(l(this.$applicationId))return e.application_id=this.$applicationId,e.status=l(e.status)?e.status:1,e.version=C,e.tk=this.$tk,B.debug("send event",`${JSON.stringify(e)} 전송됨`),this.$http.post(D.toAnalytics("event"),e)}catch(t){return}}sendError(e){e.status=-1,this.send(e)}setApplicationId(e){this.$applicationId=e}sendCloseEvent(){if(!l(this.$receiptId))return B.debug("receipt_id","undefined receipt_id"),Promise.resolve();try{return this.$http.put(D.toApi(`close/${this.$receiptId}`))}catch(e){return Promise.reject(e)}}},dr={startProgress:{PAYMENT:{ko:"결제를 시작합니다",en:"Start Payment..."},CARD_SUBSCRIPTION:{ko:"자동결제 정보를 불러오는 중입니다...",en:"Automatic payment will start..."},AUTH:{ko:"본인인증을 시작합니다",en:"Authentication will start..."}},popupLocaleMessage:{message:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment."},button:{ko:"결제계속하기",en:"Continue"}},popupMessage:{message:{PAYMENT:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment"},CARD_SUBSCRIPTION:{ko:'자동결제에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to automatic card payment, press the "Continue" button to proceed'},AUTH:{ko:'본인인증에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to authenticate yourself, press the "Continue" button to proceed'}},button:{PAYMENT:{ko:"결제계속하기",en:"Continue"},CARD_SUBSCRIPTION:{ko:"계속하기",en:"Continue"},AUTH:{ko:"계속하기",en:"Continue"}}},closeMessage:{PAYMENT:{ko:"결제창을 닫았습니다",en:"Payment window is closed"},CARD_SUBSCRIPTION:{ko:"자동 결제창을 닫았습니다",en:"Automatic Payment window is closed"},AUTH:{ko:"본인인증 창을 닫았습니다",en:"Authenticate window is closed"}},confirmNotYet:{PAYMENT:{ko:"결제 승인준비가 되지 않았습니다",en:"Payment approval not ready "},CARD_SUBSCRIPTION:{ko:"자동결제 승인준비가 되지 않았습니다",en:"Automatic Payment approval not ready"},AUTH:{ko:"본인인증 승인준비가 되지 않았습니다",en:"Authenticate approval not ready"}},notSelectPayment:{ko:"어떤 방법으로 결제할지 선택해주세요",en:"Please, do select payment."},termsNotAgree:{ko:"필수 약관을 모두 동의해주세요",en:"Please agree to all required terms and conditions"},notSelectOOPay:{ko:"간편결제로 결제하려면, 등록된 카드 혹은 계좌를 선택해주세요",en:"Please select a registered card or account to pay with Easy Payment"},widgetTypeNotPayment:{ko:"결제 위젯 요청이 아닙니다. 결제 위젯이 아닌 경우 requestSubscription 함수를 이용해주세요.",en:"This is not a payment widget. If it is not a payment widget, use the requestSubscription function."},widgetTypeNotSubscription:{ko:"정기결제 위젯 요청이 아닙니다. 정기결제 위젯이 아닌 경우 requestPayment 함수를 이용해주세요.",en:"This is not a subscription widget. If it is not a subscription widget, use the requestPayment function."},getLocaleMessage:(e,t)=>{const r=e.split(".").reduce(((e,t)=>e[t]),dr);return l(r)&&l(r[t])?r[t]:r.ko}};const lr=new class extends L{constructor(){super(),this.mode="PAYMENT",this.modeApiUrl={PAYMENT:"request/payment",CARD_SUBSCRIPTION:"request/subscribe",AUTH:"request/authentication"},this.$formId="bootpay-form",this.$iFrameId="bootpay-iframe-id",this.$windowId="bootpay-window-id",this.$paymentWindowId="bootpay-payment-window-id",this.$confirmFormId="bootpay-confirm-form-id",this.$confirmIFrame="bootpay-confirm-iframe-id",this.$popupWindow="bootpay-popup-window-id",this.$closeButton="bootpay-close-btn",this.$popupItemNameId="bootpay-item-name-id",this.$popupPriceId="bootpay-price-id",this.$popup=void 0,this.$popupWatcher=void 0,this.$popupUrl=void 0,this.$env=D,this.$template=this.template()}template(){return`\n<div id="${this.$windowId}" class="bootpay-payment-background">\n <div class="bootpay-payment-window ${D.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">\n <button class="bootpay-close-btn" id="${this.$closeButton}" style="display: none;" onclick="Bootpay.dismiss()"></button> \n <form id="${this.$formId}" method="POST">\n </form> \n <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>\n <div class="bootpay-popup-window" id="${this.$popupWindow}">\n <div class="header">\n <button class="bootpay-close-btn" onclick="Bootpay.dismiss(true)"></button>\n </div>\n <div class="body">\n <h5 id="${this.$popupItemNameId}"></h5>\n <p class="price" id="${this.$popupPriceId}"></p> \n <div class="agree-text">${this.message("popupMessage.message")}</div>\n </div>\n <div class="footer">\n <button class="bootpay-button" onclick="Bootpay.readyToPopup()">\n ${this.message("popupMessage.button")}\n </button> \n </div>\n </div>\n </div>\n <div class="bootpay-confirm-window">\n <form id="${this.$confirmFormId}" method="POST">\n <input type="hidden" name="_method" value="put" /> \n </form>\n <iframe id="${this.$confirmIFrame}" name="${this.$confirmIFrame}"></iframe>\n </div> \n</div>\n `}templateReload(){B.debug("template reload","template reload!"),this.$template=this.template()}start(e,t="PAYMENT"){return s(this,null,(function*(){return new Promise(((r,i)=>{this.mode=t,this.templateReload(),ar.clearPollingEvent(),ar.bind(r,i),ar.setDefaultPaymentData(e.application_id,e.tk),this.createTemplateHtml(),this.bodyOpen(),H.showProgress(this.message("startProgress"));const n=or.encryptParams(or.objectKeyToUnderscore(e)),o=this.byId(this.$formId);o.innerHTML=`\n <input type="hidden" name="payload" value="${n.payload}" />\n <input type="hidden" name="token" value="${n.token}" />\n `,o.action=this.$env.toApi(this.apiUrl()),this.$present(e.extra)&&e.extra.popup,o.target=this.$iFrameId,o.submit()}))}))}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),r=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),r.target=this.$confirmIFrame,r.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise(((e,t)=>{ar.bind(e,t);const r=this.byId(this.$confirmFormId);if(this.$blank(r.action))throw new U({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});r.submit()}))}startPaymentUrl(e,t="PAYMENT"){return s(this,null,(function*(){return new Promise(((r,i)=>{this.mode=t,this.templateReload(),ar.clearPollingEvent(),ar.bind(r,i),ar.setDefaultPaymentData(null,null),H.showProgress(this.message("startProgress")),this.createTemplateHtml(),this.bodyOpen();const n=this.byId(this.$formId);n.method="GET",n.action=e,n.target=this.$iFrameId,n.submit()}))}))}createPopupButton(e){H.hideProgress(),this.hidePaymentiFrame(),this.showPopupMessage(e),this.$present(e.gatewayUrl)&&(this.$popupUrl=`${e.gatewayUrl}?popup=1`,cr.setReceiptId(e.receiptId))}readyToPopup(e=void 0){this.hidePopupMessage(),this.closePopup();this.$popup=window.open(this.getPopupUrl(e),"BootPayPopupInstance","width=750,height=500,top=0,left=0,scrollbars=yes,directories=no, status=no, menubar=no, fullscreen=no"),this.$popupWatcher=setInterval((()=>s(this,null,(function*(){if(void 0===this.$popup||this.$popup.closed){try{clearInterval(this.$popupWatcher),yield cr.sendCloseEvent()}catch(e){B.debug("popup",F(e))}return this.$popupUrl=void 0,ar.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}}))),500),this.bindParentEventOnPopup()}closePopup(){if(void 0!==this.$popupWatcher)try{clearInterval(this.$popupWatcher),B.debug("close popup","clear popup interval")}catch(e){B.info("clear popup watcher",F(e))}if(void 0!==this.$popup&&!this.$popup.closed)try{this.$popup.close(),B.debug("close popup","close popup instance")}catch(e){B.info("popup destroy",F(e))}}getPopupUrl(e){return this.$present(e)?e:this.$present(this.$popupUrl)?this.$popupUrl:"about:blank"}bindParentEventOnPopup(){let e="beforeunload.BootpayReloadWatcher";D.isMobileSafari()&&(e="pagehide.BootpayReloadWatcher"),window.resetBootpayEventListener(e,(()=>{if(void 0!==this.$popup&&!this.$popup.closed)try{this.$popup.close()}catch(e){B.info("popup destroy",F(e))}}))}showPaymentiFrame(e=!1){const t=this.byId(this.$iFrameId),r=this.byId(this.$closeButton);void 0!==t&&t.style.setProperty("display","block"),void 0!==r&&e&&r.style.setProperty("display","inline-block")}showPopupMessage(e){const t=this.byId(this.$popupWindow),r=this.byId(this.$popupItemNameId),i=this.byId(this.$popupPriceId);void 0!==t&&t.style.setProperty("display","block"),void 0!==r&&(r.innerText=e.name),void 0!==i&&(parseFloat(e.price)>0?i.innerText=String(e.price).replace(/\B(?=(\d{3})+(?!\d))/g,","):i.remove())}hidePopupMessage(){this.byId(this.$popupWindow).style.setProperty("display","none")}destroy(e=!0){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),H.hideProgress(),this.closePopup(),ar.allClearEvent(),cr.clearInstance(),e&&setTimeout((()=>ar.callBootpayDOMEvent("close")),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(void 0!==t)for(let r in Object.keys(e)){let i=Object.keys(e)[r],n=e[i];this.$present(n)&&!String(n).match(/%/)&&(i.match(/width/)||i.match(/Width/)||i.match(/height/)||i.match(/Height/))&&(n=`${String(e[i]).replace(/px/gi,"")}px`),String(n).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)&&(this.byId(this.$paymentWindowId).className+=" w-100"),t.style.setProperty(i,n)}}iFrameSetStyle(e){B.debug("change style",e);const t=this.byId(this.$iFrameId);for(let i in Object.keys(e)){let n=Object.keys(e)[i];try{B.debug(n,e[n]),t.style.setProperty(n,e[n])}catch(r){B.warn("iframe style",null==r?void 0:r.message)}}}windowStyle(e){B.debug("change style",e);const t=this.byId(this.$paymentWindowId);for(let i in Object.keys(e)){let n=Object.keys(e)[i];try{B.debug(n,e[n]),t.style.setProperty(n,e[n])}catch(r){B.warn("iframe style",null==r?void 0:r.message)}}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);void 0!==e&&e.style.setProperty("display","none"),void 0!==t&&t.style.setProperty("display","none")}message(e){return dr.getLocaleMessage(`${e}.${this.mode}`,D.locale)}moveToUrl(e){const t=this.byId(this.$iFrameId);this.hidePaymentiFrame(),t.removeAttribute("style"),this.iFrameResize({width:D.isMobile()?"100%":400,height:D.isMobile()?"100%":700}),t.style.setProperty("display","block"),t.src=e}apiUrl(){return this.modeApiUrl[this.mode]}},ur=class e extends x{constructor(){super(),this.$session=R,this.$logger=B,this.$event=cr,this.platformType=a.PLATFORM.JS,this.$transactionKey="",this.extra={},this.browserBootpayFilter={instagram:/Instagram/i,kakaotalk:/KAKAOTALK/i,facebook:/FBAV/i,naver:/NAVER/i,mobile_safari:/(iPhone|iPad|iPod)/,mobile_chrome:[/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,/Chrome/]}}requestPayment(t){return s(this,null,(function*(){var r;void 0===(null==(r=t.extra)?void 0:r.locale)||D.isSetLocale||D.setLocale(t.extra.locale),this.$event.clearInstance(),this.generateTransactionKey(),t.application_id=D.currentApplicationId(t.application_id),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(t.application_id),this.$event.send({step:"start",msg:"결제 요청 시작",request:t}),t.sdk=!0,t.platform_type=this.platformType,t.ver=D.packageVersion,t.sdk_version=D.sdkVersion,t.sdk_type=D.sdkName,t.locale=D.locale,t.price=parseFloat(String(t.price)),t.tax_free=parseFloat(String(t.tax_free)),t.deposit_price=parseFloat(String(t.deposit_price)),e.invalidRequestParamsData(t),e.invalidRequestItemsData(t.items,t.price),t.uuid=this.$session.currentUserUUID(),t.sk=this.$session.currentSessionKey(),t.ti=this.$session.currentTimeTerm(),t.tk=this.$transactionKey,t.env=this.getUserDeviceEnvironment(),t.extra=this.openTypeFilter(t.extra),this.extra=t.extra;try{const e=yield lr.start(t);return B.debug("confirm ready",e),lr.hidePaymentiFrame(),lr.closePopup(),-1===["done","issued"].indexOf(e.event)&&this.$event.send({step:e.event,msg:"",request:t,response:e}),lr.setConfirmFormUrl(`${e.gateway_url}/confirm/${e.receipt_id}?application_id=${t.application_id}`),Promise.resolve(e)}catch(i){return this.eventError(i),Promise.reject(i)}}))}confirm(){return s(this,null,(function*(){try{const e=yield lr.confirm();return Promise.resolve(e)}catch(e){return this.eventError(e),Promise.reject(e)}}))}eventDone(e,t=!0){this.$logger.debug(e.event,e),this.$event.send({step:e.event,msg:"done"===e.event?"결제완료":"가상계좌발급완료",request:{},response:e}),H.hideProgress(),this.$logger.debug("show result",this.isDisplaySuccessResult()),this.isDisplaySuccessResult()&&t?this.displayResultView(e.data.receipt_id):lr.destroy()}eventError(e){H.hideProgress(),lr.closePopup(),this.isDisplayErrorResult()&&"error"===e.event?this.displayResultErrorView(e):lr.destroy(),this.$logger.debug("done failed destroy and hide","payment"),this.$event.sendError({step:this.$present(e.event)?e.event:"error",msg:e.message,trace:function(){try{return e.stack}catch(t){return!1}}()})}generateTransactionKey(){return this.$transactionKey=`${this.$uuid()}-${1e3*(new Date).getTime()}`,this.$transactionKey}requestSubscription(e){return s(this,null,(function*(){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"정기결제 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.application_id,subscription_id:e.subscription_id,pg:e.pg,method:e.method,order_name:e.order_name,price:e.price,tax_free:e.tax_free,user_token:e.user_token,metadata:e.metadata,redirect_url:e.redirect_url,widget:e.widget,widget_key:e.widget_key,widget_sandbox:e.widget_sandbox,platform_type:this.platformType,ver:D.packageVersion,sdk_version:D.sdkVersion,sdk_type:D.sdkName,locale:D.locale,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=yield lr.start(t,"CARD_SUBSCRIPTION");switch(B.debug("subscription success",r),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:r}),lr.hidePaymentiFrame(),lr.closePopup(),r.event){case"done":case"issued":break;case"confirm":lr.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(r)}catch(r){return this.eventError(r),Promise.reject(r)}}))}requestAuthentication(e){return s(this,null,(function*(){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"본인인증 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.application_id,authentication_id:e.authentication_id,pg:e.pg,method:this.$present(e.method)?e.method:"auth",order_name:e.order_name,platform_type:this.platformType,ver:C,sdk_version:D.sdkVersion,sdk_type:D.sdkName,locale:D.locale,metadata:e.metadata,redirect_url:e.redirect_url,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=yield lr.start(t,"AUTH");switch(B.debug("authentication success",r),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:r}),lr.hidePaymentiFrame(),lr.closePopup(),r.event){case"done":case"issued":break;case"confirm":lr.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(r)}catch(r){return this.eventError(r),Promise.reject(r)}}))}requestPaymentUrl(e){return s(this,null,(function*(){try{const t=yield lr.startPaymentUrl(e.url);return-1===["done","issued"].indexOf(t.event)&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),lr.setConfirmFormUrl(`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${e.application_id}`),Promise.resolve(t)}catch(t){return this.eventError(t),Promise.reject(t)}}))}getUserDeviceEnvironment(){return{width:window.innerWidth,height:window.innerHeight}}isDisplaySuccessResult(){return void 0!==this.extra&&void 0!==this.extra.display_success_result&&this.extra.display_success_result}isDisplayErrorResult(){return void 0!==this.extra&&void 0!==this.extra.display_error_result&&this.extra.display_error_result}displayResultView(e){lr.moveToUrl(D.toDoor(`result/${e}`))}displayResultErrorView(e){lr.moveToUrl(D.toDoor(`error?error_code=${e.error_code}&pg_error_code=${e.pg_error_code}&message=${e.message}`))}openTypeFilter(e){if(this.$present(e)&&void 0!==e.browser_open_type){const t=this.getUserAgent();for(let r in e.browser_open_type){const i=e.browser_open_type[r],n=this.$present(this.browserBootpayFilter[i.browser])?this.browserBootpayFilter[i.browser]:new RegExp(`${i.browser}`);if(t.match(n)){e.open_type=i.open_type;break}}}return e}static invalidRequestParamsData(t){if(d(t))throw new U({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(e.invalidRequestParams).forEach((r=>{const i=t[r];if(d(i))throw new U({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:e.invalidRequestParams[r]})}))}static invalidRequestItemsData(e,t){if(void 0!==e&&l(e)){let r=0;if(e.forEach(((t,i)=>{if(d(t.id))throw new U({event:"error",error_code:"NEED_ITEM_ID",message:`${i+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(d(t.name))throw new U({event:"error",error_code:"NEED_ITEM_NAME",message:`${i+1}번째 상품명을 입력해주세요. [ key: name ]`});if(d(t.qty))throw new U({event:"error",error_code:"NEED_ITEM_QTY",message:`${i+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(d(t.price))throw new U({event:"error",error_code:"NEED_ITEM_PRICE",message:`${i+1}번째 상품금액을 입력해주세요. [ key: price ]`});e[i].price=parseFloat(String(e[i].price)),e[i].qty=parseFloat(String(e[i].qty)),r+=e[i].price*e[i].qty})),r!==t)throw new U({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${r} ${typeof r} ]`})}}};ur.invalidRequestParams={application_id:"application_id를 입력해주세요. [ key: application_id ]",order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let pr=ur;const hr=new pr;const fr=new class extends or{constructor(){super(),this.$session=R}setAnalyticsData(e){this.$session.setTime(e.time),this.$session.setUUID(e.uuid)}send(e){return s(this,null,(function*(){const t=document.URL;if(void 0!==t&&-1===t.search(/bootapi.co.kr/)){const i=this.$session.getUser();e.application_id=D.currentApplicationId(e.application_id),e.sk=this.$session.currentSessionKey(),e.uuid=this.$session.currentUserUUID(),e.time=this.$session.currentTime(),e.url=t,e.referer=void 0!==document.referrer&&l(document.referrer)&&-1==document.referrer.search(new RegExp(window.location.hostname))?document.referrer:"",e.user_id=void 0===i||d(i)?void 0:i.id,e.items=this.generateItemKeyToVersion1(e.items);try{const t=yield this.$http.post(D.toAnalytics(`call?ver=${C}`),e);return 200===t.data.status?(B.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(B.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(t.data)}`),Promise.reject())}catch(r){return B.error("Analytics Common Error",`데이터 전송 실패: ${r.message}`),Promise.reject()}}}))}login(e){return s(this,null,(function*(){if(e.application_id=D.currentApplicationId(e.application_id),d(e.application_id))return B.error("Analytics Params","application_id 값을 입력해주세요.");if(d(e.id))return B.error("Analytics Params","id 값을 입력해주세요.");try{const t=yield this.$http.post(D.toAnalytics(`login?ver=${C}`),e),{user_id:r}=t.data.data;return this.$session.setUser({id:r,time:(new Date).getTime()}),Promise.resolve()}catch(t){return B.error("Analytics Login Error",`데이터 전송 실패: ${t.message}`),Promise.reject()}}))}logout(){this.$session.setUser(void 0)}generateItemKeyToVersion1(e){return void 0!==e?e.map((e=>({cat1:e.cat1,cat2:e.cat2,cat3:e.cat3,item_img:e.img,item_name:e.name,unique:e.id,price:e.price}))):void 0}};!function(){if("undefined"==typeof window||"function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}e.prototype=window.Event.prototype,window.CustomEvent=e}();const yr={$payment:hr,$analytics:fr,$environment:D,requestPayment(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{void 0!==e.extra&&!0===e.extra.override_global_event&&(B.debug("override global event","override global event!"),yr.overrideGlobalInstance());const r=yield this.$payment.requestPayment(e);setTimeout((()=>{t(r),["done","issued"].indexOf(r.event)>-1&&this.$payment.eventDone(r)}),100)}catch(i){setTimeout((()=>{r(this.errorHandler(i))}),100)}}))))}))},confirm(){return s(this,null,(function*(){return new Promise(((e,t)=>s(this,null,(function*(){try{const t=yield this.$payment.confirm();setTimeout((()=>{e(t),this.$payment.eventDone(t)}),100)}catch(r){setTimeout((()=>t(this.errorHandler(r))),100)}}))))}))},requestSubscription(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{const r=yield this.$payment.requestSubscription(e);t(r),this.$payment.eventDone(r)}catch(i){return r(this.errorHandler(i))}}))))}))},requestAuthentication(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{const r=yield this.$payment.requestAuthentication(e);t(r),this.$payment.eventDone(r)}catch(i){return r(this.errorHandler(i))}}))))}))},requestPaymentUrl(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{const r=yield this.$payment.requestPaymentUrl(e);setTimeout((()=>{t(r),["done","issued"].indexOf(r.event)>-1&&this.$payment.eventDone(r)}),100)}catch(i){setTimeout((()=>{r(this.errorHandler(i))}),100)}}))))}))},setEnvironmentMode(e,t=void 0){this.$environment.set(e),void 0!==t&&this.$environment.setDevelopmentHost(t)},setApplicationId(e){return this.$environment.setApplicationId(e)},setVersion(e,t,r){return this.$environment.setVersion(e,t,r)},setDevice(e){switch(e){case"IOS":this.$payment.platformType=a.PLATFORM.IOS;break;case"ANDROID":this.$payment.platformType=a.PLATFORM.ANDROID;break;default:this.$payment.platformType=a.PLATFORM.JS}return this.$payment.platformType},errorHandler(e){let t;if(H.hideProgress(),"BootpayEventError"===e.name)t=e.eventMessage;else{if(!l(e.event))throw e;t=e}return t},readyToPopup(){lr.readyToPopup()},setLogLevel(e){B.setLogLevel(e)},setUUID:e=>R.setUUID(e),send(e=void 0){return this.$analytics.send(void 0!==e?e:{})},login(e){return this.$analytics.login(e)},logout(){return this.$analytics.logout()},setLocale(e){D.setLocale(e),lr.templateReload()},dismiss(e=!1){return s(this,null,(function*(){if(e)try{yield cr.sendCloseEvent()}catch(t){B.debug("error",t.message)}ar.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}))},getCurrentUUID:()=>R.currentUserUUID(),destroy(){lr.destroy()},overrideGlobalInstance(){window.Bootpay=yr}};"undefined"!=typeof window&&(window.Bootpay=yr);class mr extends N{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,(e=>{const t=this.parseEvent(e.data);if(l(t))switch(B.debug("event",t),t.event){case"error":case"cancel":return this.reject({event:t.event,pg_error_code:t.pg_error_code,error_code:t.error_code,message:t.message,payload:t.payload});case"data":return this.resolve(t.data);case"confirmPasswordToken":return this.resolve(t.token);case"confirmAddCard":return this.resolve(t);case"resize":vr.iFrameResize(t.resizeData);break;default:return}}))}}const vr=new class extends L{constructor(){super(),this.$windowId="bootpay-user-token-background-id",this.$userWindowId="bootpay-user-token-window-id",this.$iFrameId="bootpay-user-token-iframe-id",this.$bootpaySdkFormId="bootpay-user-token-sdk-form",this.$template=this.template(),this.$event=new mr,this.$session=R,this.deviceType=a.PLATFORM.JS}setDevice(e){return this.deviceType=e,this.deviceType}template(){return`\n <div id="${this.$windowId}" class="bootpay-payment-background">\n <div class="bootpay-payment-window" id="${this.$userWindowId}">\n <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>\n <form name="${this.$bootpaySdkFormId}" id="${this.$bootpaySdkFormId}" method="GET"> \n </form>\n </div>\n </div>\n `}setParams(e,t){if(void 0!==t){const r=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const e=or.encryptParams(or.objectKeyToUnderscore(t));r.innerHTML=`\n <input type="hidden" name="payload" value="${e.payload}" />\n <input type="hidden" name="token" value="${e.token}" /> \n `}else{let i="";"DELETE"===e.toUpperCase()&&(i+='<input type="hidden" name="_method" value="patch"/>'),Object.keys(t).forEach((e=>{i+=`<input type="hidden" name="${e}" value="${t[e]}"/>`})),r.innerHTML=i}}}request(e,t){return new Promise(((r,i)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(r,i),this.goiFrameUrl("GET",D.toDoor(`sdk/password/${t}`),{type:e,uuid:this.$session.currentUserUUID()})}))}addCard(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("GET",D.toDoor(`sdk/card/${e}`),{uuid:this.$session.currentUserUUID()})}))}wallets(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("GET",D.toApi("sdk/easy/wallet"),{user_token:e,sdk:!0,uuid:this.$session.currentUserUUID()})}))}destroyWallet(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/wallet"),{method:"DELETE",sdk:!0,user_token:e.user_token,wallet_id:e.wallet_id,token:e.token,uuid:this.$session.currentUserUUID()})}))}createBiometricAuthenticate(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/biometric"),{user_token:e.userToken,sdk:!0,uuid:this.$session.currentUserUUID(),os:e.os,token:e.token})}))}destroyBiometricAuthenticate(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/biometric"),{method:"DELETE",uuid:this.$session.currentUserUUID(),user_token:e.userToken,token:e.token})}))}requestWalletPayment(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/card"),this.regenerateRequestPayment(e))}))}goiFrameUrl(e,t,r=void 0){this.setParams(e,r);const i=this.byId(this.$bootpaySdkFormId);i.method=this.toMethod(e),i.action=t,i.target=this.$iFrameId,i.submit(),this.show()}toMethod(e){switch(e.toUpperCase()){case"PUT":case"DELETE":return"POST";default:return e}}iFrameResize(e){const t=this.byId(this.$iFrameId);if(void 0!==t)for(let r in Object.keys(e)){let i=Object.keys(e)[r],n=e[i];this.$present(n)&&!String(n).match(/%/)&&(i.match(/width/)||i.match(/Width/)||i.match(/height/)||i.match(/Height/))&&(n=`${String(e[i]).replace(/px/gi,"")}px`),String(n).match(/%/)&&!this.byId(this.$userWindowId).className.match(/w-100/)&&(this.byId(this.$userWindowId).className+=" w-100"),t.style.setProperty(i,n)}}regenerateRequestPayment(e){return e.ver=C,e.platform_type=this.deviceType,e.sdk=!0,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),pr.invalidRequestParamsData(e),pr.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=`${this.$uuid()}-${1e3*(new Date).getTime()}`,e}show(){const e=this.byId(this.$iFrameId);void 0!==e&&e.style.setProperty("display","block")}destroy(){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),ar.clearPollingEvent(),setTimeout((()=>ar.callBootpayDOMEvent("close")),300)}},gr={$templateUserToken:vr,requestPasswordToken(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.request("passwordToken",e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},requestChangePassword(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.request("changePasswordToken",e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},requestAddCard(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.addCard(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},wallets(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.wallets(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},destroyWallet(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.destroyWallet(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},createBiometricAuthenticate(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.createBiometricAuthenticate(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},destroyBiometricAuthenticate(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.destroyBiometricAuthenticate(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},requestWalletPayment(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.requestWalletPayment(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},setEnvironmentMode(e,t=void 0){D.set(e),void 0!==t&&D.setDevelopmentHost(t)},setDevice(e){let t=a.PLATFORM.JS;switch(e.toUpperCase()){case"IOS":t=a.PLATFORM.IOS;break;case"ANDROID":t=a.PLATFORM.ANDROID}return this.$templateUserToken.setDevice(t)},errorHandler(e){let t;if(H.hideProgress(),"BootpayEventError"===e.name)t=e.eventMessage;else{if(!l(e.event))throw e;t=e}return t},setLogLevel(e){B.setLogLevel(e)},setUUID:e=>R.setUUID(e),dismiss(){ar.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}};"undefined"!=typeof window&&(window.BootpaySDK=gr);var _r,wr={exports:{}},br={exports:{}};function $r(){return _r||(_r=1,function(e,t){var r,i,n,o,s,a,c;e.exports=(c=w(),n=(i=c).lib,o=n.Base,s=n.WordArray,(a=i.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=r?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],i=0;i<t;i++){var n=e[i];r.push(n.high),r.push(n.low)}return s.create(r,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),r=t.length,i=0;i<r;i++)t[i]=t[i].clone();return e}}),c)}(br)),br.exports}var kr,Er={exports:{}};function Sr(){return kr||(kr=1,function(e,t){var r;e.exports=(r=w(),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init,i=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,i=[],n=0;n<r;n++)i[n>>>2]|=e[n]<<24-n%4*8;t.call(this,i,r)}else t.apply(this,arguments)};i.prototype=e}}(),r.lib.WordArray)}(Er)),Er.exports}var xr,Pr={exports:{}};function Ir(){return xr||(xr=1,function(e,t){var r;e.exports=(r=w(),function(){var e=r,t=e.lib.WordArray,i=e.enc;function n(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n+=2){var o=t[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var r=e.length,i=[],n=0;n<r;n++)i[n>>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},i.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],o=0;o<r;o+=2){var s=n(t[o>>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(s))}return i.join("")},parse:function(e){for(var r=e.length,i=[],o=0;o<r;o++)i[o>>>1]|=n(e.charCodeAt(o)<<16-o%2*16);return t.create(i,2*r)}}}(),r.enc.Utf16)}(Pr)),Pr.exports}var Tr,Ar={exports:{}};function Br(){return Tr||(Tr=1,function(e,t){var r;e.exports=(r=w(),function(){var e=r,t=e.lib.WordArray;function i(e,r,i){for(var n=[],o=0,s=0;s<r;s++)if(s%4){var a=i[e.charCodeAt(s-1)]<<s%4*2|i[e.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return t.create(n,o)}e.enc.Base64url={stringify:function(e,t=!0){var r=e.words,i=e.sigBytes,n=t?this._safe_map:this._map;e.clamp();for(var o=[],s=0;s<i;s+=3)for(var a=(r[s>>>2]>>>24-s%4*8&255)<<16|(r[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|r[s+2>>>2]>>>24-(s+2)%4*8&255,c=0;c<4&&s+.75*c<i;c++)o.push(n.charAt(a>>>6*(3-c)&63));var d=n.charAt(64);if(d)for(;o.length%4;)o.push(d);return o.join("")},parse:function(e,t=!0){var r=e.length,n=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s<n.length;s++)o[n.charCodeAt(s)]=s}var a=n.charAt(64);if(a){var c=e.indexOf(a);-1!==c&&(r=c)}return i(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)}(Ar)),Ar.exports}var Or,Rr={exports:{}};function Cr(){return Or||(Or=1,function(e,t){var r;e.exports=(r=w(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.algo,a=[],c=[];!function(){function t(t){for(var r=e.sqrt(t),i=2;i<=r;i++)if(!(t%i))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(a[n]=r(e.pow(i,.5))),c[n]=r(e.pow(i,1/3)),n++),i++}();var d=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],u=r[6],p=r[7],h=0;h<64;h++){if(h<16)d[h]=0|e[t+h];else{var f=d[h-15],y=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,m=d[h-2],v=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;d[h]=y+d[h-7]+v+d[h-16]}var g=i&n^i&o^n&o,_=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&u)+c[h]+d[h];p=u,u=l,l=a,a=s+w|0,s=o,o=n,n=i,i=w+(_+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+l|0,r[6]=r[6]+u|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)}(Rr)),Rr.exports}var Dr,Ur={exports:{}};var Mr,Nr={exports:{}};function Fr(){return Mr||(Mr=1,function(e,t){var r;e.exports=(r=w(),$r(),function(){var e=r,t=e.lib.Hasher,i=e.x64,n=i.Word,o=i.WordArray,s=e.algo;function a(){return n.create.apply(n,arguments)}var c=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],d=[];!function(){for(var e=0;e<80;e++)d[e]=a()}();var l=s.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],u=r[6],p=r[7],h=i.high,f=i.low,y=n.high,m=n.low,v=o.high,g=o.low,_=s.high,w=s.low,b=a.high,$=a.low,k=l.high,E=l.low,S=u.high,x=u.low,P=p.high,I=p.low,T=h,A=f,B=y,O=m,R=v,C=g,D=_,U=w,M=b,N=$,F=k,L=E,H=S,j=x,W=P,z=I,q=0;q<80;q++){var K,J,G=d[q];if(q<16)J=G.high=0|e[t+2*q],K=G.low=0|e[t+2*q+1];else{var V=d[q-15],Y=V.high,X=V.low,Z=(Y>>>1|X<<31)^(Y>>>8|X<<24)^Y>>>7,Q=(X>>>1|Y<<31)^(X>>>8|Y<<24)^(X>>>7|Y<<25),ee=d[q-2],te=ee.high,re=ee.low,ie=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ne=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=d[q-7],se=oe.high,ae=oe.low,ce=d[q-16],de=ce.high,le=ce.low;J=(J=(J=Z+se+((K=Q+ae)>>>0<Q>>>0?1:0))+ie+((K+=ne)>>>0<ne>>>0?1:0))+de+((K+=le)>>>0<le>>>0?1:0),G.high=J,G.low=K}var ue,pe=M&F^~M&H,he=N&L^~N&j,fe=T&B^T&R^B&R,ye=A&O^A&C^O&C,me=(T>>>28|A<<4)^(T<<30|A>>>2)^(T<<25|A>>>7),ve=(A>>>28|T<<4)^(A<<30|T>>>2)^(A<<25|T>>>7),ge=(M>>>14|N<<18)^(M>>>18|N<<14)^(M<<23|N>>>9),_e=(N>>>14|M<<18)^(N>>>18|M<<14)^(N<<23|M>>>9),we=c[q],be=we.high,$e=we.low,ke=W+ge+((ue=z+_e)>>>0<z>>>0?1:0),Ee=ve+ye;W=H,z=j,H=F,j=L,F=M,L=N,M=D+(ke=(ke=(ke=ke+pe+((ue+=he)>>>0<he>>>0?1:0))+be+((ue+=$e)>>>0<$e>>>0?1:0))+J+((ue+=K)>>>0<K>>>0?1:0))+((N=U+ue|0)>>>0<U>>>0?1:0)|0,D=R,U=C,R=B,C=O,B=T,O=A,T=ke+(me+fe+(Ee>>>0<ve>>>0?1:0))+((A=ue+Ee|0)>>>0<ue>>>0?1:0)|0}f=i.low=f+A,i.high=h+T+(f>>>0<A>>>0?1:0),m=n.low=m+O,n.high=y+B+(m>>>0<O>>>0?1:0),g=o.low=g+C,o.high=v+R+(g>>>0<C>>>0?1:0),w=s.low=w+U,s.high=_+D+(w>>>0<U>>>0?1:0),$=a.low=$+N,a.high=b+M+($>>>0<N>>>0?1:0),E=l.low=E+L,l.high=k+F+(E>>>0<L>>>0?1:0),x=u.low=x+j,u.high=S+H+(x>>>0<j>>>0?1:0),I=p.low=I+z,p.high=P+W+(I>>>0<z>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(i+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),r.SHA512)}(Nr)),Nr.exports}var Lr,Hr={exports:{}};var jr,Wr={exports:{}};function zr(){return jr||(jr=1,function(e,t){var r;e.exports=(r=w(),$r(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.x64.Word,a=t.algo,c=[],d=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var i=(2*e+3*t)%5;e=t%5,t=i}for(e=0;e<5;e++)for(t=0;t<5;t++)d[e+5*t]=t+(2*e+3*t)%5*5;for(var n=1,o=0;o<24;o++){for(var a=0,u=0,p=0;p<7;p++){if(1&n){var h=(1<<p)-1;h<32?u^=1<<h:a^=1<<h-32}128&n?n=n<<1^113:n<<=1}l[o]=s.create(a,u)}}();var u=[];!function(){for(var e=0;e<25;e++)u[e]=s.create()}();var p=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,i=this.blockSize/2,n=0;n<i;n++){var o=e[t+2*n],s=e[t+2*n+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(I=r[n]).high^=s,I.low^=o}for(var a=0;a<24;a++){for(var p=0;p<5;p++){for(var h=0,f=0,y=0;y<5;y++)h^=(I=r[p+5*y]).high,f^=I.low;var m=u[p];m.high=h,m.low=f}for(p=0;p<5;p++){var v=u[(p+4)%5],g=u[(p+1)%5],_=g.high,w=g.low;for(h=v.high^(_<<1|w>>>31),f=v.low^(w<<1|_>>>31),y=0;y<5;y++)(I=r[p+5*y]).high^=h,I.low^=f}for(var b=1;b<25;b++){var $=(I=r[b]).high,k=I.low,E=c[b];E<32?(h=$<<E|k>>>32-E,f=k<<E|$>>>32-E):(h=k<<E-32|$>>>64-E,f=$<<E-32|k>>>64-E);var S=u[d[b]];S.high=h,S.low=f}var x=u[0],P=r[0];for(x.high=P.high,x.low=P.low,p=0;p<5;p++)for(y=0;y<5;y++){var I=r[b=p+5*y],T=u[b],A=u[(p+1)%5+5*y],B=u[(p+2)%5+5*y];I.high=T.high^~A.high&B.high,I.low=T.low^~A.low&B.low}I=r[0];var O=l[a];I.high^=O.high,I.low^=O.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var i=8*t.sigBytes,o=32*this.blockSize;r[i>>>5]|=1<<24-i%32,r[(e.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,d=[],l=0;l<c;l++){var u=s[l],p=u.high,h=u.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),d.push(h),d.push(p)}return new n.init(d,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)}(Math),r.SHA3)}(Wr)),Wr.exports}var qr,Kr={exports:{}};var Jr,Gr={exports:{}};var Vr,Yr={exports:{}};var Xr,Zr={exports:{}};var Qr,ei={exports:{}};function ti(){return Qr||(Qr=1,function(e,t){var r;e.exports=(r=w(),rr(),
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Bootpay={})}(this,(function(e){"use strict";var t=Object.defineProperty,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,o=(e,r,i)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,s=(e,t,r)=>new Promise(((i,n)=>{var o=e=>{try{a(r.next(e))}catch(t){n(t)}},s=e=>{try{a(r.throw(e))}catch(t){n(t)}},a=e=>e.done?i(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())}));const a={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX:e=>`__bootpay_track_${e}__`},c=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),d=e=>{let t=!1;return t="string"==typeof e||Array.isArray(e)?0===e.length:null==e||u(e,"object")&&e.constructor===Object&&0===Object.keys(e).length,t},l=e=>!d(e),u=(e,t)=>typeof e===t,p=(e,t)=>{for(let r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e};var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function y(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),r}var m={exports:{}};var v={exports:{}};const g=y(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var _;function w(){return _||(_=1,v.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==h&&h.crypto&&(r=h.crypto),!r)try{r=g}catch(m){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(m){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(m){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},a=s.Base=function(){return{extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,i=this.sigBytes,n=e.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var a=0;a<n;a+=4)t[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(i());return new c.init(t,e)}}),d=o.enc={},l=d.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new c.init(r,t/2)}},u=d.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new c.init(r,t)}},p=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,a=o/(4*s),d=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*d,o);if(d){for(var u=0;u<d;u+=s)this._doProcessBlock(n,u);r=n.splice(0,d),i.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=f.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new y.HMAC.init(e,r).finalize(t)}}});var y=o.algo={};return o}(Math),e)),v.exports;var e}m.exports=w().enc.Utf8;const b=f(m.exports);var $,k={exports:{}};function E(){return $||($=1,function(e,t){var r;e.exports=(r=w(),function(){var e=r,t=e.lib.WordArray;function i(e,r,i){for(var n=[],o=0,s=0;s<r;s++)if(s%4){var a=i[e.charCodeAt(s-1)]<<s%4*2|i[e.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return t.create(n,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,i=this._map;e.clamp();for(var n=[],o=0;o<r;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)n.push(i.charAt(s>>>6*(3-a)&63));var c=i.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return i(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)}(k)),k.exports}const S=f(E());class x{$blank(e){return d(e)}$present(e){return!this.$blank(e)}$type(e,t){return u(e,t)}$uuid(){return c()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),S.stringify(b.parse(e))}$decrypt(e){return b.stringify(S.parse(e))}getUserAgent(){return window.navigator.userAgent}}const P=1,I=2,T=3,A=4,B={level:T,setLogLevel(e){this.level=e},messageStringify(e,t){try{return`${e}: ${u(t,"object")?JSON.stringify(t):t}`}catch(r){console.error(`log parse error: ${r}`)}},debug(e,t){this.level<=P&&console.log(this.messageStringify(e,t))},info(e,t){this.level<=I&&console.info(this.messageStringify(e,t))},warn(e,t){this.level<=T&&console.warn(this.messageStringify(e,t))},error(e,t){this.level<=A&&console.error(this.messageStringify(e,t))}};class O extends x{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch(r){t=this.$storage[e]}return this.$present(t)?this.$decrypt(t):void 0}set(e,t){try{window.localStorage.setItem(e,this.$encrypt(t))}catch(r){this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=a.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=a.STORAGE_PREFIX("uuid");return this.set(t,e)}getToJSON(e){const t=this.get(e);return this.$present(t)?this.caseMarshalToJson(t):t}setToJSON(e,t){return this.set(e,JSON.stringify(t)),t}caseMarshalToJson(e){try{return JSON.parse(e)}catch(t){return JSON.parse(e.replace(/\\\"/g,'"'))}}}const R=new class extends O{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round((new Date).getTime()/1e3),t=a.STORAGE_PREFIX("session"),r=this.getToJSON(t);if(this.$blank(r)||r.time+1800<e){return this.setToJSON(t,{time:e,term:this.$blank(r)?-1:e-r.time,uuid:`${this.$uuid()}-${e}`}).uuid}return r.uuid}currentTimeTerm(){const e=a.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=a.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.time)?-1:t.time}setTime(e){const t=Math.round((new Date).getTime()/1e3),r=a.STORAGE_PREFIX("session"),i=this.getToJSON(r),n=this.$blank(i)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:i;n.time=e,this.setToJSON(r,n)}generateKey(){return`${this.$uuid()}-${(new Date).getTime()}`}setUser(e){return this.set(a.STORAGE_PREFIX("user"),void 0===e?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(a.STORAGE_PREFIX("user")))}catch(e){return void B.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`)}}},C="5.0.2-beta.1",D={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:C,applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set(e){this.mode=e},setApplicationId(e){return this.applicationId=e,this.currentApplicationId(void 0)},setLocale(e){this.locale=e,this.isSetLocale=!0},currentApplicationId(e=void 0){return void 0===e?this.applicationId:e},setDevelopmentHost(e){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,e)},setVersion(e,t,r=void 0){this.sdkName=void 0===this.sdkNames[t]?0:this.sdkNames[t],this.sdkVersion=e,this.packageVersion=void 0===r||""===r?C:r},toApi(e){return[this.API_URL[this.mode],e].join("/")},toDoor(e){return[this.DOOR_URL[this.mode],e].join("/")},toWidget(e){return[this.WIDGET_URL[this.mode],e].join("/")},isMobile(){if("undefined"==typeof window)return!1;const e=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(e)},isMobileSafari(){if("undefined"==typeof window)return!1;const e=window.navigator.userAgent;return(e.match(/iPad/i)||e.match(/iPhone/i))&&!e.match(/CriOS/i)},toAnalytics(e){return[this.ANALYTICS_URL[this.mode],e].join("/")}};class U extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const M={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||("undefined"!=typeof window&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),"undefined"!=typeof document&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),"undefined"!=typeof Element&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),this.isBind=!0)},on(e,t,r=void 0){return d(M.__BOOTPAY_NAMESPACE)&&(M.__BOOTPAY_NAMESPACE={}),this.addEventListener(e.split(".")[0],t,r||!1),M.__BOOTPAY_NAMESPACE[e]=t,this},off(e){return l(M.__BOOTPAY_NAMESPACE)&&l(M.__BOOTPAY_NAMESPACE[e])&&this.removeEventListener(e.split(".")[0],M.__BOOTPAY_NAMESPACE[e]),this}};class N extends x{constructor(){super(),this.$resolve=null,this.$reject=null,M.initialize()}reject(e){null!==this.$reject&&this.$reject(e)}resolve(e){null!==this.$resolve&&this.$resolve(e)}setCallbackFunction(e,t){this.$resolve=e,this.$reject=t}parseEvent(e){let t={};if(this.$present(e)&&this.$type(e,"string")){try{t=JSON.parse(e)}catch(r){B.info("json parsing failed",`data: ${e}, message: ${F(r)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}return null}}const F=e=>"string"==typeof e?e.toUpperCase():e instanceof Error?e.message:e;class L extends x{constructor(){super(),this.$windowId="",this.$template=""}byId(e){return document.getElementById(e)}createTemplateHtml(){null===this.byId(this.$windowId)&&document.body.insertAdjacentHTML("beforeend",this.$template)}bodyOpen(e=void 0){const t=document.querySelector("body");this.$present(t.className)?t.className=`${t.className} bootpay-open`:t.className="bootpay-open",this.$present(e)&&(t.className=`${t.className} ${e}`)}bodyClose(){const e=document.querySelector("body");e.className=e.className.replace("bootpay-open","")}templateResize(e,t){const r=this.byId(e);if(void 0!==r)for(let i in Object.keys(t)){let e=Object.keys(t)[i],n=t[e];this.$present(n)&&!String(n).match(/%/)&&(e.match(/width/)||e.match(/Width/)||e.match(/height/)||e.match(/Height/))&&(n=`${String(t[e]).replace(/px/gi,"")}px`),r.style.setProperty(e,n)}}}const H=new class extends L{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`\n<div class="bootpay-progress-background" id="${this.$alfredId}" style="display: none;">\n<div class="progress-message-window">\n <div class="alfred-loading">\n <div class="bootpay-spinner"></div> \n </div>\n <div class="alfred-text">\n <span class="alfred-inner-text" id="${this.$alfredTextId}">${e}</span>\n </div>\n</div> \n</div>\n `}showProgress(e){this.$present(this.byId(this.$alfredId))?this.byId(this.$alfredTextId).innerText=e:document.body.insertAdjacentHTML("beforeend",this.template(e)),this.byId(this.$alfredId).style.setProperty("display","block")}hideProgress(){try{this.byId(this.$alfredId).outerHTML=""}catch(e){}}};var j={exports:{}},W=function(e,t){return function(){for(var r=new Array(arguments.length),i=0;i<r.length;i++)r[i]=arguments[i];return e.apply(t,r)}},z=W,q=Object.prototype.toString,K=function(e){return function(t){var r=q.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function J(e){return e=e.toLowerCase(),function(t){return K(t)===e}}function G(e){return Array.isArray(e)}function V(e){return void 0===e}var Y=J("ArrayBuffer");function X(e){return null!==e&&"object"==typeof e}function Z(e){if("object"!==K(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var Q=J("Date"),ee=J("File"),te=J("Blob"),re=J("FileList");function ie(e){return"[object Function]"===q.call(e)}var ne=J("URLSearchParams");function oe(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),G(e))for(var r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}var se=function(e){return function(t){return e&&t instanceof e}}("undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array)),ae={isArray:G,isArrayBuffer:Y,isBuffer:function(e){return null!==e&&!V(e)&&null!==e.constructor&&!V(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||q.call(e)===t||ie(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Y(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:X,isPlainObject:Z,isUndefined:V,isDate:Q,isFile:ee,isBlob:te,isFunction:ie,isStream:function(e){return X(e)&&ie(e.pipe)},isURLSearchParams:ne,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:oe,merge:function e(){var t={};function r(r,i){Z(t[i])&&Z(r)?t[i]=e(t[i],r):Z(r)?t[i]=e({},r):G(r)?t[i]=r.slice():t[i]=r}for(var i=0,n=arguments.length;i<n;i++)oe(arguments[i],r);return t},extend:function(e,t,r){return oe(t,(function(t,i){e[i]=r&&"function"==typeof t?z(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var i,n,o,s={};t=t||{};do{for(n=(i=Object.getOwnPropertyNames(e)).length;n-- >0;)s[o=i[n]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:K,kindOfTest:J,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var i=e.indexOf(t,r);return-1!==i&&i===r},toArray:function(e){if(!e)return null;var t=e.length;if(V(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:se,isFileList:re},ce=ae;function de(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var le=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(ce.isURLSearchParams(t))i=t.toString();else{var n=[];ce.forEach(t,(function(e,t){null!=e&&(ce.isArray(e)?t+="[]":e=[e],ce.forEach(e,(function(e){ce.isDate(e)?e=e.toISOString():ce.isObject(e)&&(e=JSON.stringify(e)),n.push(de(t)+"="+de(e))})))})),i=n.join("&")}if(i){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e},ue=ae;function pe(){this.handlers=[]}pe.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},pe.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},pe.prototype.forEach=function(e){ue.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var he=pe,fe=ae,ye=ae;function me(e,t,r,i,n){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}ye.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var ve=me.prototype,ge={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){ge[e]={value:e}})),Object.defineProperties(me,ge),Object.defineProperty(ve,"isAxiosError",{value:!0}),me.from=function(e,t,r,i,n,o){var s=Object.create(ve);return ye.toFlatObject(e,s,(function(e){return e!==Error.prototype})),me.call(s,e.message,t,r,i,n),s.name=e.name,o&&Object.assign(s,o),s};var _e=me,we={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},be=ae;var $e,ke,Ee,Se,xe=function(e,t){t=t||new FormData;var r=[];function i(e){return null===e?"":be.isDate(e)?e.toISOString():be.isArrayBuffer(e)||be.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(n,o){if(be.isPlainObject(n)||be.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+o);r.push(n),be.forEach(n,(function(r,n){if(!be.isUndefined(r)){var s,a=o?o+"."+n:n;if(r&&!o&&"object"==typeof r)if(be.endsWith(n,"{}"))r=JSON.stringify(r);else if(be.endsWith(n,"[]")&&(s=be.toArray(r)))return void s.forEach((function(e){!be.isUndefined(e)&&t.append(a,i(e))}));e(r,a)}})),r.pop()}else t.append(o,i(n))}(e),t};var Pe,Ie,Te,Ae,Be,Oe,Re,Ce,De,Ue,Me,Ne,Fe=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Le=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},He=function(e,t){return e&&!Fe(t)?Le(e,t):t};function je(){if(Oe)return Be;Oe=1;var e=_e;function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return ae.inherits(t,e,{__CANCEL__:!0}),Be=t}function We(){if(Ue)return De;Ue=1;var e=ae,t=function(){if(ke)return $e;ke=1;var e=_e;return $e=function(t,r,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?r(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}}(),r=function(){if(Se)return Ee;Se=1;var e=ae;return Ee=e.isStandardBrowserEnv()?function(){return{write:function(t,r,i,n,o,s){var a=[];a.push(t+"="+encodeURIComponent(r)),e.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),e.isString(n)&&a.push("path="+n),e.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()}(),i=le,n=He,o=function(){if(Ie)return Pe;Ie=1;var e=ae,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Pe=function(r){var i,n,o,s={};return r?(e.forEach(r.split("\n"),(function(r){if(o=r.indexOf(":"),i=e.trim(r.substr(0,o)).toLowerCase(),n=e.trim(r.substr(o+1)),i){if(s[i]&&t.indexOf(i)>=0)return;s[i]="set-cookie"===i?(s[i]?s[i]:[]).concat([n]):s[i]?s[i]+", "+n:n}})),s):s}}(),s=function(){if(Ae)return Te;Ae=1;var e=ae;return Te=e.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(e){var t=e;return r&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=n(window.location.href),function(r){var i=e.isString(r)?n(r):r;return i.protocol===t.protocol&&i.host===t.host}}():function(){return function(){return!0}}()}(),a=we,c=_e,d=je(),l=Ce?Re:(Ce=1,Re=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""});return De=function(u){return new Promise((function(p,h){var f,y=u.data,m=u.headers,v=u.responseType;function g(){u.cancelToken&&u.cancelToken.unsubscribe(f),u.signal&&u.signal.removeEventListener("abort",f)}e.isFormData(y)&&e.isStandardBrowserEnv()&&delete m["Content-Type"];var _=new XMLHttpRequest;if(u.auth){var w=u.auth.username||"",b=u.auth.password?unescape(encodeURIComponent(u.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var $=n(u.baseURL,u.url);function k(){if(_){var e="getAllResponseHeaders"in _?o(_.getAllResponseHeaders()):null,r={data:v&&"text"!==v&&"json"!==v?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:e,config:u,request:_};t((function(e){p(e),g()}),(function(e){h(e),g()}),r),_=null}}if(_.open(u.method.toUpperCase(),i($,u.params,u.paramsSerializer),!0),_.timeout=u.timeout,"onloadend"in _?_.onloadend=k:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(k)},_.onabort=function(){_&&(h(new c("Request aborted",c.ECONNABORTED,u,_)),_=null)},_.onerror=function(){h(new c("Network Error",c.ERR_NETWORK,u,_,_)),_=null},_.ontimeout=function(){var e=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",t=u.transitional||a;u.timeoutErrorMessage&&(e=u.timeoutErrorMessage),h(new c(e,t.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,u,_)),_=null},e.isStandardBrowserEnv()){var E=(u.withCredentials||s($))&&u.xsrfCookieName?r.read(u.xsrfCookieName):void 0;E&&(m[u.xsrfHeaderName]=E)}"setRequestHeader"in _&&e.forEach(m,(function(e,t){void 0===y&&"content-type"===t.toLowerCase()?delete m[t]:_.setRequestHeader(t,e)})),e.isUndefined(u.withCredentials)||(_.withCredentials=!!u.withCredentials),v&&"json"!==v&&(_.responseType=u.responseType),"function"==typeof u.onDownloadProgress&&_.addEventListener("progress",u.onDownloadProgress),"function"==typeof u.onUploadProgress&&_.upload&&_.upload.addEventListener("progress",u.onUploadProgress),(u.cancelToken||u.signal)&&(f=function(e){_&&(h(!e||e&&e.type?new d:e),_.abort(),_=null)},u.cancelToken&&u.cancelToken.subscribe(f),u.signal&&(u.signal.aborted?f():u.signal.addEventListener("abort",f))),y||(y=null);var S=l($);S&&-1===["http","https","file"].indexOf(S)?h(new c("Unsupported protocol "+S+":",c.ERR_BAD_REQUEST,u)):_.send(y)}))}}var ze=ae,qe=function(e,t){fe.forEach(e,(function(r,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[i])}))},Ke=_e,Je=xe,Ge={"Content-Type":"application/x-www-form-urlencoded"};function Ve(e,t){!ze.isUndefined(e)&&ze.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Ye,Xe={transitional:we,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Ye=We()),Ye),transformRequest:[function(e,t){if(qe(t,"Accept"),qe(t,"Content-Type"),ze.isFormData(e)||ze.isArrayBuffer(e)||ze.isBuffer(e)||ze.isStream(e)||ze.isFile(e)||ze.isBlob(e))return e;if(ze.isArrayBufferView(e))return e.buffer;if(ze.isURLSearchParams(e))return Ve(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,i=ze.isObject(e),n=t&&t["Content-Type"];if((r=ze.isFileList(e))||i&&"multipart/form-data"===n){var o=this.env&&this.env.FormData;return Je(r?{"files[]":e}:e,o&&new o)}return i||"application/json"===n?(Ve(t,"application/json"),function(e,t,r){if(ze.isString(e))try{return(t||JSON.parse)(e),ze.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Xe.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,n=!r&&"json"===this.responseType;if(n||i&&ze.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw Ke.from(o,Ke.ERR_BAD_RESPONSE,this,null,this.response);throw o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne?Me:(Ne=1,Me=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ze.forEach(["delete","get","head"],(function(e){Xe.headers[e]={}})),ze.forEach(["post","put","patch"],(function(e){Xe.headers[e]=ze.merge(Ge)}));var Ze,Qe,et=Xe,tt=ae,rt=et;function it(){return Qe?Ze:(Qe=1,Ze=function(e){return!(!e||!e.__CANCEL__)})}var nt=ae,ot=function(e,t,r){var i=this||rt;return tt.forEach(r,(function(r){e=r.call(i,e,t)})),e},st=it(),at=et,ct=je();function dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ct}var lt,ut,pt=ae,ht=function(e,t){t=t||{};var r={};function i(e,t){return pt.isPlainObject(e)&&pt.isPlainObject(t)?pt.merge(e,t):pt.isPlainObject(t)?pt.merge({},t):pt.isArray(t)?t.slice():t}function n(r){return pt.isUndefined(t[r])?pt.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function o(e){if(!pt.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return pt.isUndefined(t[r])?pt.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function a(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return pt.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||n,i=t(e);pt.isUndefined(i)&&t!==a||(r[e]=i)})),r};function ft(){return ut?lt:(ut=1,lt={version:"0.27.2"})}var yt=ft().version,mt=_e,vt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){vt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var gt={};vt.transitional=function(e,t,r){function i(e,t){return"[Axios v"+yt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,o){if(!1===e)throw new mt(i(n," has been removed"+(t?" in "+t:"")),mt.ERR_DEPRECATED);return t&&!gt[n]&&(gt[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}};var _t,wt,bt,$t,kt,Et,St=ae,xt=le,Pt=he,It=function(e){return dt(e),e.headers=e.headers||{},e.data=ot.call(e,e.data,e.headers,e.transformRequest),e.headers=nt.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),nt.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||at.adapter)(e).then((function(t){return dt(e),t.data=ot.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return st(t)||(dt(e),t&&t.response&&(t.response.data=ot.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Tt=ht,At=He,Bt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),n=i.length;n-- >0;){var o=i[n],s=t[o];if(s){var a=e[o],c=void 0===a||s(a,o,e);if(!0!==c)throw new mt("option "+o+" must be "+c,mt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new mt("Unknown option "+o,mt.ERR_BAD_OPTION)}},validators:vt},Ot=Bt.validators;function Rt(e){this.defaults=e,this.interceptors={request:new Pt,response:new Pt}}Rt.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Tt(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Bt.assertOptions(r,{silentJSONParsing:Ot.transitional(Ot.boolean),forcedJSONParsing:Ot.transitional(Ot.boolean),clarifyTimeoutError:Ot.transitional(Ot.boolean)},!1);var i=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!n){var a=[It,void 0];for(Array.prototype.unshift.apply(a,i),a=a.concat(s),o=Promise.resolve(t);a.length;)o=o.then(a.shift(),a.shift());return o}for(var c=t;i.length;){var d=i.shift(),l=i.shift();try{c=d(c)}catch(u){l(u);break}}try{o=It(c)}catch(u){return Promise.reject(u)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},Rt.prototype.getUri=function(e){e=Tt(this.defaults,e);var t=At(e.baseURL,e.url);return xt(t,e.params,e.paramsSerializer)},St.forEach(["delete","get","head","options"],(function(e){Rt.prototype[e]=function(t,r){return this.request(Tt(r||{},{method:e,url:t,data:(r||{}).data}))}})),St.forEach(["post","put","patch"],(function(e){function t(t){return function(r,i,n){return this.request(Tt(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}Rt.prototype[e]=t(),Rt.prototype[e+"Form"]=t(!0)}));var Ct=ae,Dt=W,Ut=Rt,Mt=ht;var Nt=function e(t){var r=new Ut(t),i=Dt(Ut.prototype.request,r);return Ct.extend(i,Ut.prototype,r),Ct.extend(i,r),i.create=function(r){return e(Mt(t,r))},i}(et);Nt.Axios=Ut,Nt.CanceledError=je(),Nt.CancelToken=function(){if(wt)return _t;wt=1;var e=je();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var i=this;this.promise.then((function(e){if(i._listeners){var t,r=i._listeners.length;for(t=0;t<r;t++)i._listeners[t](e);i._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){i.subscribe(e),t=e})).then(e);return r.cancel=function(){i.unsubscribe(t)},r},t((function(t){i.reason||(i.reason=new e(t),r(i.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},t.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},_t=t}(),Nt.isCancel=it(),Nt.VERSION=ft().version,Nt.toFormData=xe,Nt.AxiosError=_e,Nt.Cancel=Nt.CanceledError,Nt.all=function(e){return Promise.all(e)},Nt.spread=$t?bt:($t=1,bt=function(e){return function(t){return e.apply(null,t)}}),Nt.isAxiosError=function(){if(Et)return kt;Et=1;var e=ae;return kt=function(t){return e.isObject(t)&&!0===t.isAxiosError}}(),j.exports=Nt,j.exports.default=Nt;const Ft=f(j.exports);var Lt,Ht={exports:{}},jt={exports:{}};function Wt(){return Lt||(Lt=1,function(e,t){var r;e.exports=(r=w(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var i=t+r,n=e[i];e[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=e[t+0],c=e[t+1],h=e[t+2],f=e[t+3],y=e[t+4],m=e[t+5],v=e[t+6],g=e[t+7],_=e[t+8],w=e[t+9],b=e[t+10],$=e[t+11],k=e[t+12],E=e[t+13],S=e[t+14],x=e[t+15],P=o[0],I=o[1],T=o[2],A=o[3];P=d(P,I,T,A,s,7,a[0]),A=d(A,P,I,T,c,12,a[1]),T=d(T,A,P,I,h,17,a[2]),I=d(I,T,A,P,f,22,a[3]),P=d(P,I,T,A,y,7,a[4]),A=d(A,P,I,T,m,12,a[5]),T=d(T,A,P,I,v,17,a[6]),I=d(I,T,A,P,g,22,a[7]),P=d(P,I,T,A,_,7,a[8]),A=d(A,P,I,T,w,12,a[9]),T=d(T,A,P,I,b,17,a[10]),I=d(I,T,A,P,$,22,a[11]),P=d(P,I,T,A,k,7,a[12]),A=d(A,P,I,T,E,12,a[13]),T=d(T,A,P,I,S,17,a[14]),P=l(P,I=d(I,T,A,P,x,22,a[15]),T,A,c,5,a[16]),A=l(A,P,I,T,v,9,a[17]),T=l(T,A,P,I,$,14,a[18]),I=l(I,T,A,P,s,20,a[19]),P=l(P,I,T,A,m,5,a[20]),A=l(A,P,I,T,b,9,a[21]),T=l(T,A,P,I,x,14,a[22]),I=l(I,T,A,P,y,20,a[23]),P=l(P,I,T,A,w,5,a[24]),A=l(A,P,I,T,S,9,a[25]),T=l(T,A,P,I,f,14,a[26]),I=l(I,T,A,P,_,20,a[27]),P=l(P,I,T,A,E,5,a[28]),A=l(A,P,I,T,h,9,a[29]),T=l(T,A,P,I,g,14,a[30]),P=u(P,I=l(I,T,A,P,k,20,a[31]),T,A,m,4,a[32]),A=u(A,P,I,T,_,11,a[33]),T=u(T,A,P,I,$,16,a[34]),I=u(I,T,A,P,S,23,a[35]),P=u(P,I,T,A,c,4,a[36]),A=u(A,P,I,T,y,11,a[37]),T=u(T,A,P,I,g,16,a[38]),I=u(I,T,A,P,b,23,a[39]),P=u(P,I,T,A,E,4,a[40]),A=u(A,P,I,T,s,11,a[41]),T=u(T,A,P,I,f,16,a[42]),I=u(I,T,A,P,v,23,a[43]),P=u(P,I,T,A,w,4,a[44]),A=u(A,P,I,T,k,11,a[45]),T=u(T,A,P,I,x,16,a[46]),P=p(P,I=u(I,T,A,P,h,23,a[47]),T,A,s,6,a[48]),A=p(A,P,I,T,g,10,a[49]),T=p(T,A,P,I,S,15,a[50]),I=p(I,T,A,P,m,21,a[51]),P=p(P,I,T,A,k,6,a[52]),A=p(A,P,I,T,f,10,a[53]),T=p(T,A,P,I,b,15,a[54]),I=p(I,T,A,P,c,21,a[55]),P=p(P,I,T,A,_,6,a[56]),A=p(A,P,I,T,x,10,a[57]),T=p(T,A,P,I,v,15,a[58]),I=p(I,T,A,P,E,21,a[59]),P=p(P,I,T,A,y,6,a[60]),A=p(A,P,I,T,$,10,a[61]),T=p(T,A,P,I,h,15,a[62]),I=p(I,T,A,P,w,21,a[63]),o[0]=o[0]+P|0,o[1]=o[1]+I|0,o[2]=o[2]+T|0,o[3]=o[3]+A|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var o=e.floor(i/4294967296),s=i;r[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,d=0;d<4;d++){var l=c[d];c[d]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,r,i,n,o,s){var a=e+(t&r|~t&i)+n+s;return(a<<o|a>>>32-o)+t}function l(e,t,r,i,n,o,s){var a=e+(t&i|r&~i)+n+s;return(a<<o|a>>>32-o)+t}function u(e,t,r,i,n,o,s){var a=e+(t^r^i)+n+s;return(a<<o|a>>>32-o)+t}function p(e,t,r,i,n,o,s){var a=e+(r^(t|~i))+n+s;return(a<<o|a>>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)}(jt)),jt.exports}var zt,qt={exports:{}},Kt={exports:{}};function Jt(){return zt||(zt=1,function(e,t){var r,i,n,o,s,a,c,d;e.exports=(d=w(),i=(r=d).lib,n=i.WordArray,o=i.Hasher,s=r.algo,a=[],c=s.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],d=0;d<80;d++){if(d<16)a[d]=0|e[t+d];else{var l=a[d-3]^a[d-8]^a[d-14]^a[d-16];a[d]=l<<1|l>>>31}var u=(i<<5|i>>>27)+c+a[d];u+=d<20?1518500249+(n&o|~n&s):d<40?1859775393+(n^o^s):d<60?(n&o|n&s|o&s)-1894007588:(n^o^s)-899497514,c=s,s=o,o=n<<30|n>>>2,n=i,i=u}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(i+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=o._createHelper(c),r.HmacSHA1=o._createHmacHelper(c),d.SHA1)}(Kt)),Kt.exports}var Gt,Vt,Yt={exports:{}};function Xt(){return Gt||(Gt=1,function(e,t){var r,i,n,o;e.exports=(r=w(),n=(i=r).lib.Base,o=i.enc.Utf8,void(i.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),s=this._iKey=t.clone(),a=n.words,c=s.words,d=0;d<r;d++)a[d]^=1549556828,c[d]^=909522486;n.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))}(Yt)),Yt.exports}function Zt(){return Vt||(Vt=1,function(e,t){var r,i,n,o,s,a,c,d;e.exports=(d=w(),Jt(),Xt(),i=(r=d).lib,n=i.Base,o=i.WordArray,s=r.algo,a=s.MD5,c=s.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,i=this.cfg,n=i.hasher.create(),s=o.create(),a=s.words,c=i.keySize,d=i.iterations;a.length<c;){r&&n.update(r),r=n.update(e).finalize(t),n.reset();for(var l=1;l<d;l++)r=n.finalize(r),n.reset();s.concat(r)}return s.sigBytes=4*c,s}}),r.EvpKDF=function(e,t,r){return c.create(r).compute(e,t)},d.EvpKDF)}(qt)),qt.exports}var Qt,er,tr={exports:{}};function rr(){return Qt||(Qt=1,function(e,t){var r;e.exports=(r=w(),Zt(),void(r.lib.Cipher||function(e){var t=r,i=t.lib,n=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=t.enc;a.Utf8;var c=a.Base64,d=t.algo.EvpKDF,l=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?_:v}return function(t){return{encrypt:function(r,i,n){return e(i).encrypt(t,r,i,n)},decrypt:function(r,i,n){return e(i).decrypt(t,r,i,n)}}}}()});i.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var u=t.mode={},p=i.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=u.CBC=function(){var t=p.extend();function r(t,r,i){var n,o=this._iv;o?(n=o,this._iv=e):n=this._prevBlock;for(var s=0;s<i;s++)t[r+s]^=n[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize;r.call(this,e,t,n),i.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),t.Decryptor=t.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize,o=e.slice(t,t+n);i.decryptBlock(e,t),r.call(this,e,t,n),this._prevBlock=o}}),t}(),f=(t.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,i=r-e.sigBytes%r,n=i<<24|i<<16|i<<8|i,s=[],a=0;a<i;a+=4)s.push(n);var c=o.create(s,i);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};i.BlockCipher=l.extend({cfg:l.cfg.extend({mode:h,padding:f}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,i=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=i.createEncryptor:(e=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(i,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var y=i.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(t=o.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},v=i.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(e,t,r,i){i=this.cfg.extend(i);var n=e.createEncryptor(r,i),o=n.finalize(t),s=n.cfg;return y.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,r,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(r,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),g=(t.kdf={}).OpenSSL={execute:function(e,t,r,i){i||(i=o.random(8));var n=d.create({keySize:t+r}).compute(e,i),s=o.create(n.words.slice(t),4*r);return n.sigBytes=4*t,y.create({key:n,iv:s,salt:i})}},_=i.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:g}),encrypt:function(e,t,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,e.keySize,e.ivSize);i.iv=n.iv;var o=v.encrypt.call(this,e,t,n.key,i);return o.mixIn(n),o},decrypt:function(e,t,r,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var n=i.kdf.execute(r,e.keySize,e.ivSize,t.salt);return i.iv=n.iv,v.decrypt.call(this,e,t,n.key,i)}})}()))}(tr)),tr.exports}function ir(){return er||(er=1,function(e,t){var r;e.exports=(r=w(),E(),Wt(),Zt(),rr(),function(){var e=r,t=e.lib.BlockCipher,i=e.algo,n=[],o=[],s=[],a=[],c=[],d=[],l=[],u=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,i=0;for(t=0;t<256;t++){var f=i^i<<1^i<<2^i<<3^i<<4;f=f>>>8^255&f^99,n[r]=f,o[f]=r;var y=e[r],m=e[y],v=e[m],g=257*e[f]^16843008*f;s[r]=g<<24|g>>>8,a[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,d[r]=g,g=16843009*v^65537*m^257*y^16843008*r,l[f]=g<<24|g>>>8,u[f]=g<<16|g>>>16,p[f]=g<<8|g>>>24,h[f]=g,r?(r=y^e[e[e[v^y]]],i^=e[e[i]]):r=i=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],y=i.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,i=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s<i;s++)s<r?o[s]=t[s]:(d=o[s-1],s%r?r>6&&s%r==4&&(d=n[d>>>24]<<24|n[d>>>16&255]<<16|n[d>>>8&255]<<8|n[255&d]):(d=n[(d=d<<8|d>>>24)>>>24]<<24|n[d>>>16&255]<<16|n[d>>>8&255]<<8|n[255&d],d^=f[s/r|0]<<24),o[s]=o[s-r]^d);for(var a=this._invKeySchedule=[],c=0;c<i;c++){if(s=i-c,c%4)var d=o[s];else d=o[s-4];a[c]=c<4||s<=4?d:l[n[d>>>24]]^u[n[d>>>16&255]]^p[n[d>>>8&255]]^h[n[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,d,n)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,u,p,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,i,n,o,s,a){for(var c=this._nRounds,d=e[t]^r[0],l=e[t+1]^r[1],u=e[t+2]^r[2],p=e[t+3]^r[3],h=4,f=1;f<c;f++){var y=i[d>>>24]^n[l>>>16&255]^o[u>>>8&255]^s[255&p]^r[h++],m=i[l>>>24]^n[u>>>16&255]^o[p>>>8&255]^s[255&d]^r[h++],v=i[u>>>24]^n[p>>>16&255]^o[d>>>8&255]^s[255&l]^r[h++],g=i[p>>>24]^n[d>>>16&255]^o[l>>>8&255]^s[255&u]^r[h++];d=y,l=m,u=v,p=g}y=(a[d>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&p])^r[h++],m=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[p>>>8&255]<<8|a[255&d])^r[h++],v=(a[u>>>24]<<24|a[p>>>16&255]<<16|a[d>>>8&255]<<8|a[255&l])^r[h++],g=(a[p>>>24]<<24|a[d>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^r[h++],e[t]=y,e[t+1]=m,e[t+2]=v,e[t+3]=g},keySize:8});e.AES=t._createHelper(y)}(),r.AES)}(Ht)),Ht.exports}const nr=f(ir());class or{constructor(){this.$http=Ft.create({timeout:6e4})}static encryptParams(e){u(e,"object")&&(e=JSON.stringify(e));let t=nr.encrypt(e,c());return{payload:t.ciphertext.toString(S),token:`${t.key.toString(S)}##${t.iv.toString(S)}`}}static toUnderscore(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}static toCamelcase(e){return e.replace(/(\_[a-z])/g,(function(e){return e.toUpperCase().replace(/_/g,"")}))}static objectKeyToUnderscore(e){let t;return l(e)&&(Array.isArray(e)?(t=[],e.forEach((e=>{let r={};Object.keys(e).forEach((t=>{r[this.toUnderscore(t)]=e[t]})),t.push(r)}))):(t={},Object.keys(e).forEach((r=>{t[this.toUnderscore(r)]=e[r]})))),t}static objectKeyToCamel(e){let t;return l(e)&&(Array.isArray(e)?(t=[],e.forEach((e=>{let r={};Object.keys(e).forEach((t=>{r[this.toCamelcase(t)]=e[t]})),t.push(r)}))):(t={},Object.keys(e).forEach((r=>{u(e[r],"object")&&Object.keys(e[r]).length>0?t[this.toCamelcase(r)]=this.objectKeyToCamel(e[r]):t[this.toCamelcase(r)]=e[r]})))),t}static axiosMultipayConfigure(){Ft.defaults.headers.common["Content-Type"]="application/json",Ft.defaults.headers.common.Accept="application/json",Ft.interceptors.request.use((e=>(l(e.data),this.isHttpBodyUsedMethod(e.method)&&(e.data=or.encryptParams(or.objectKeyToUnderscore(e.data))),void 0!==e.headers&&l(e.headers.progress)&&delete e.headers.progress,e)),(e=>Promise.reject(e))),Ft.interceptors.response.use((e=>e),(function(e){if(l(e.response)){let t=e.response.data;return t.status=e.response.status,Promise.reject(t)}return Promise.reject(e)}))}static isHttpBodyUsedMethod(e){return["post","put"].indexOf(e)>-1}}or.axiosMultipayConfigure();const sr=new class extends or{constructor(){super()}pollingStatus(e,t,r,i){return s(this,null,(function*(){try{const n=yield this.$http.get([e,"s",t].join("/"),{params:{application_id:r,tk:i}});return Promise.resolve(n)}catch(n){return Promise.reject(n)}}))}};const ar=new class extends N{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""},this.$pollingEvent=sr,this.pollingInterval=3e3,this.isDone=!1}bind(e,t){this.isDone=!1,this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,(e=>{const t=this.parseEvent(e.data);if(B.debug("event received",JSON.stringify(t)),l(t))switch(B.debug("event",t),t.event){case"error":case"cancel":return this.reject({event:t.event,pg_error_code:t.pg_error_code,error_code:t.error_code,message:t.message,payload:t.payload});case"setConfirmParameters":const e=`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${t.application_id}`;"redirect"===t.open_type?lr.setConfirmRedirect(e):lr.setConfirmFormUrl(e);break;case"confirm":return this.resolve({event:t.event,receipt_id:t.receipt_id,gateway_url:t.gateway_url,order_id:t.order_id});case"redirect":return lr.destroy(!1),void(location.href=t.url);case"moveRedirectUrl":lr.hidePaymentiFrame(),H.showProgress("결제 진행 중입니다. 잠시만 기다려주세요."),location.replace(((e,t)=>{if(l(t)){const r="string"!=typeof t?new URLSearchParams(JSON.parse(JSON.stringify(t))).toString():t;return/\?/.test(e)?`${e}&${r}`:`${e}?${r}`}return e})(t.url,t.parameters)),setTimeout((()=>{lr.destroy(!1)}),5e3);break;case"polling":return void 0!==this.$pollingData&&(this.$pollingData.receiptId=t.receipt_id,this.$pollingData.gatewayUrl=t.gateway_url),this.startPollingEvent();case"issued":case"done":if(!this.isDone)return this.isDone=!0,this.clearPollingEvent(),this.resolve(t);break;case"iFrameStyle":lr.iFrameSetStyle(t.styles);break;case"windowStyle":lr.windowStyle(t.styles);break;case"hideProgress":H.hideProgress();break;case"showProgress":H.showProgress(t.message);break;case"resize":lr.iFrameResize(t.resizeData);break;case"hidePayment":lr.closePopup(),lr.hidePaymentiFrame();break;case"showPayment":lr.showPaymentiFrame(!!this.$present(t.showCloseButton)&&t.showCloseButton);break;case"popup":lr.createPopupButton({gatewayUrl:t.url,receiptId:t.receipt_id,name:t.name,price:t.price});break;case"close":lr.destroy();break;default:return}}))}setDefaultPaymentData(e,t){void 0!==this.$pollingData&&(this.$pollingData.applicationId=e,this.$pollingData.transactionKey=t)}callBootpayDOMEvent(e,t=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,e].join(""),{detail:t}))}startPollingEvent(){this.$pollingInterval=setInterval((()=>s(this,null,(function*(){if(void 0!==this.$pollingData)try{const e=yield this.$pollingEvent.pollingStatus(this.$pollingData.gatewayUrl,this.$pollingData.receiptId,this.$pollingData.applicationId,this.$pollingData.transactionKey);let t={bootpay_event:!0,event:"",data:e.data};if(void 0!==e.data){if(B.debug("polling event",`receive data: ${JSON.stringify(t)}`),1===e.data.status)return t.event="done",window.postMessage(JSON.stringify(t),"*");if(5===e.data.status)return t.event="issued",window.postMessage(JSON.stringify(t),"*")}}catch(e){return this.reject({error_code:"RC_RECEIPT_POLLING_INVALID",message:"결제 상태 체크에 실패하였습니다."})}}))),this.pollingInterval)}clearPollingEvent(){void 0!==this.$pollingInterval&&clearInterval(this.$pollingInterval),this.$pollingInterval=void 0,this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""}}allClearEvent(){this.clearPollingEvent(),window.removeBootpayEventListener(this.$messageEventName)}};const cr=new class extends or{constructor(){super(),this.$session=R,this.$applicationId=void 0,this.$tk=void 0,this.$platformType=1,this.$receiptId=void 0}setTokenKey(e){this.$tk=e}setReceiptId(e){this.$receiptId=e}clearInstance(){this.$applicationId=void 0,this.$receiptId=void 0}send(e){try{if(l(this.$applicationId))return e.application_id=this.$applicationId,e.status=l(e.status)?e.status:1,e.version=C,e.tk=this.$tk,B.debug("send event",`${JSON.stringify(e)} 전송됨`),this.$http.post(D.toAnalytics("event"),e)}catch(t){return}}sendError(e){e.status=-1,this.send(e)}setApplicationId(e){this.$applicationId=e}sendCloseEvent(){if(!l(this.$receiptId))return B.debug("receipt_id","undefined receipt_id"),Promise.resolve();try{return this.$http.put(D.toApi(`close/${this.$receiptId}`))}catch(e){return Promise.reject(e)}}},dr={startProgress:{PAYMENT:{ko:"결제를 시작합니다",en:"Start Payment..."},CARD_SUBSCRIPTION:{ko:"자동결제 정보를 불러오는 중입니다...",en:"Automatic payment will start..."},AUTH:{ko:"본인인증을 시작합니다",en:"Authentication will start..."}},popupLocaleMessage:{message:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment."},button:{ko:"결제계속하기",en:"Continue"}},popupMessage:{message:{PAYMENT:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment"},CARD_SUBSCRIPTION:{ko:'자동결제에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to automatic card payment, press the "Continue" button to proceed'},AUTH:{ko:'본인인증에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to authenticate yourself, press the "Continue" button to proceed'}},button:{PAYMENT:{ko:"결제계속하기",en:"Continue"},CARD_SUBSCRIPTION:{ko:"계속하기",en:"Continue"},AUTH:{ko:"계속하기",en:"Continue"}}},closeMessage:{PAYMENT:{ko:"결제창을 닫았습니다",en:"Payment window is closed"},CARD_SUBSCRIPTION:{ko:"자동 결제창을 닫았습니다",en:"Automatic Payment window is closed"},AUTH:{ko:"본인인증 창을 닫았습니다",en:"Authenticate window is closed"}},confirmNotYet:{PAYMENT:{ko:"결제 승인준비가 되지 않았습니다",en:"Payment approval not ready "},CARD_SUBSCRIPTION:{ko:"자동결제 승인준비가 되지 않았습니다",en:"Automatic Payment approval not ready"},AUTH:{ko:"본인인증 승인준비가 되지 않았습니다",en:"Authenticate approval not ready"}},notSelectPayment:{ko:"어떤 방법으로 결제할지 선택해주세요",en:"Please, do select payment."},termsNotAgree:{ko:"필수 약관을 모두 동의해주세요",en:"Please agree to all required terms and conditions"},notSelectOOPay:{ko:"간편결제로 결제하려면, 등록된 카드 혹은 계좌를 선택해주세요",en:"Please select a registered card or account to pay with Easy Payment"},widgetTypeNotPayment:{ko:"결제 위젯 요청이 아닙니다. 결제 위젯이 아닌 경우 requestSubscription 함수를 이용해주세요.",en:"This is not a payment widget. If it is not a payment widget, use the requestSubscription function."},widgetTypeNotSubscription:{ko:"정기결제 위젯 요청이 아닙니다. 정기결제 위젯이 아닌 경우 requestPayment 함수를 이용해주세요.",en:"This is not a subscription widget. If it is not a subscription widget, use the requestPayment function."},getLocaleMessage:(e,t)=>{const r=e.split(".").reduce(((e,t)=>e[t]),dr);return l(r)&&l(r[t])?r[t]:r.ko}};const lr=new class extends L{constructor(){super(),this.mode="PAYMENT",this.modeApiUrl={PAYMENT:"request/payment",CARD_SUBSCRIPTION:"request/subscribe",AUTH:"request/authentication"},this.$formId="bootpay-form",this.$iFrameId="bootpay-iframe-id",this.$windowId="bootpay-window-id",this.$paymentWindowId="bootpay-payment-window-id",this.$confirmFormId="bootpay-confirm-form-id",this.$confirmIFrame="bootpay-confirm-iframe-id",this.$popupWindow="bootpay-popup-window-id",this.$closeButton="bootpay-close-btn",this.$popupItemNameId="bootpay-item-name-id",this.$popupPriceId="bootpay-price-id",this.$popup=void 0,this.$popupWatcher=void 0,this.$popupUrl=void 0,this.$env=D,this.$template=this.template()}template(){return`\n<div id="${this.$windowId}" class="bootpay-payment-background">\n <div class="bootpay-payment-window ${D.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">\n <button class="bootpay-close-btn" id="${this.$closeButton}" style="display: none;" onclick="Bootpay.dismiss()"></button> \n <form id="${this.$formId}" method="POST">\n </form> \n <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>\n <div class="bootpay-popup-window" id="${this.$popupWindow}">\n <div class="header">\n <button class="bootpay-close-btn" onclick="Bootpay.dismiss(true)"></button>\n </div>\n <div class="body">\n <h5 id="${this.$popupItemNameId}"></h5>\n <p class="price" id="${this.$popupPriceId}"></p> \n <div class="agree-text">${this.message("popupMessage.message")}</div>\n </div>\n <div class="footer">\n <button class="bootpay-button" onclick="Bootpay.readyToPopup()">\n ${this.message("popupMessage.button")}\n </button> \n </div>\n </div>\n </div>\n <div class="bootpay-confirm-window">\n <form id="${this.$confirmFormId}" method="POST">\n <input type="hidden" name="_method" value="put" /> \n </form>\n <iframe id="${this.$confirmIFrame}" name="${this.$confirmIFrame}"></iframe>\n </div> \n</div>\n `}templateReload(){B.debug("template reload","template reload!"),this.$template=this.template()}start(e,t="PAYMENT"){return s(this,null,(function*(){return new Promise(((r,i)=>{this.mode=t,this.templateReload(),ar.clearPollingEvent(),ar.bind(r,i),ar.setDefaultPaymentData(e.application_id,e.tk),this.createTemplateHtml(),this.bodyOpen(),H.showProgress(this.message("startProgress"));const n=or.encryptParams(or.objectKeyToUnderscore(e)),o=this.byId(this.$formId);o.innerHTML=`\n <input type="hidden" name="payload" value="${n.payload}" />\n <input type="hidden" name="token" value="${n.token}" />\n `,o.action=this.$env.toApi(this.apiUrl()),this.$present(e.extra)&&e.extra.popup,o.target=this.$iFrameId,o.submit()}))}))}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),r=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),r.target=this.$confirmIFrame,r.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise(((e,t)=>{ar.bind(e,t);const r=this.byId(this.$confirmFormId);if(this.$blank(r.action))throw new U({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});r.submit()}))}startPaymentUrl(e,t="PAYMENT"){return s(this,null,(function*(){return new Promise(((r,i)=>{this.mode=t,this.templateReload(),ar.clearPollingEvent(),ar.bind(r,i),ar.setDefaultPaymentData(null,null),H.showProgress(this.message("startProgress")),this.createTemplateHtml(),this.bodyOpen();const n=this.byId(this.$formId);n.method="GET",n.action=e,n.target=this.$iFrameId,n.submit()}))}))}createPopupButton(e){H.hideProgress(),this.hidePaymentiFrame(),this.showPopupMessage(e),this.$present(e.gatewayUrl)&&(this.$popupUrl=`${e.gatewayUrl}?popup=1`,cr.setReceiptId(e.receiptId))}readyToPopup(e=void 0){this.hidePopupMessage(),this.closePopup();this.$popup=window.open(this.getPopupUrl(e),"BootPayPopupInstance","width=750,height=500,top=0,left=0,scrollbars=yes,directories=no, status=no, menubar=no, fullscreen=no"),this.$popupWatcher=setInterval((()=>s(this,null,(function*(){if(void 0===this.$popup||this.$popup.closed){try{clearInterval(this.$popupWatcher),yield cr.sendCloseEvent()}catch(e){B.debug("popup",F(e))}return this.$popupUrl=void 0,ar.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}}))),500),this.bindParentEventOnPopup()}closePopup(){if(void 0!==this.$popupWatcher)try{clearInterval(this.$popupWatcher),B.debug("close popup","clear popup interval")}catch(e){B.info("clear popup watcher",F(e))}if(void 0!==this.$popup&&!this.$popup.closed)try{this.$popup.close(),B.debug("close popup","close popup instance")}catch(e){B.info("popup destroy",F(e))}}getPopupUrl(e){return this.$present(e)?e:this.$present(this.$popupUrl)?this.$popupUrl:"about:blank"}bindParentEventOnPopup(){let e="beforeunload.BootpayReloadWatcher";D.isMobileSafari()&&(e="pagehide.BootpayReloadWatcher"),window.resetBootpayEventListener(e,(()=>{if(void 0!==this.$popup&&!this.$popup.closed)try{this.$popup.close()}catch(e){B.info("popup destroy",F(e))}}))}showPaymentiFrame(e=!1){const t=this.byId(this.$iFrameId),r=this.byId(this.$closeButton);void 0!==t&&t.style.setProperty("display","block"),void 0!==r&&e&&r.style.setProperty("display","inline-block")}showPopupMessage(e){const t=this.byId(this.$popupWindow),r=this.byId(this.$popupItemNameId),i=this.byId(this.$popupPriceId);void 0!==t&&t.style.setProperty("display","block"),void 0!==r&&(r.innerText=e.name),void 0!==i&&(parseFloat(e.price)>0?i.innerText=String(e.price).replace(/\B(?=(\d{3})+(?!\d))/g,","):i.remove())}hidePopupMessage(){this.byId(this.$popupWindow).style.setProperty("display","none")}destroy(e=!0){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),H.hideProgress(),this.closePopup(),ar.allClearEvent(),cr.clearInstance(),e&&setTimeout((()=>ar.callBootpayDOMEvent("close")),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(void 0!==t)for(let r in Object.keys(e)){let i=Object.keys(e)[r],n=e[i];this.$present(n)&&!String(n).match(/%/)&&(i.match(/width/)||i.match(/Width/)||i.match(/height/)||i.match(/Height/))&&(n=`${String(e[i]).replace(/px/gi,"")}px`),String(n).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)&&(this.byId(this.$paymentWindowId).className+=" w-100"),t.style.setProperty(i,n)}}iFrameSetStyle(e){B.debug("change style",e);const t=this.byId(this.$iFrameId);for(let i in Object.keys(e)){let n=Object.keys(e)[i];try{B.debug(n,e[n]),t.style.setProperty(n,e[n])}catch(r){B.warn("iframe style",null==r?void 0:r.message)}}}windowStyle(e){B.debug("change style",e);const t=this.byId(this.$paymentWindowId);for(let i in Object.keys(e)){let n=Object.keys(e)[i];try{B.debug(n,e[n]),t.style.setProperty(n,e[n])}catch(r){B.warn("iframe style",null==r?void 0:r.message)}}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);void 0!==e&&e.style.setProperty("display","none"),void 0!==t&&t.style.setProperty("display","none")}message(e){return dr.getLocaleMessage(`${e}.${this.mode}`,D.locale)}moveToUrl(e){const t=this.byId(this.$iFrameId);this.hidePaymentiFrame(),t.removeAttribute("style"),this.iFrameResize({width:D.isMobile()?"100%":400,height:D.isMobile()?"100%":700}),t.style.setProperty("display","block"),t.src=e}apiUrl(){return this.modeApiUrl[this.mode]}},ur=class e extends x{constructor(){super(),this.$session=R,this.$logger=B,this.$event=cr,this.platformType=a.PLATFORM.JS,this.$transactionKey="",this.extra={},this.browserBootpayFilter={instagram:/Instagram/i,kakaotalk:/KAKAOTALK/i,facebook:/FBAV/i,naver:/NAVER/i,mobile_safari:/(iPhone|iPad|iPod)/,mobile_chrome:[/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,/Chrome/]}}requestPayment(t){return s(this,null,(function*(){var r;void 0===(null==(r=t.extra)?void 0:r.locale)||D.isSetLocale||D.setLocale(t.extra.locale),this.$event.clearInstance(),this.generateTransactionKey(),t.application_id=D.currentApplicationId(t.application_id),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(t.application_id),this.$event.send({step:"start",msg:"결제 요청 시작",request:t}),t.sdk=!0,t.platform_type=this.platformType,t.ver=D.packageVersion,t.sdk_version=D.sdkVersion,t.sdk_type=D.sdkName,t.locale=D.locale,t.price=parseFloat(String(t.price)),t.tax_free=parseFloat(String(t.tax_free)),t.deposit_price=parseFloat(String(t.deposit_price)),e.invalidRequestParamsData(t),e.invalidRequestItemsData(t.items,t.price),t.uuid=this.$session.currentUserUUID(),t.sk=this.$session.currentSessionKey(),t.ti=this.$session.currentTimeTerm(),t.tk=this.$transactionKey,t.env=this.getUserDeviceEnvironment(),t.extra=this.openTypeFilter(t.extra),this.extra=t.extra;try{const e=yield lr.start(t);return B.debug("confirm ready",e),lr.hidePaymentiFrame(),lr.closePopup(),-1===["done","issued"].indexOf(e.event)&&this.$event.send({step:e.event,msg:"",request:t,response:e}),lr.setConfirmFormUrl(`${e.gateway_url}/confirm/${e.receipt_id}?application_id=${t.application_id}`),Promise.resolve(e)}catch(i){return this.eventError(i),Promise.reject(i)}}))}confirm(){return s(this,null,(function*(){try{const e=yield lr.confirm();return Promise.resolve(e)}catch(e){return this.eventError(e),Promise.reject(e)}}))}eventDone(e,t=!0){this.$logger.debug(e.event,e),this.$event.send({step:e.event,msg:"done"===e.event?"결제완료":"가상계좌발급완료",request:{},response:e}),H.hideProgress(),this.$logger.debug("show result",this.isDisplaySuccessResult()),this.isDisplaySuccessResult()&&t?this.displayResultView(e.data.receipt_id):lr.destroy()}eventError(e){H.hideProgress(),lr.closePopup(),this.isDisplayErrorResult()&&"error"===e.event?this.displayResultErrorView(e):lr.destroy(),this.$logger.debug("done failed destroy and hide","payment"),this.$event.sendError({step:this.$present(e.event)?e.event:"error",msg:e.message,trace:function(){try{return e.stack}catch(t){return!1}}()})}generateTransactionKey(){return this.$transactionKey=`${this.$uuid()}-${1e3*(new Date).getTime()}`,this.$transactionKey}requestSubscription(e){return s(this,null,(function*(){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"정기결제 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.application_id,subscription_id:e.subscription_id,pg:e.pg,method:e.method,order_name:e.order_name,price:e.price,tax_free:e.tax_free,user_token:e.user_token,metadata:e.metadata,redirect_url:e.redirect_url,widget:e.widget,widget_key:e.widget_key,widget_sandbox:e.widget_sandbox,platform_type:this.platformType,ver:D.packageVersion,sdk_version:D.sdkVersion,sdk_type:D.sdkName,locale:D.locale,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=yield lr.start(t,"CARD_SUBSCRIPTION");switch(B.debug("subscription success",r),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:r}),lr.hidePaymentiFrame(),lr.closePopup(),r.event){case"done":case"issued":break;case"confirm":lr.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(r)}catch(r){return this.eventError(r),Promise.reject(r)}}))}requestAuthentication(e){return s(this,null,(function*(){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"본인인증 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.application_id,authentication_id:e.authentication_id,pg:e.pg,method:this.$present(e.method)?e.method:"auth",order_name:e.order_name,platform_type:this.platformType,ver:C,sdk_version:D.sdkVersion,sdk_type:D.sdkName,locale:D.locale,metadata:e.metadata,redirect_url:e.redirect_url,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=yield lr.start(t,"AUTH");switch(B.debug("authentication success",r),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:r}),lr.hidePaymentiFrame(),lr.closePopup(),r.event){case"done":case"issued":break;case"confirm":lr.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(r)}catch(r){return this.eventError(r),Promise.reject(r)}}))}requestPaymentUrl(e){return s(this,null,(function*(){try{const t=yield lr.startPaymentUrl(e.url);return-1===["done","issued"].indexOf(t.event)&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),lr.setConfirmFormUrl(`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${e.application_id}`),Promise.resolve(t)}catch(t){return this.eventError(t),Promise.reject(t)}}))}getUserDeviceEnvironment(){return{width:window.innerWidth,height:window.innerHeight}}isDisplaySuccessResult(){return void 0!==this.extra&&void 0!==this.extra.display_success_result&&this.extra.display_success_result}isDisplayErrorResult(){return void 0!==this.extra&&void 0!==this.extra.display_error_result&&this.extra.display_error_result}displayResultView(e){lr.moveToUrl(D.toDoor(`result/${e}`))}displayResultErrorView(e){lr.moveToUrl(D.toDoor(`error?error_code=${e.error_code}&pg_error_code=${e.pg_error_code}&message=${e.message}`))}openTypeFilter(e){if(this.$present(e)&&void 0!==e.browser_open_type){const t=this.getUserAgent();for(let r in e.browser_open_type){const i=e.browser_open_type[r],n=this.$present(this.browserBootpayFilter[i.browser])?this.browserBootpayFilter[i.browser]:new RegExp(`${i.browser}`);if(t.match(n)){e.open_type=i.open_type;break}}}return e}static invalidRequestParamsData(t){if(d(t))throw new U({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(e.invalidRequestParams).forEach((r=>{const i=t[r];if(d(i))throw new U({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:e.invalidRequestParams[r]})}))}static invalidRequestItemsData(e,t){if(void 0!==e&&l(e)){let r=0;if(e.forEach(((t,i)=>{if(d(t.id))throw new U({event:"error",error_code:"NEED_ITEM_ID",message:`${i+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(d(t.name))throw new U({event:"error",error_code:"NEED_ITEM_NAME",message:`${i+1}번째 상품명을 입력해주세요. [ key: name ]`});if(d(t.qty))throw new U({event:"error",error_code:"NEED_ITEM_QTY",message:`${i+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(d(t.price))throw new U({event:"error",error_code:"NEED_ITEM_PRICE",message:`${i+1}번째 상품금액을 입력해주세요. [ key: price ]`});e[i].price=parseFloat(String(e[i].price)),e[i].qty=parseFloat(String(e[i].qty)),r+=e[i].price*e[i].qty})),r!==t)throw new U({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${r} ${typeof r} ]`})}}};ur.invalidRequestParams={application_id:"application_id를 입력해주세요. [ key: application_id ]",order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let pr=ur;const hr=new pr;const fr=new class extends or{constructor(){super(),this.$session=R}setAnalyticsData(e){this.$session.setTime(e.time),this.$session.setUUID(e.uuid)}send(e){return s(this,null,(function*(){const t=document.URL;if(void 0!==t&&-1===t.search(/bootapi.co.kr/)){const i=this.$session.getUser();e.application_id=D.currentApplicationId(e.application_id),e.sk=this.$session.currentSessionKey(),e.uuid=this.$session.currentUserUUID(),e.time=this.$session.currentTime(),e.url=t,e.referer=void 0!==document.referrer&&l(document.referrer)&&-1==document.referrer.search(new RegExp(window.location.hostname))?document.referrer:"",e.user_id=void 0===i||d(i)?void 0:i.id,e.items=this.generateItemKeyToVersion1(e.items);try{const t=yield this.$http.post(D.toAnalytics(`call?ver=${C}`),e);return 200===t.data.status?(B.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(B.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(t.data)}`),Promise.reject())}catch(r){return B.error("Analytics Common Error",`데이터 전송 실패: ${r.message}`),Promise.reject()}}}))}login(e){return s(this,null,(function*(){if(e.application_id=D.currentApplicationId(e.application_id),d(e.application_id))return B.error("Analytics Params","application_id 값을 입력해주세요.");if(d(e.id))return B.error("Analytics Params","id 값을 입력해주세요.");try{const t=yield this.$http.post(D.toAnalytics(`login?ver=${C}`),e),{user_id:r}=t.data.data;return this.$session.setUser({id:r,time:(new Date).getTime()}),Promise.resolve()}catch(t){return B.error("Analytics Login Error",`데이터 전송 실패: ${t.message}`),Promise.reject()}}))}logout(){this.$session.setUser(void 0)}generateItemKeyToVersion1(e){return void 0!==e?e.map((e=>({cat1:e.cat1,cat2:e.cat2,cat3:e.cat3,item_img:e.img,item_name:e.name,unique:e.id,price:e.price}))):void 0}};!function(){if("undefined"==typeof window||"function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}e.prototype=window.Event.prototype,window.CustomEvent=e}();const yr={$payment:hr,$analytics:fr,$environment:D,requestPayment(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{void 0!==e.extra&&!0===e.extra.override_global_event&&(B.debug("override global event","override global event!"),yr.overrideGlobalInstance());const r=yield this.$payment.requestPayment(e);setTimeout((()=>{t(r),["done","issued"].indexOf(r.event)>-1&&this.$payment.eventDone(r)}),100)}catch(i){setTimeout((()=>{r(this.errorHandler(i))}),100)}}))))}))},confirm(){return s(this,null,(function*(){return new Promise(((e,t)=>s(this,null,(function*(){try{const t=yield this.$payment.confirm();setTimeout((()=>{e(t),this.$payment.eventDone(t)}),100)}catch(r){setTimeout((()=>t(this.errorHandler(r))),100)}}))))}))},requestSubscription(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{const r=yield this.$payment.requestSubscription(e);t(r),this.$payment.eventDone(r)}catch(i){return r(this.errorHandler(i))}}))))}))},requestAuthentication(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{const r=yield this.$payment.requestAuthentication(e);t(r),this.$payment.eventDone(r)}catch(i){return r(this.errorHandler(i))}}))))}))},requestPaymentUrl(e){return s(this,null,(function*(){return new Promise(((t,r)=>s(this,null,(function*(){try{const r=yield this.$payment.requestPaymentUrl(e);setTimeout((()=>{t(r),["done","issued"].indexOf(r.event)>-1&&this.$payment.eventDone(r)}),100)}catch(i){setTimeout((()=>{r(this.errorHandler(i))}),100)}}))))}))},setEnvironmentMode(e,t=void 0){this.$environment.set(e),void 0!==t&&this.$environment.setDevelopmentHost(t)},setApplicationId(e){return this.$environment.setApplicationId(e)},setVersion(e,t,r){return this.$environment.setVersion(e,t,r)},setDevice(e){switch(e){case"IOS":this.$payment.platformType=a.PLATFORM.IOS;break;case"ANDROID":this.$payment.platformType=a.PLATFORM.ANDROID;break;default:this.$payment.platformType=a.PLATFORM.JS}return this.$payment.platformType},errorHandler(e){let t;if(H.hideProgress(),"BootpayEventError"===e.name)t=e.eventMessage;else{if(!l(e.event))throw e;t=e}return t},readyToPopup(){lr.readyToPopup()},setLogLevel(e){B.setLogLevel(e)},setUUID:e=>R.setUUID(e),send(e=void 0){return this.$analytics.send(void 0!==e?e:{})},login(e){return this.$analytics.login(e)},logout(){return this.$analytics.logout()},setLocale(e){D.setLocale(e),lr.templateReload()},dismiss(e=!1){return s(this,null,(function*(){if(e)try{yield cr.sendCloseEvent()}catch(t){B.debug("error",t.message)}ar.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}))},getCurrentUUID:()=>R.currentUserUUID(),destroy(){lr.destroy()},overrideGlobalInstance(){window.Bootpay=yr}};"undefined"!=typeof window&&(window.Bootpay=yr);class mr extends N{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,(e=>{const t=this.parseEvent(e.data);if(l(t))switch(B.debug("event",t),t.event){case"error":case"cancel":return this.reject({event:t.event,pg_error_code:t.pg_error_code,error_code:t.error_code,message:t.message,payload:t.payload});case"data":return this.resolve(t.data);case"confirmPasswordToken":return this.resolve(t.token);case"confirmAddCard":return this.resolve(t);case"resize":vr.iFrameResize(t.resizeData);break;default:return}}))}}const vr=new class extends L{constructor(){super(),this.$windowId="bootpay-user-token-background-id",this.$userWindowId="bootpay-user-token-window-id",this.$iFrameId="bootpay-user-token-iframe-id",this.$bootpaySdkFormId="bootpay-user-token-sdk-form",this.$template=this.template(),this.$event=new mr,this.$session=R,this.deviceType=a.PLATFORM.JS}setDevice(e){return this.deviceType=e,this.deviceType}template(){return`\n <div id="${this.$windowId}" class="bootpay-payment-background">\n <div class="bootpay-payment-window" id="${this.$userWindowId}">\n <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>\n <form name="${this.$bootpaySdkFormId}" id="${this.$bootpaySdkFormId}" method="GET"> \n </form>\n </div>\n </div>\n `}setParams(e,t){if(void 0!==t){const r=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const e=or.encryptParams(or.objectKeyToUnderscore(t));r.innerHTML=`\n <input type="hidden" name="payload" value="${e.payload}" />\n <input type="hidden" name="token" value="${e.token}" /> \n `}else{let i="";"DELETE"===e.toUpperCase()&&(i+='<input type="hidden" name="_method" value="patch"/>'),Object.keys(t).forEach((e=>{i+=`<input type="hidden" name="${e}" value="${t[e]}"/>`})),r.innerHTML=i}}}request(e,t){return new Promise(((r,i)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(r,i),this.goiFrameUrl("GET",D.toDoor(`sdk/password/${t}`),{type:e,uuid:this.$session.currentUserUUID()})}))}addCard(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("GET",D.toDoor(`sdk/card/${e}`),{uuid:this.$session.currentUserUUID()})}))}wallets(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("GET",D.toApi("sdk/easy/wallet"),{user_token:e,sdk:!0,uuid:this.$session.currentUserUUID()})}))}destroyWallet(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/wallet"),{method:"DELETE",sdk:!0,user_token:e.user_token,wallet_id:e.wallet_id,token:e.token,uuid:this.$session.currentUserUUID()})}))}createBiometricAuthenticate(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/biometric"),{user_token:e.userToken,sdk:!0,uuid:this.$session.currentUserUUID(),os:e.os,token:e.token})}))}destroyBiometricAuthenticate(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/biometric"),{method:"DELETE",uuid:this.$session.currentUserUUID(),user_token:e.userToken,token:e.token})}))}requestWalletPayment(e){return new Promise(((t,r)=>{this.createTemplateHtml(),this.bodyOpen(),this.$event.bind(t,r),this.goiFrameUrl("POST",D.toApi("sdk/easy/card"),this.regenerateRequestPayment(e))}))}goiFrameUrl(e,t,r=void 0){this.setParams(e,r);const i=this.byId(this.$bootpaySdkFormId);i.method=this.toMethod(e),i.action=t,i.target=this.$iFrameId,i.submit(),this.show()}toMethod(e){switch(e.toUpperCase()){case"PUT":case"DELETE":return"POST";default:return e}}iFrameResize(e){const t=this.byId(this.$iFrameId);if(void 0!==t)for(let r in Object.keys(e)){let i=Object.keys(e)[r],n=e[i];this.$present(n)&&!String(n).match(/%/)&&(i.match(/width/)||i.match(/Width/)||i.match(/height/)||i.match(/Height/))&&(n=`${String(e[i]).replace(/px/gi,"")}px`),String(n).match(/%/)&&!this.byId(this.$userWindowId).className.match(/w-100/)&&(this.byId(this.$userWindowId).className+=" w-100"),t.style.setProperty(i,n)}}regenerateRequestPayment(e){return e.ver=C,e.platform_type=this.deviceType,e.sdk=!0,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),pr.invalidRequestParamsData(e),pr.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=`${this.$uuid()}-${1e3*(new Date).getTime()}`,e}show(){const e=this.byId(this.$iFrameId);void 0!==e&&e.style.setProperty("display","block")}destroy(){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),ar.clearPollingEvent(),setTimeout((()=>ar.callBootpayDOMEvent("close")),300)}},gr={$templateUserToken:vr,requestPasswordToken(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.request("passwordToken",e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},requestChangePassword(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.request("changePasswordToken",e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},requestAddCard(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.addCard(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},wallets(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.wallets(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},destroyWallet(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.destroyWallet(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},createBiometricAuthenticate(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.createBiometricAuthenticate(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},destroyBiometricAuthenticate(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.destroyBiometricAuthenticate(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},requestWalletPayment(e){return s(this,null,(function*(){try{const t=yield this.$templateUserToken.requestWalletPayment(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}}))},setEnvironmentMode(e,t=void 0){D.set(e),void 0!==t&&D.setDevelopmentHost(t)},setDevice(e){let t=a.PLATFORM.JS;switch(e.toUpperCase()){case"IOS":t=a.PLATFORM.IOS;break;case"ANDROID":t=a.PLATFORM.ANDROID}return this.$templateUserToken.setDevice(t)},errorHandler(e){let t;if(H.hideProgress(),"BootpayEventError"===e.name)t=e.eventMessage;else{if(!l(e.event))throw e;t=e}return t},setLogLevel(e){B.setLogLevel(e)},setUUID:e=>R.setUUID(e),dismiss(){ar.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}};"undefined"!=typeof window&&(window.BootpaySDK=gr);var _r,wr={exports:{}},br={exports:{}};function $r(){return _r||(_r=1,function(e,t){var r,i,n,o,s,a,c;e.exports=(c=w(),n=(i=c).lib,o=n.Base,s=n.WordArray,(a=i.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=r?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],i=0;i<t;i++){var n=e[i];r.push(n.high),r.push(n.low)}return s.create(r,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),r=t.length,i=0;i<r;i++)t[i]=t[i].clone();return e}}),c)}(br)),br.exports}var kr,Er={exports:{}};function Sr(){return kr||(kr=1,function(e,t){var r;e.exports=(r=w(),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init,i=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,i=[],n=0;n<r;n++)i[n>>>2]|=e[n]<<24-n%4*8;t.call(this,i,r)}else t.apply(this,arguments)};i.prototype=e}}(),r.lib.WordArray)}(Er)),Er.exports}var xr,Pr={exports:{}};function Ir(){return xr||(xr=1,function(e,t){var r;e.exports=(r=w(),function(){var e=r,t=e.lib.WordArray,i=e.enc;function n(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n+=2){var o=t[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var r=e.length,i=[],n=0;n<r;n++)i[n>>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},i.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],o=0;o<r;o+=2){var s=n(t[o>>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(s))}return i.join("")},parse:function(e){for(var r=e.length,i=[],o=0;o<r;o++)i[o>>>1]|=n(e.charCodeAt(o)<<16-o%2*16);return t.create(i,2*r)}}}(),r.enc.Utf16)}(Pr)),Pr.exports}var Tr,Ar={exports:{}};function Br(){return Tr||(Tr=1,function(e,t){var r;e.exports=(r=w(),function(){var e=r,t=e.lib.WordArray;function i(e,r,i){for(var n=[],o=0,s=0;s<r;s++)if(s%4){var a=i[e.charCodeAt(s-1)]<<s%4*2|i[e.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return t.create(n,o)}e.enc.Base64url={stringify:function(e,t=!0){var r=e.words,i=e.sigBytes,n=t?this._safe_map:this._map;e.clamp();for(var o=[],s=0;s<i;s+=3)for(var a=(r[s>>>2]>>>24-s%4*8&255)<<16|(r[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|r[s+2>>>2]>>>24-(s+2)%4*8&255,c=0;c<4&&s+.75*c<i;c++)o.push(n.charAt(a>>>6*(3-c)&63));var d=n.charAt(64);if(d)for(;o.length%4;)o.push(d);return o.join("")},parse:function(e,t=!0){var r=e.length,n=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s<n.length;s++)o[n.charCodeAt(s)]=s}var a=n.charAt(64);if(a){var c=e.indexOf(a);-1!==c&&(r=c)}return i(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)}(Ar)),Ar.exports}var Or,Rr={exports:{}};function Cr(){return Or||(Or=1,function(e,t){var r;e.exports=(r=w(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.algo,a=[],c=[];!function(){function t(t){for(var r=e.sqrt(t),i=2;i<=r;i++)if(!(t%i))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(a[n]=r(e.pow(i,.5))),c[n]=r(e.pow(i,1/3)),n++),i++}();var d=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],u=r[6],p=r[7],h=0;h<64;h++){if(h<16)d[h]=0|e[t+h];else{var f=d[h-15],y=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,m=d[h-2],v=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;d[h]=y+d[h-7]+v+d[h-16]}var g=i&n^i&o^n&o,_=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&u)+c[h]+d[h];p=u,u=l,l=a,a=s+w|0,s=o,o=n,n=i,i=w+(_+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+l|0,r[6]=r[6]+u|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)}(Rr)),Rr.exports}var Dr,Ur={exports:{}};var Mr,Nr={exports:{}};function Fr(){return Mr||(Mr=1,function(e,t){var r;e.exports=(r=w(),$r(),function(){var e=r,t=e.lib.Hasher,i=e.x64,n=i.Word,o=i.WordArray,s=e.algo;function a(){return n.create.apply(n,arguments)}var c=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],d=[];!function(){for(var e=0;e<80;e++)d[e]=a()}();var l=s.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],u=r[6],p=r[7],h=i.high,f=i.low,y=n.high,m=n.low,v=o.high,g=o.low,_=s.high,w=s.low,b=a.high,$=a.low,k=l.high,E=l.low,S=u.high,x=u.low,P=p.high,I=p.low,T=h,A=f,B=y,O=m,R=v,C=g,D=_,U=w,M=b,N=$,F=k,L=E,H=S,j=x,W=P,z=I,q=0;q<80;q++){var K,J,G=d[q];if(q<16)J=G.high=0|e[t+2*q],K=G.low=0|e[t+2*q+1];else{var V=d[q-15],Y=V.high,X=V.low,Z=(Y>>>1|X<<31)^(Y>>>8|X<<24)^Y>>>7,Q=(X>>>1|Y<<31)^(X>>>8|Y<<24)^(X>>>7|Y<<25),ee=d[q-2],te=ee.high,re=ee.low,ie=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ne=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=d[q-7],se=oe.high,ae=oe.low,ce=d[q-16],de=ce.high,le=ce.low;J=(J=(J=Z+se+((K=Q+ae)>>>0<Q>>>0?1:0))+ie+((K+=ne)>>>0<ne>>>0?1:0))+de+((K+=le)>>>0<le>>>0?1:0),G.high=J,G.low=K}var ue,pe=M&F^~M&H,he=N&L^~N&j,fe=T&B^T&R^B&R,ye=A&O^A&C^O&C,me=(T>>>28|A<<4)^(T<<30|A>>>2)^(T<<25|A>>>7),ve=(A>>>28|T<<4)^(A<<30|T>>>2)^(A<<25|T>>>7),ge=(M>>>14|N<<18)^(M>>>18|N<<14)^(M<<23|N>>>9),_e=(N>>>14|M<<18)^(N>>>18|M<<14)^(N<<23|M>>>9),we=c[q],be=we.high,$e=we.low,ke=W+ge+((ue=z+_e)>>>0<z>>>0?1:0),Ee=ve+ye;W=H,z=j,H=F,j=L,F=M,L=N,M=D+(ke=(ke=(ke=ke+pe+((ue+=he)>>>0<he>>>0?1:0))+be+((ue+=$e)>>>0<$e>>>0?1:0))+J+((ue+=K)>>>0<K>>>0?1:0))+((N=U+ue|0)>>>0<U>>>0?1:0)|0,D=R,U=C,R=B,C=O,B=T,O=A,T=ke+(me+fe+(Ee>>>0<ve>>>0?1:0))+((A=ue+Ee|0)>>>0<ue>>>0?1:0)|0}f=i.low=f+A,i.high=h+T+(f>>>0<A>>>0?1:0),m=n.low=m+O,n.high=y+B+(m>>>0<O>>>0?1:0),g=o.low=g+C,o.high=v+R+(g>>>0<C>>>0?1:0),w=s.low=w+U,s.high=_+D+(w>>>0<U>>>0?1:0),$=a.low=$+N,a.high=b+M+($>>>0<N>>>0?1:0),E=l.low=E+L,l.high=k+F+(E>>>0<L>>>0?1:0),x=u.low=x+j,u.high=S+H+(x>>>0<j>>>0?1:0),I=p.low=I+z,p.high=P+W+(I>>>0<z>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(i+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),r.SHA512)}(Nr)),Nr.exports}var Lr,Hr={exports:{}};var jr,Wr={exports:{}};function zr(){return jr||(jr=1,function(e,t){var r;e.exports=(r=w(),$r(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.x64.Word,a=t.algo,c=[],d=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var i=(2*e+3*t)%5;e=t%5,t=i}for(e=0;e<5;e++)for(t=0;t<5;t++)d[e+5*t]=t+(2*e+3*t)%5*5;for(var n=1,o=0;o<24;o++){for(var a=0,u=0,p=0;p<7;p++){if(1&n){var h=(1<<p)-1;h<32?u^=1<<h:a^=1<<h-32}128&n?n=n<<1^113:n<<=1}l[o]=s.create(a,u)}}();var u=[];!function(){for(var e=0;e<25;e++)u[e]=s.create()}();var p=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,i=this.blockSize/2,n=0;n<i;n++){var o=e[t+2*n],s=e[t+2*n+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(I=r[n]).high^=s,I.low^=o}for(var a=0;a<24;a++){for(var p=0;p<5;p++){for(var h=0,f=0,y=0;y<5;y++)h^=(I=r[p+5*y]).high,f^=I.low;var m=u[p];m.high=h,m.low=f}for(p=0;p<5;p++){var v=u[(p+4)%5],g=u[(p+1)%5],_=g.high,w=g.low;for(h=v.high^(_<<1|w>>>31),f=v.low^(w<<1|_>>>31),y=0;y<5;y++)(I=r[p+5*y]).high^=h,I.low^=f}for(var b=1;b<25;b++){var $=(I=r[b]).high,k=I.low,E=c[b];E<32?(h=$<<E|k>>>32-E,f=k<<E|$>>>32-E):(h=k<<E-32|$>>>64-E,f=$<<E-32|k>>>64-E);var S=u[d[b]];S.high=h,S.low=f}var x=u[0],P=r[0];for(x.high=P.high,x.low=P.low,p=0;p<5;p++)for(y=0;y<5;y++){var I=r[b=p+5*y],T=u[b],A=u[(p+1)%5+5*y],B=u[(p+2)%5+5*y];I.high=T.high^~A.high&B.high,I.low=T.low^~A.low&B.low}I=r[0];var O=l[a];I.high^=O.high,I.low^=O.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var i=8*t.sigBytes,o=32*this.blockSize;r[i>>>5]|=1<<24-i%32,r[(e.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,d=[],l=0;l<c;l++){var u=s[l],p=u.high,h=u.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),d.push(h),d.push(p)}return new n.init(d,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)}(Math),r.SHA3)}(Wr)),Wr.exports}var qr,Kr={exports:{}};var Jr,Gr={exports:{}};var Vr,Yr={exports:{}};var Xr,Zr={exports:{}};var Qr,ei={exports:{}};function ti(){return Qr||(Qr=1,function(e,t){var r;e.exports=(r=w(),rr(),
|
|
3
3
|
/** @preserve
|
|
4
4
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
5
5
|
* derived from CryptoJS.mode.CTR
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtraModel, RequestPaymentModel } from './bootpay-interface';
|
|
2
|
-
export interface RequestBootpayWidgetModel extends RequestPaymentModel {
|
|
2
|
+
export interface RequestBootpayWidgetModel extends Partial<RequestPaymentModel> {
|
|
3
3
|
subscription_id?: string;
|
|
4
4
|
use_only_oopay?: boolean;
|
|
5
5
|
use_terms?: boolean;
|