@bootpay/client-js 5.2.0-beta.20 → 5.2.0-beta.21

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/dist/index.mjs CHANGED
@@ -859,7 +859,7 @@ class js extends zs {
859
859
  }
860
860
  }
861
861
  }
862
- const Se = new js(), Ks = "@bootpay/client-js", Gs = "5.2.0-beta.20", Xs = "dist/index.mjs", Vs = {
862
+ const Se = new js(), Ks = "@bootpay/client-js", Gs = "5.2.0-beta.21", Xs = "dist/index.mjs", Vs = {
863
863
  ".": {
864
864
  import: "./dist/index.mjs",
865
865
  types: "./dist/index.d.ts"
@@ -8081,7 +8081,7 @@ class bs extends gs {
8081
8081
  * @date: 2024-08-19
8082
8082
  */
8083
8083
  getExtra(e = void 0) {
8084
- return Et(e ?? {}, Et(this.widgetExtra ?? {}, this.data.extra ?? {}));
8084
+ return Et(e ?? {}, Et(this.data.extra ?? {}, this.widgetExtra ?? {}));
8085
8085
  }
8086
8086
  getRequestPaymentData(e = void 0) {
8087
8087
  return this.data.widget_sandbox = this.data.sandbox, this.data.extra = this.getExtra(e.extra), Et(e, this.data);
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;left:0;right:0;top:0;bottom: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;left:0;right:0;bottom:0;top:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-inherit .fade-in,body.bootpay-open .fade-in{animation:__bootpay-fade-in .1s linear}body.bootpay-inherit .fade-out,body.bootpay-open .fade-out{animation:__bootpay-fade-out .1s linear}body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up .3s cubic-bezier(.25,.46,.45,.94) forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up-mobile .1s cubic-bezier(.25,.46,.45,.94) forwards!important}}body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down .1s ease-in forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down-mobile .1s ease-in forwards!important}}body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:#000000b3}}body.bootpay-inherit .bootpay-transparent-background,body.bootpay-open .bootpay-transparent-background{position:relative;height:100%;z-index:9999}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{position:relative;display:block;width:500px;height:auto}@media (max-width: 768px){body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{width:100%}}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe{width:100%!important;border-radius:0}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}body.bootpay-inherit .bootpay-payment-background,body.bootpay-open .bootpay-payment-background{position:fixed;left:0;right:0;top:0;bottom:0;display:block;text-align:center;background-color:#000000b3;z-index:9999}body.bootpay-inherit .bootpay-payment-background:before,body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert,body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-inherit .bootpay-payment-background.__alert:before,body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{max-width:500px;position:absolute;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-inherit .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden,body.bootpay-open .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden{display:none}@media (max-width: 600px){body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{left:0;right:0;bottom:0;width:100%;max-width:inherit;top:auto;border-bottom-left-radius:0;border-bottom-right-radius:0;transform:translateY(0) translate(0)}}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,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}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header{padding:1.5rem 1rem;text-align:left;font-size:20px;font-weight:600;position:relative}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header.__text-center,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header.__text-center,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center{text-align:center}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn{top:40%;transform:translateY(-50%);padding:0;right:1rem}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn{right:8px;top:50%;transform:translateY(-55%)}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:after,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,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:after{background-color:#333;width:1px}}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body{padding:1.5rem 1rem;text-align:center;font-size:16px;color:#333;line-height:1.5}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body.slider-body,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body{padding:.5rem 2rem 1.5rem}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button{display:inline-block;width:100%;padding:1rem;color:#888;font-size:16px;border-radius:16px;outline:none;border:none;cursor:pointer;margin-top:1rem}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child{margin-top:0}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active{background-color:#507cf3;color:#fff;font-weight:600}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer{display:flex;justify-content:flex-end;border-top:1px solid #f2f2f2}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-open .bootpay-payment-background.__alert .slider-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-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right{border-right:1px solid #f2f2f2}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#e0e0e0}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{color:#507cf3;font-weight:600}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{color:#3f6be2}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;left:0;right:0;top:0;bottom:0;height:100%}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,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-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,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-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:#000;padding:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,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-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,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-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border-radius:0}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header,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-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;left:0;right:0;top:50px;bottom:72px;padding:1rem;text-align:left;font-size:14px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id,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-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id,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;line-height:normal}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text,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-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer,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-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button,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-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active,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-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,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-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,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-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,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-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-confirm-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.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:translate(-50%,150%);opacity:1}to{transform:translate(-50%,-50%);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translate(-50%,-50%);opacity:1}to{transform:translate(-50%,150%);opacity:1}}@keyframes __bootpay-slide-up-mobile{0%{transform:translateY(100%);opacity:1}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down-mobile{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:1}}@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}}.__bootpay-store-el-fullscreen{position:absolute;left:0;right:0;top:0;bottom:0;height:100%}.bootpay-store-iframe-container{width:100%;height:100%}.bootpay-store-iframe-container>iframe{width:100%;border:0;outline:none;overflow:scroll}.bootpay-store-iframe-container>.bootpay-store-overlay{position:fixed;left:0;right:0;top:0;bottom:0;background-color:#000000b3;z-index:100000;text-align:center;display:none}.bootpay-store-iframe-container>.bootpay-store-overlay.fade-in{animation:fadeIn .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay.fade-out{animation:fadeOut .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay:before{display:inline-block;vertical-align:middle;height:100%;content:" "}@media (max-width: 600px){.bootpay-store-iframe-container>.bootpay-store-overlay:before{display:block;height:inherit;vertical-align:inherit}}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-overlay-iframe-container{display:inline-block;vertical-align:middle}@media (max-width: 600px){.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-overlay-iframe-container{width:100%!important;height:100%!important}}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container{display:inline-block;background-color:#fff;vertical-align:middle;max-width:450px;width:100%;text-align:left;border-radius:12px;overflow:hidden}@media (max-width: 768px){.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container{margin:1rem}}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container.zoom-in{animation:zoomIn .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container.zoom-out{animation:zoomOut .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header{position:relative;padding:1rem 1.5rem;font-size:18px}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn{position:absolute;box-shadow:none;background-color:transparent;outline:0;z-index:10001;right:1rem;top:50%;transform:translateY(-50%);height:21px;width:21px;border:0!important;outline:none!important}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn.active,.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:before,.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:after{position:absolute;left:8px;top:0;content:" ";height:24px;width:1px;background-color:#888}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:after{transform:rotate(-45deg)}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-body{padding:1rem 1.5rem 2rem}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer>.bootpay-store-alert-button-grid{display:flex;width:100%}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer>.bootpay-store-alert-button-grid>.bootpay-store-cols{flex:0 50%}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn{display:block;box-shadow:none;background-color:transparent;border:0!important;outline:none!important;width:100%;padding:1rem 0}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-cancel-button{background-color:#f1f1f1;color:#333;font-size:18px;font-weight:500}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-cancel-button:hover{opacity:.8}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-confirm-button{background-color:#507cf3;color:#fff;font-size:18px;font-weight:500}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-confirm-button:hover{opacity:.8}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes zoomIn{0%{transform:scale(.9)}to{transform:scale(1)}}@keyframes zoomOut{0%{transform:scale(1)}to{transform:scale(.9)}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- (function(he,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(he=typeof globalThis<"u"?globalThis:he||self,Z(he.Bootpay={}))})(this,function(he){"use strict";const Z={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(r){return`__bootpay_track_${r}__`}},O0=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)}),se=r=>{let e=!1;return typeof r=="string"||Array.isArray(r)?e=r.length===0:e=r==null||Ke(r,"object")&&r.constructor===Object&&Object.keys(r).length===0,e},N=r=>!se(r),Ke=(r,e)=>typeof r===e,Ds=(r,e=void 0)=>{if(N(e)){const t=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(r)?`${r}&${t}`:`${r}?${t}`}else return r},mt=(r,e)=>{for(let t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r};var L=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Re(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function $s(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var U0={exports:{}};function ks(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Et={exports:{}};const Ss=$s(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var H0;function q(){return H0||(H0=1,function(r,e){(function(t,s){r.exports=s()})(L,function(){var t=t||function(s,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof L<"u"&&L.crypto&&(o=L.crypto),!o&&typeof ks=="function")try{o=Ss}catch{}var y=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function x(){}return function(l){var v;return x.prototype=l,v=new x,x.prototype=null,v}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(x){var l=d(this);return x&&l.mixIn(x),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var l in x)x.hasOwnProperty(l)&&(this[l]=x[l]);x.hasOwnProperty("toString")&&(this.toString=x.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=a.WordArray=c.extend({init:function(x,l){x=this.words=x||[],l!=i?this.sigBytes=l:this.sigBytes=x.length*4},toString:function(x){return(x||u).stringify(this)},concat:function(x){var l=this.words,v=x.words,E=this.sigBytes,_=x.sigBytes;if(this.clamp(),E%4)for(var A=0;A<_;A++){var w=v[A>>>2]>>>24-A%4*8&255;l[E+A>>>2]|=w<<24-(E+A)%4*8}else for(var I=0;I<_;I+=4)l[E+I>>>2]=v[I>>>2];return this.sigBytes+=_,this},clamp:function(){var x=this.words,l=this.sigBytes;x[l>>>2]&=4294967295<<32-l%4*8,x.length=s.ceil(l/4)},clone:function(){var x=c.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var l=[],v=0;v<x;v+=4)l.push(y());return new g.init(l,x)}}),n=p.enc={},u=n.Hex={stringify:function(x){for(var l=x.words,v=x.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push((A>>>4).toString(16)),E.push((A&15).toString(16))}return E.join("")},parse:function(x){for(var l=x.length,v=[],E=0;E<l;E+=2)v[E>>>3]|=parseInt(x.substr(E,2),16)<<24-E%8*4;return new g.init(v,l/2)}},h=n.Latin1={stringify:function(x){for(var l=x.words,v=x.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(x){for(var l=x.length,v=[],E=0;E<l;E++)v[E>>>2]|=(x.charCodeAt(E)&255)<<24-E%4*8;return new g.init(v,l)}},m=n.Utf8={stringify:function(x){try{return decodeURIComponent(escape(h.stringify(x)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(x){return h.parse(unescape(encodeURIComponent(x)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(x){typeof x=="string"&&(x=m.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes},_process:function(x){var l,v=this._data,E=v.words,_=v.sigBytes,A=this.blockSize,w=A*4,I=_/w;x?I=s.ceil(I):I=s.max((I|0)-this._minBufferSize,0);var b=I*A,C=s.min(b*4,_);if(b){for(var F=0;F<b;F+=A)this._doProcessBlock(E,F);l=E.splice(0,b),v.sigBytes-=C}return new g.init(l,C)},clone:function(){var x=c.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});a.Hasher=f.extend({cfg:c.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(x){return this._append(x),this._process(),this},finalize:function(x){x&&this._append(x);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(x){return function(l,v){return new x.init(v).finalize(l)}},_createHmacHelper:function(x){return function(l,v){return new B.HMAC.init(x,v).finalize(l)}}});var B=p.algo={};return p}(Math);return t})}(Et)),Et.exports}(function(r,e){(function(t,s){r.exports=s(q())})(L,function(t){return t.enc.Utf8})})(U0);var Ps=U0.exports;const L0=Re(Ps);var N0={exports:{}};(function(r,e){(function(t,s){r.exports=s(q())})(L,function(t){return function(){var s=t,i=s.lib,o=i.WordArray,y=s.enc;y.Base64={stringify:function(p){var a=p.words,c=p.sigBytes,g=this._map;p.clamp();for(var n=[],u=0;u<c;u+=3)for(var h=a[u>>>2]>>>24-u%4*8&255,m=a[u+1>>>2]>>>24-(u+1)%4*8&255,f=a[u+2>>>2]>>>24-(u+2)%4*8&255,B=h<<16|m<<8|f,x=0;x<4&&u+x*.75<c;x++)n.push(g.charAt(B>>>6*(3-x)&63));var l=g.charAt(64);if(l)for(;n.length%4;)n.push(l);return n.join("")},parse:function(p){var a=p.length,c=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var n=0;n<c.length;n++)g[c.charCodeAt(n)]=n}var u=c.charAt(64);if(u){var h=p.indexOf(u);h!==-1&&(a=h)}return d(p,a,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(p,a,c){for(var g=[],n=0,u=0;u<a;u++)if(u%4){var h=c[p.charCodeAt(u-1)]<<u%4*2,m=c[p.charCodeAt(u)]>>>6-u%4*2,f=h|m;g[n>>>2]|=f<<24-n%4*8,n++}return o.create(g,n)}}(),t.enc.Base64})})(N0);var _e=N0.exports;const Oe=Re(_e);class Ue{$blank(e){return se(e)}$present(e){return!this.$blank(e)}$type(e,t){return Ke(e,t)}$uuid(){return O0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Oe.stringify(L0.parse(e))}$decrypt(e){return L0.stringify(Oe.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Ge={debug:1,info:2,warning:3,error:4},U={level:Ge.warning,setLogLevel(r){this.level=r},messageStringify(r,e){try{return e=`${r}: ${Ke(e,"object")?JSON.stringify(e):e}`}catch(t){console.error(`log parse error: ${t}`)}},debug(r,e){this.level<=Ge.debug&&console.log(this.messageStringify(r,e))},info(r,e){this.level<=Ge.info&&console.info(this.messageStringify(r,e))},warn(r,e){this.level<=Ge.warning&&console.warn(this.messageStringify(r,e))},error(r,e){this.level<=Ge.error&&console.error(this.messageStringify(r,e))}};class Is extends Ue{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch{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{this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=Z.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=Z.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{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class Ts extends Is{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),t=Z.STORAGE_PREFIX("session"),s=this.getToJSON(t);return this.$blank(s)||s.time+1800<e?this.setToJSON(t,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid:s.uuid}currentTimeTerm(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=Z.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),s=Z.STORAGE_PREFIX("session"),i=this.getToJSON(s),o=this.$blank(i)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:i;o.time=e,this.setToJSON(s,o)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(Z.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(Z.STORAGE_PREFIX("user")))}catch(e){U.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const ke=new Ts,Ce={name:"@bootpay/client-js",version:"5.2.0-beta.20",main:"dist/index.mjs",exports:{".":{import:"./dist/index.mjs",types:"./dist/index.d.ts"}},styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/plugin-proposal-export-default-from":"^7.27.1","@babel/plugin-transform-class-properties":"^7.27.1","@babel/plugin-proposal-decorators":"^7.28.0","@babel/plugin-transform-private-methods":"^7.27.1","@babel/plugin-transform-typescript":"^7.28.0","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"3.3.1"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},R={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:Ce.version,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(r){this.mode=r},setApplicationId(r){return this.applicationId=r,this.currentApplicationId(void 0)},setLocale(r){this.locale=r,this.isSetLocale=!0},currentApplicationId(r=void 0){return r===void 0?this.applicationId:r},setDevelopmentHost(r){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,r)},setVersion(r,e,t=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=r,this.packageVersion=t===void 0||t===""?Ce.version:t},toApi(r){return[this.API_URL[this.mode],r].join("/")},toDoor(r){return[this.DOOR_URL[this.mode],r].join("/")},toWidget(r){return[this.WIDGET_URL[this.mode],r].join("/")},isMobile(){if(typeof window>"u")return!1;const r=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(r)},isMobileSafari(){if(typeof window>"u")return!1;const r=window.navigator.userAgent;return(r.match(/iPad/i)||r.match(/iPhone/i))&&!r.match(/CriOS/i)},toAnalytics(r){return[this.ANALYTICS_URL[this.mode],r].join("/")}};class le extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const Se={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),this.isBind=!0)},on(r,e,t=void 0){return se(Se.__BOOTPAY_NAMESPACE)&&(Se.__BOOTPAY_NAMESPACE={}),this.addEventListener(r.split(".")[0],e,t||!1),Se.__BOOTPAY_NAMESPACE[r]=e,this},off(r){return N(Se.__BOOTPAY_NAMESPACE)&&N(Se.__BOOTPAY_NAMESPACE[r])&&this.removeEventListener(r.split(".")[0],Se.__BOOTPAY_NAMESPACE[r]),this}};class Xe extends Ue{constructor(e){super(),this.$resolve=null,this.$reject=null,this.$messageEventName=(e==null?void 0:e.messageEventName)??"message.BootpayEvent",this.$eventHooks=(e==null?void 0:e.messageEventHooks)??{},this.afterBind=e==null?void 0:e.afterBind,this.$childInstance=null,Se.initialize()}setChildInstance(e){this.$childInstance=e}bind(e,t){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(U.debug("event received",JSON.stringify(i)),N(i)&&N(i.event)){const o=this.hookFunction(i.hook);if(N(o)&&N(o[i.event]))return o[i.event](i.data,this);U.debug("event",`${this.$messageEventName}: ${i.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,t)}hookFunction(e){return this.$eventHooks[e]}reject(e){N(this.$reject)&&this.$reject(e)}resolve(e){N(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(s){U.info("json parsing failed",`data: ${e}, message: ${Ve(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Ve=r=>typeof r=="string"?r.toUpperCase():r instanceof Error?r.message:r;class ge extends Ue{constructor(e={}){super();const{iframeId:t="bootpay-iframe",template:s=this.defaultIframeHtml(),el:i=void 0}=e;this.el=i,this.$windowId=t,this.$template=s}defaultIframeHtml(){return`
2
+ (function(he,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(he=typeof globalThis<"u"?globalThis:he||self,Z(he.Bootpay={}))})(this,function(he){"use strict";const Z={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(r){return`__bootpay_track_${r}__`}},O0=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)}),se=r=>{let e=!1;return typeof r=="string"||Array.isArray(r)?e=r.length===0:e=r==null||Ke(r,"object")&&r.constructor===Object&&Object.keys(r).length===0,e},N=r=>!se(r),Ke=(r,e)=>typeof r===e,Ds=(r,e=void 0)=>{if(N(e)){const t=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(r)?`${r}&${t}`:`${r}?${t}`}else return r},mt=(r,e)=>{for(let t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r};var L=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Re(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function $s(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var U0={exports:{}};function ks(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Et={exports:{}};const Ss=$s(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var H0;function q(){return H0||(H0=1,function(r,e){(function(t,s){r.exports=s()})(L,function(){var t=t||function(s,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof L<"u"&&L.crypto&&(o=L.crypto),!o&&typeof ks=="function")try{o=Ss}catch{}var y=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function x(){}return function(l){var v;return x.prototype=l,v=new x,x.prototype=null,v}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(x){var l=d(this);return x&&l.mixIn(x),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var l in x)x.hasOwnProperty(l)&&(this[l]=x[l]);x.hasOwnProperty("toString")&&(this.toString=x.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=a.WordArray=c.extend({init:function(x,l){x=this.words=x||[],l!=i?this.sigBytes=l:this.sigBytes=x.length*4},toString:function(x){return(x||u).stringify(this)},concat:function(x){var l=this.words,v=x.words,E=this.sigBytes,_=x.sigBytes;if(this.clamp(),E%4)for(var A=0;A<_;A++){var w=v[A>>>2]>>>24-A%4*8&255;l[E+A>>>2]|=w<<24-(E+A)%4*8}else for(var I=0;I<_;I+=4)l[E+I>>>2]=v[I>>>2];return this.sigBytes+=_,this},clamp:function(){var x=this.words,l=this.sigBytes;x[l>>>2]&=4294967295<<32-l%4*8,x.length=s.ceil(l/4)},clone:function(){var x=c.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var l=[],v=0;v<x;v+=4)l.push(y());return new g.init(l,x)}}),n=p.enc={},u=n.Hex={stringify:function(x){for(var l=x.words,v=x.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push((A>>>4).toString(16)),E.push((A&15).toString(16))}return E.join("")},parse:function(x){for(var l=x.length,v=[],E=0;E<l;E+=2)v[E>>>3]|=parseInt(x.substr(E,2),16)<<24-E%8*4;return new g.init(v,l/2)}},h=n.Latin1={stringify:function(x){for(var l=x.words,v=x.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(x){for(var l=x.length,v=[],E=0;E<l;E++)v[E>>>2]|=(x.charCodeAt(E)&255)<<24-E%4*8;return new g.init(v,l)}},m=n.Utf8={stringify:function(x){try{return decodeURIComponent(escape(h.stringify(x)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(x){return h.parse(unescape(encodeURIComponent(x)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(x){typeof x=="string"&&(x=m.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes},_process:function(x){var l,v=this._data,E=v.words,_=v.sigBytes,A=this.blockSize,w=A*4,I=_/w;x?I=s.ceil(I):I=s.max((I|0)-this._minBufferSize,0);var b=I*A,C=s.min(b*4,_);if(b){for(var F=0;F<b;F+=A)this._doProcessBlock(E,F);l=E.splice(0,b),v.sigBytes-=C}return new g.init(l,C)},clone:function(){var x=c.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});a.Hasher=f.extend({cfg:c.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(x){return this._append(x),this._process(),this},finalize:function(x){x&&this._append(x);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(x){return function(l,v){return new x.init(v).finalize(l)}},_createHmacHelper:function(x){return function(l,v){return new B.HMAC.init(x,v).finalize(l)}}});var B=p.algo={};return p}(Math);return t})}(Et)),Et.exports}(function(r,e){(function(t,s){r.exports=s(q())})(L,function(t){return t.enc.Utf8})})(U0);var Ps=U0.exports;const L0=Re(Ps);var N0={exports:{}};(function(r,e){(function(t,s){r.exports=s(q())})(L,function(t){return function(){var s=t,i=s.lib,o=i.WordArray,y=s.enc;y.Base64={stringify:function(p){var a=p.words,c=p.sigBytes,g=this._map;p.clamp();for(var n=[],u=0;u<c;u+=3)for(var h=a[u>>>2]>>>24-u%4*8&255,m=a[u+1>>>2]>>>24-(u+1)%4*8&255,f=a[u+2>>>2]>>>24-(u+2)%4*8&255,B=h<<16|m<<8|f,x=0;x<4&&u+x*.75<c;x++)n.push(g.charAt(B>>>6*(3-x)&63));var l=g.charAt(64);if(l)for(;n.length%4;)n.push(l);return n.join("")},parse:function(p){var a=p.length,c=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var n=0;n<c.length;n++)g[c.charCodeAt(n)]=n}var u=c.charAt(64);if(u){var h=p.indexOf(u);h!==-1&&(a=h)}return d(p,a,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(p,a,c){for(var g=[],n=0,u=0;u<a;u++)if(u%4){var h=c[p.charCodeAt(u-1)]<<u%4*2,m=c[p.charCodeAt(u)]>>>6-u%4*2,f=h|m;g[n>>>2]|=f<<24-n%4*8,n++}return o.create(g,n)}}(),t.enc.Base64})})(N0);var _e=N0.exports;const Oe=Re(_e);class Ue{$blank(e){return se(e)}$present(e){return!this.$blank(e)}$type(e,t){return Ke(e,t)}$uuid(){return O0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Oe.stringify(L0.parse(e))}$decrypt(e){return L0.stringify(Oe.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Ge={debug:1,info:2,warning:3,error:4},U={level:Ge.warning,setLogLevel(r){this.level=r},messageStringify(r,e){try{return e=`${r}: ${Ke(e,"object")?JSON.stringify(e):e}`}catch(t){console.error(`log parse error: ${t}`)}},debug(r,e){this.level<=Ge.debug&&console.log(this.messageStringify(r,e))},info(r,e){this.level<=Ge.info&&console.info(this.messageStringify(r,e))},warn(r,e){this.level<=Ge.warning&&console.warn(this.messageStringify(r,e))},error(r,e){this.level<=Ge.error&&console.error(this.messageStringify(r,e))}};class Is extends Ue{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch{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{this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=Z.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=Z.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{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class Ts extends Is{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),t=Z.STORAGE_PREFIX("session"),s=this.getToJSON(t);return this.$blank(s)||s.time+1800<e?this.setToJSON(t,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid:s.uuid}currentTimeTerm(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=Z.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),s=Z.STORAGE_PREFIX("session"),i=this.getToJSON(s),o=this.$blank(i)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:i;o.time=e,this.setToJSON(s,o)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(Z.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(Z.STORAGE_PREFIX("user")))}catch(e){U.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const ke=new Ts,Ce={name:"@bootpay/client-js",version:"5.2.0-beta.21",main:"dist/index.mjs",exports:{".":{import:"./dist/index.mjs",types:"./dist/index.d.ts"}},styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/plugin-proposal-export-default-from":"^7.27.1","@babel/plugin-transform-class-properties":"^7.27.1","@babel/plugin-proposal-decorators":"^7.28.0","@babel/plugin-transform-private-methods":"^7.27.1","@babel/plugin-transform-typescript":"^7.28.0","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"3.3.1"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},R={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:Ce.version,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(r){this.mode=r},setApplicationId(r){return this.applicationId=r,this.currentApplicationId(void 0)},setLocale(r){this.locale=r,this.isSetLocale=!0},currentApplicationId(r=void 0){return r===void 0?this.applicationId:r},setDevelopmentHost(r){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,r)},setVersion(r,e,t=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=r,this.packageVersion=t===void 0||t===""?Ce.version:t},toApi(r){return[this.API_URL[this.mode],r].join("/")},toDoor(r){return[this.DOOR_URL[this.mode],r].join("/")},toWidget(r){return[this.WIDGET_URL[this.mode],r].join("/")},isMobile(){if(typeof window>"u")return!1;const r=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(r)},isMobileSafari(){if(typeof window>"u")return!1;const r=window.navigator.userAgent;return(r.match(/iPad/i)||r.match(/iPhone/i))&&!r.match(/CriOS/i)},toAnalytics(r){return[this.ANALYTICS_URL[this.mode],r].join("/")}};class le extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const Se={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),this.isBind=!0)},on(r,e,t=void 0){return se(Se.__BOOTPAY_NAMESPACE)&&(Se.__BOOTPAY_NAMESPACE={}),this.addEventListener(r.split(".")[0],e,t||!1),Se.__BOOTPAY_NAMESPACE[r]=e,this},off(r){return N(Se.__BOOTPAY_NAMESPACE)&&N(Se.__BOOTPAY_NAMESPACE[r])&&this.removeEventListener(r.split(".")[0],Se.__BOOTPAY_NAMESPACE[r]),this}};class Xe extends Ue{constructor(e){super(),this.$resolve=null,this.$reject=null,this.$messageEventName=(e==null?void 0:e.messageEventName)??"message.BootpayEvent",this.$eventHooks=(e==null?void 0:e.messageEventHooks)??{},this.afterBind=e==null?void 0:e.afterBind,this.$childInstance=null,Se.initialize()}setChildInstance(e){this.$childInstance=e}bind(e,t){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(U.debug("event received",JSON.stringify(i)),N(i)&&N(i.event)){const o=this.hookFunction(i.hook);if(N(o)&&N(o[i.event]))return o[i.event](i.data,this);U.debug("event",`${this.$messageEventName}: ${i.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,t)}hookFunction(e){return this.$eventHooks[e]}reject(e){N(this.$reject)&&this.$reject(e)}resolve(e){N(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(s){U.info("json parsing failed",`data: ${e}, message: ${Ve(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Ve=r=>typeof r=="string"?r.toUpperCase():r instanceof Error?r.message:r;class ge extends Ue{constructor(e={}){super();const{iframeId:t="bootpay-iframe",template:s=this.defaultIframeHtml(),el:i=void 0}=e;this.el=i,this.$windowId=t,this.$template=s}defaultIframeHtml(){return`
3
3
  <iframe id="${this.$iFrameId}" src="" frameborder="0" allowtransparency="true" scrolling="no" style="background: transparent; width: 100%; height: 100%;"></iframe>
4
4
  `}byId(e){return document.getElementById(e)}createTemplateHtml(){this.byId(this.$windowId)===null&&document.body.insertAdjacentHTML("beforeend",this.$template)}bodyOpen(e=void 0,t=!1){const s=document.querySelector("body");t||(this.$present(s.className)?s.className=`${s.className} bootpay-open`:s.className="bootpay-open"),this.$present(e)&&(s.className=`${s.className} ${e}`)}bodyClose(){const e=document.querySelector("body");e.className=e.className.replace("bootpay-open","")}templateResize(e,t){const s=this.byId(e);if(s!==void 0)for(let i in Object.keys(t)){let o=Object.keys(t)[i],y=t[o];this.$present(y)&&!String(y).match(/%/)&&!String(y).match(/vh/)&&(o.match(/width/)||o.match(/Width/)||o.match(/height/)||o.match(/Height/))&&(y=`${String(t[o]).replace(/px/gi,"")}px`),s.style.setProperty(o,y)}}isRendered(){const e=document.getElementById(this.$iFrameId);return U.debug("isRendered",`iFrameElement: ${e}`),e!==null&&e.src!==null&&e.src!==""}postMessage(e,t=void 0){var i;const s=this.byId(this.$iFrameId);(i=s==null?void 0:s.contentWindow)==null||i.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}defaultRender(e){this.el=String(this.el).replace(/#/g,"");const t=document.getElementById(this.el);if(this.$blank(this.el)||t===null)throw new Error("렌더링할 DOM Element ID를 입력해주세요.");t.style.setProperty("height","0"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}}class Rs extends ge{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`
5
5
  <div class="bootpay-progress-background" id="${this.$alfredId}" style="display: none;">
@@ -59,7 +59,7 @@
59
59
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
60
60
  * derived from CryptoJS.mode.CTR
61
61
  * Jan Hruby jhruby.web@gmail.com
62
- */return t.mode.CTRGladman=function(){var s=t.lib.BlockCipherMode.extend();function i(d){if((d>>24&255)===255){var p=d>>16&255,a=d>>8&255,c=d&255;p===255?(p=0,a===255?(a=0,c===255?c=0:++c):++a):++p,d=0,d+=p<<16,d+=a<<8,d+=c}else d+=1<<24;return d}function o(d){return(d[0]=i(d[0]))===0&&(d[1]=i(d[1])),d}var y=s.Encryptor=s.extend({processBlock:function(d,p){var a=this._cipher,c=a.blockSize,g=this._iv,n=this._counter;g&&(n=this._counter=g.slice(0),this._iv=void 0),o(n);var u=n.slice(0);a.encryptBlock(u,0);for(var h=0;h<c;h++)d[p+h]^=u[h]}});return s.Decryptor=y,s}(),t.mode.CTRGladman})}(p0)),p0.exports}var h0={exports:{}},Yr;function uo(){return Yr||(Yr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.mode.OFB=function(){var s=t.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(o,y){var d=this._cipher,p=d.blockSize,a=this._iv,c=this._keystream;a&&(c=this._keystream=a.slice(0),this._iv=void 0),d.encryptBlock(c,0);for(var g=0;g<p;g++)o[y+g]^=c[g]}});return s.Decryptor=i,s}(),t.mode.OFB})}(h0)),h0.exports}var f0={exports:{}},Jr;function po(){return Jr||(Jr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.mode.ECB=function(){var s=t.lib.BlockCipherMode.extend();return s.Encryptor=s.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),s.Decryptor=s.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),s}(),t.mode.ECB})}(f0)),f0.exports}var v0={exports:{}},Zr;function ho(){return Zr||(Zr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.AnsiX923={pad:function(s,i){var o=s.sigBytes,y=i*4,d=y-o%y,p=o+d-1;s.clamp(),s.words[p>>>2]|=d<<24-p%4*8,s.sigBytes+=d},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Ansix923})}(v0)),v0.exports}var y0={exports:{}},Qr;function fo(){return Qr||(Qr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.Iso10126={pad:function(s,i){var o=i*4,y=o-s.sigBytes%o;s.concat(t.lib.WordArray.random(y-1)).concat(t.lib.WordArray.create([y<<24],1))},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Iso10126})}(y0)),y0.exports}var m0={exports:{}},es;function vo(){return es||(es=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.Iso97971={pad:function(s,i){s.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(s,i)},unpad:function(s){t.pad.ZeroPadding.unpad(s),s.sigBytes--}},t.pad.Iso97971})}(m0)),m0.exports}var E0={exports:{}},ts;function yo(){return ts||(ts=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.ZeroPadding={pad:function(s,i){var o=i*4;s.clamp(),s.sigBytes+=o-(s.sigBytes%o||o)},unpad:function(s){for(var i=s.words,o=s.sigBytes-1,o=s.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){s.sigBytes=o+1;break}}},t.pad.ZeroPadding})}(E0)),E0.exports}var g0={exports:{}},rs;function mo(){return rs||(rs=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(g0)),g0.exports}var b0={exports:{}},ss;function Eo(){return ss||(ss=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return function(s){var i=t,o=i.lib,y=o.CipherParams,d=i.enc,p=d.Hex,a=i.format;a.Hex={stringify:function(c){return c.ciphertext.toString(p)},parse:function(c){var g=p.parse(c);return y.create({ciphertext:g})}}}(),t.format.Hex})}(b0)),b0.exports}var B0={exports:{}},is;function go(){return is||(is=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.WordArray,y=i.BlockCipher,d=s.algo,p=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=d.DES=y.extend({_doReset:function(){for(var B=this._key,x=B.words,l=[],v=0;v<56;v++){var E=p[v]-1;l[v]=x[E>>>5]>>>31-E%32&1}for(var _=this._subKeys=[],A=0;A<16;A++){for(var w=_[A]=[],I=c[A],v=0;v<24;v++)w[v/6|0]|=l[(a[v]-1+I)%28]<<31-v%6,w[4+(v/6|0)]|=l[28+(a[v+24]-1+I)%28]<<31-v%6;w[0]=w[0]<<1|w[0]>>>31;for(var v=1;v<7;v++)w[v]=w[v]>>>(v-1)*4+3;w[7]=w[7]<<5|w[7]>>>27}for(var b=this._invSubKeys=[],v=0;v<16;v++)b[v]=_[15-v]},encryptBlock:function(B,x){this._doCryptBlock(B,x,this._subKeys)},decryptBlock:function(B,x){this._doCryptBlock(B,x,this._invSubKeys)},_doCryptBlock:function(B,x,l){this._lBlock=B[x],this._rBlock=B[x+1],h.call(this,4,252645135),h.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),h.call(this,1,1431655765);for(var v=0;v<16;v++){for(var E=l[v],_=this._lBlock,A=this._rBlock,w=0,I=0;I<8;I++)w|=g[I][((A^E[I])&n[I])>>>0];this._lBlock=A,this._rBlock=_^w}var b=this._lBlock;this._lBlock=this._rBlock,this._rBlock=b,h.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),B[x]=this._lBlock,B[x+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(B,x){var l=(this._lBlock>>>B^this._rBlock)&x;this._rBlock^=l,this._lBlock^=l<<B}function m(B,x){var l=(this._rBlock>>>B^this._lBlock)&x;this._lBlock^=l,this._rBlock^=l<<B}s.DES=y._createHelper(u);var f=d.TripleDES=y.extend({_doReset:function(){var B=this._key,x=B.words;if(x.length!==2&&x.length!==4&&x.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var l=x.slice(0,2),v=x.length<4?x.slice(0,2):x.slice(2,4),E=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=u.createEncryptor(o.create(l)),this._des2=u.createEncryptor(o.create(v)),this._des3=u.createEncryptor(o.create(E))},encryptBlock:function(B,x){this._des1.encryptBlock(B,x),this._des2.decryptBlock(B,x),this._des3.encryptBlock(B,x)},decryptBlock:function(B,x){this._des3.decryptBlock(B,x),this._des2.encryptBlock(B,x),this._des1.decryptBlock(B,x)},keySize:192/32,ivSize:64/32,blockSize:64/32});s.TripleDES=y._createHelper(f)}(),t.TripleDES})}(B0)),B0.exports}var _0={exports:{}},os;function bo(){return os||(os=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.StreamCipher,y=s.algo,d=y.RC4=o.extend({_doReset:function(){for(var c=this._key,g=c.words,n=c.sigBytes,u=this._S=[],h=0;h<256;h++)u[h]=h;for(var h=0,m=0;h<256;h++){var f=h%n,B=g[f>>>2]>>>24-f%4*8&255;m=(m+u[h]+B)%256;var x=u[h];u[h]=u[m],u[m]=x}this._i=this._j=0},_doProcessBlock:function(c,g){c[g]^=p.call(this)},keySize:256/32,ivSize:0});function p(){for(var c=this._S,g=this._i,n=this._j,u=0,h=0;h<4;h++){g=(g+1)%256,n=(n+c[g])%256;var m=c[g];c[g]=c[n],c[n]=m,u|=c[(c[g]+c[n])%256]<<24-h*8}return this._i=g,this._j=n,u}s.RC4=o._createHelper(d);var a=y.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)p.call(this)}});s.RC4Drop=o._createHelper(a)}(),t.RC4})}(_0)),_0.exports}var C0={exports:{}},ns;function Bo(){return ns||(ns=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.StreamCipher,y=s.algo,d=[],p=[],a=[],c=y.Rabbit=o.extend({_doReset:function(){for(var n=this._key.words,u=this.cfg.iv,h=0;h<4;h++)n[h]=(n[h]<<8|n[h]>>>24)&16711935|(n[h]<<24|n[h]>>>8)&4278255360;var m=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],f=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var h=0;h<4;h++)g.call(this);for(var h=0;h<8;h++)f[h]^=m[h+4&7];if(u){var B=u.words,x=B[0],l=B[1],v=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,E=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=v>>>16|E&4294901760,A=E<<16|v&65535;f[0]^=v,f[1]^=_,f[2]^=E,f[3]^=A,f[4]^=v,f[5]^=_,f[6]^=E,f[7]^=A;for(var h=0;h<4;h++)g.call(this)}},_doProcessBlock:function(n,u){var h=this._X;g.call(this),d[0]=h[0]^h[5]>>>16^h[3]<<16,d[1]=h[2]^h[7]>>>16^h[5]<<16,d[2]=h[4]^h[1]>>>16^h[7]<<16,d[3]=h[6]^h[3]>>>16^h[1]<<16;for(var m=0;m<4;m++)d[m]=(d[m]<<8|d[m]>>>24)&16711935|(d[m]<<24|d[m]>>>8)&4278255360,n[u+m]^=d[m]},blockSize:128/32,ivSize:64/32});function g(){for(var n=this._X,u=this._C,h=0;h<8;h++)p[h]=u[h];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<p[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<p[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<p[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<p[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<p[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<p[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<p[6]>>>0?1:0)|0,this._b=u[7]>>>0<p[7]>>>0?1:0;for(var h=0;h<8;h++){var m=n[h]+u[h],f=m&65535,B=m>>>16,x=((f*f>>>17)+f*B>>>15)+B*B,l=((m&4294901760)*m|0)+((m&65535)*m|0);a[h]=x^l}n[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,n[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,n[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,n[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,n[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,n[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,n[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,n[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s.Rabbit=o._createHelper(c)}(),t.Rabbit})}(C0)),C0.exports}var A0={exports:{}},as;function _o(){return as||(as=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.StreamCipher,y=s.algo,d=[],p=[],a=[],c=y.RabbitLegacy=o.extend({_doReset:function(){var n=this._key.words,u=this.cfg.iv,h=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],m=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var f=0;f<4;f++)g.call(this);for(var f=0;f<8;f++)m[f]^=h[f+4&7];if(u){var B=u.words,x=B[0],l=B[1],v=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,E=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=v>>>16|E&4294901760,A=E<<16|v&65535;m[0]^=v,m[1]^=_,m[2]^=E,m[3]^=A,m[4]^=v,m[5]^=_,m[6]^=E,m[7]^=A;for(var f=0;f<4;f++)g.call(this)}},_doProcessBlock:function(n,u){var h=this._X;g.call(this),d[0]=h[0]^h[5]>>>16^h[3]<<16,d[1]=h[2]^h[7]>>>16^h[5]<<16,d[2]=h[4]^h[1]>>>16^h[7]<<16,d[3]=h[6]^h[3]>>>16^h[1]<<16;for(var m=0;m<4;m++)d[m]=(d[m]<<8|d[m]>>>24)&16711935|(d[m]<<24|d[m]>>>8)&4278255360,n[u+m]^=d[m]},blockSize:128/32,ivSize:64/32});function g(){for(var n=this._X,u=this._C,h=0;h<8;h++)p[h]=u[h];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<p[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<p[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<p[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<p[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<p[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<p[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<p[6]>>>0?1:0)|0,this._b=u[7]>>>0<p[7]>>>0?1:0;for(var h=0;h<8;h++){var m=n[h]+u[h],f=m&65535,B=m>>>16,x=((f*f>>>17)+f*B>>>15)+B*B,l=((m&4294901760)*m|0)+((m&65535)*m|0);a[h]=x^l}n[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,n[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,n[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,n[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,n[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,n[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,n[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,n[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s.RabbitLegacy=o._createHelper(c)}(),t.RabbitLegacy})}(A0)),A0.exports}var w0={exports:{}},cs;function Co(){return cs||(cs=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.BlockCipher,y=s.algo;const d=16,p=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function g(f,B){let x=B>>24&255,l=B>>16&255,v=B>>8&255,E=B&255,_=f.sbox[0][x]+f.sbox[1][l];return _=_^f.sbox[2][v],_=_+f.sbox[3][E],_}function n(f,B,x){let l=B,v=x,E;for(let _=0;_<d;++_)l=l^f.pbox[_],v=g(f,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^f.pbox[d],l=l^f.pbox[d+1],{left:l,right:v}}function u(f,B,x){let l=B,v=x,E;for(let _=d+1;_>1;--_)l=l^f.pbox[_],v=g(f,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^f.pbox[1],l=l^f.pbox[0],{left:l,right:v}}function h(f,B,x){for(let A=0;A<4;A++){f.sbox[A]=[];for(let w=0;w<256;w++)f.sbox[A][w]=a[A][w]}let l=0;for(let A=0;A<d+2;A++)f.pbox[A]=p[A]^B[l],l++,l>=x&&(l=0);let v=0,E=0,_=0;for(let A=0;A<d+2;A+=2)_=n(f,v,E),v=_.left,E=_.right,f.pbox[A]=v,f.pbox[A+1]=E;for(let A=0;A<4;A++)for(let w=0;w<256;w+=2)_=n(f,v,E),v=_.left,E=_.right,f.sbox[A][w]=v,f.sbox[A][w+1]=E;return!0}var m=y.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var f=this._keyPriorReset=this._key,B=f.words,x=f.sigBytes/4;h(c,B,x)}},encryptBlock:function(f,B){var x=n(c,f[B],f[B+1]);f[B]=x.left,f[B+1]=x.right},decryptBlock:function(f,B){var x=u(c,f[B],f[B+1]);f[B]=x.left,f[B+1]=x.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=o._createHelper(m)}(),t.Blowfish})}(w0)),w0.exports}(function(r,e){(function(t,s,i){r.exports=s(q(),pt(),eo(),to(),_e,ro(),we,Dr(),i0(),so(),Wr(),io(),oo(),no(),Vt(),ao(),Fe(),ee(),co(),xo(),lo(),uo(),po(),ho(),fo(),vo(),yo(),mo(),Eo(),Ir(),go(),bo(),Bo(),_o(),Co())})(L,function(t){return t})})(Tr);var Ao=Tr.exports;const Ie=Re(Ao);class ds{constructor(){this.data={client_key:""}}encryptKey(){return jt(this.data.client_key).toString().substring(0,16)}encrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const t=typeof e=="string"?e:JSON.stringify(e),s=Jt.encrypt(t,Ie.enc.Utf8.parse(this.encryptKey()),{mode:Ie.mode.ECB,padding:Ie.pad.Pkcs7});return Oe.stringify(s.ciphertext)}decrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const s=Jt.decrypt(e,Ie.enc.Utf8.parse(this.encryptKey()),{mode:Ie.mode.ECB,padding:Ie.pad.Pkcs7}).toString(Ie.enc.Utf8);try{return JSON.parse(s)}catch{return s}}callHook(e,...t){if(this.hooks&&this.hooks[e]&&typeof this.hooks[e]=="function")return this.hooks[e](...t);throw new Error(`Hook ${e} is not defined`)}}class wo{constructor(e={}){this.hooks={},Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}setHooks(e){Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}callHook(e,...t){if(this.hooks[e])try{this.hooks[e](...t)}catch(s){console.error(`Error in hook ${e}:`,s)}}}class Fo extends wo{constructor(e={}){super(e)}}const Be=new Fo;class xs extends ds{setWidgetData(e,t){Be.setHooks(t.hooks??{}),this.el=String(e).replace(/#/gi,""),this.data=t,this.termsPassed=!1,this.data.terms=this.data.terms??[],this.widgetType=1,this.data.widget=1,this.data.use_terms=this.data.use_terms??!0,this.widgetExtra={}}setPayment(e,t,s,i=!1,o,y){this.data.pg=e,this.data.method=t,this.data.wallet_id=s,this.termsPassed=i,this.data.terms=o,this.widgetExtra=y}updateOnProcessing(e){N(e.price)&&(this.data.price=e.price),N(e.tax_free)&&(this.data.tax_free=e.tax_free),N(e.currency)&&(this.data.currency=e.currency),e.user_token!==void 0&&(this.data.user_token=e.user_token),N(e.use_terms)&&(this.data.use_terms=e.use_terms!==!1),N(e.sandbox)&&(this.data.sandbox=e.sandbox===!0),N(e.widget_key)&&(this.data.widget_key=e.widget_key),N(e.widget_type)&&(this.widgetType=e.widget_type),e.external_terms!==void 0&&(this.data.external_terms=e.external_terms),e.use_bootpay_inapp_sdk!==void 0&&(this.data.use_bootpay_inapp_sdk=e.use_bootpay_inapp_sdk),e.widget_key!==void 0&&(this.data.widget_key=e.widget_key)}encryptParameters(){return encodeURIComponent(this.encrypt({order_name:this.data.order_name,use_only_brandpay:this.data.use_only_brandpay,subscribe_brandpay_type:this.data.subscribe_brandpay_type,user_token:this.data.user_token,sandbox:this.data.sandbox,use_terms:this.data.use_terms,external_terms:this.data.external_terms,key:this.data.widget_key,use_bootpay_inapp_sdk:this.data.use_bootpay_inapp_sdk,use_popup:this.data.use_popup===!0,extra:this.data.extra,log_level:U.level}))}encryptKey(){return N(this.data.application_id)?jt(this.data.application_id).toString().substring(0,16):""}getExtra(e=void 0){return mt(e??{},mt(this.widgetExtra??{},this.data.extra??{}))}getRequestPaymentData(e=void 0){return this.data.widget_sandbox=this.data.sandbox,this.data.extra=this.getExtra(e.extra),mt(e,this.data)}}const z=new xs;class Do extends ge{constructor(){super(),this.$iFrameId="bootpay-widget-iframe",this.$widgetStore=z,this.$template=this.defaultIframeHtml()}render(){const e=document.getElementById(this.$widgetStore.el);if(this.$blank(this.$widgetStore.el)||e===null)throw new Error("부트페이 위젯을 설정할 Element ID를 입력하지 않았거나 해당 Element DOM이 존재하지 않습니다.");this.templateRender(R.toWidget(`p/${this.$widgetStore.data.application_id}/${this.$widgetStore.encryptParameters()}`))}templateRender(e){const t=document.getElementById(this.$widgetStore.el);t.style.setProperty("height","0px"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}resize(e){this.templateResize(this.$widgetStore.el,e)}rerender(){this.postMessage("bootpayWidgetRerender")}destroy(){const e=document.getElementById(this.$widgetStore.el);e.innerHTML=""}}const G=new Do;class $o extends Ue{constructor(){super(),this.message=Zt}initialize(){z.setWidgetData(void 0,{application_id:void 0,order_name:"",order_id:void 0,price:0,tax_free:0,currency:"KRW",user_token:void 0,pg:void 0,method:void 0,widget_key:void 0})}render(e,t){if(this.$blank(t==null?void 0:t.price)||t.price<0)throw new Error("결제금액은 1원 이상을 입력해주세요.");if(this.$blank(t==null?void 0:t.application_id))throw new Error("application_id가 입력되지 않았습니다.");this.initialize(),z.setWidgetData(e,t),G.render(),ls.bind()}update(e){const{price:t,tax_free:s,currency:i,user_token:o,use_only_brandpay:y,use_terms:d,sandbox:p,widget_key:a,external_terms:c}=e;z.updateOnProcessing({price:t,tax_free:s,currency:i,user_token:o,use_only_brandpay:y,use_terms:d,external_terms:c,sandbox:p,widget_key:a}),(this.$present(o)||this.$present(y)||this.$present(d)||this.$present(p))&&G.postMessage("bootpayWidgetUpdateUserToken",{user_token:o,use_only_brandpay:y,use_terms:d,external_terms:c,sandbox:p,key:a})}rerender(){G.rerender()}destroy(){G.destroy()}selectPayment(e,t,s,i=!1,o,y){z.setPayment(e,t,s,i,o,y),U.debug("selectPayment",`pg: ${e}, method: ${t}, wallet_id: ${s}, terms: ${i}, select_terms: ${JSON.stringify(o)}, extra: ${JSON.stringify(y)}`)}currentTermsCondition(){return z.data.terms}async requestPayment(e){return this.widgetRequestPaymentValidate(1),be.requestPayment(z.getRequestPaymentData(e))}async requestSubscription(e){return this.widgetRequestPaymentValidate(2),be.requestSubscription(z.getRequestPaymentData(e))}isRendered(){return G.isRendered()}synchronizedRealTimeTransfer(e){G.postMessage("bootpayWidgetSynchronizedRealTimeTransfer",e)}sendSelectPayment(e){G.postMessage("bootpayWidgetSelectPayment",e)}sendMessage(e,t){G.postMessage(e,t)}currentPaymentParameters(){return{pg:z.data.pg,method:z.data.method,wallet_id:z.data.wallet_id,terms:z.data.terms,widget_key:z.data.widget_key,widget_sandbox:z.data.sandbox,extra:z.getExtra({})}}widgetRequestPaymentValidate(e=void 0){if(e!==void 0&&z.widgetType!==e)throw new le({event:"error",error_code:"RC_WIDGET_TYPE_INVALID",message:e===1?this.message.getLocaleMessage("widgetTypeNotPayment","ko"):this.message.getLocaleMessage("widgetTypeNotSubscription","ko")});if(this.$blank(z.data.pg)||this.$blank(z.data.method))throw new le({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!z.termsPassed&&z.data.use_terms)throw new le({event:"error",error_code:"RC_TERMS_NOT_AGREE",message:this.message.getLocaleMessage("termsNotAgree","ko")});if(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(z.data.method)>-1&&z.data.wallet_id===void 0)throw new le({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectBrandpay","ko")})}}const re=new $o;class ko extends ge{constructor(e={isBackground:!0}){super(),this.$brandpayWindowId="__bootpay-brandpay-window",this.$iFrameId="__bootpay-brandpay-iframe",this.$windowId="__bootpay-brandpay-container-window",this.$additionalClass=R.isMobile()?"transparent":"rounded-iframe transparent",this.$template=this.template({isBackground:e.isBackground??!0}),this.$widgetStore=z}template({isBackground:e}){return e?`
62
+ */return t.mode.CTRGladman=function(){var s=t.lib.BlockCipherMode.extend();function i(d){if((d>>24&255)===255){var p=d>>16&255,a=d>>8&255,c=d&255;p===255?(p=0,a===255?(a=0,c===255?c=0:++c):++a):++p,d=0,d+=p<<16,d+=a<<8,d+=c}else d+=1<<24;return d}function o(d){return(d[0]=i(d[0]))===0&&(d[1]=i(d[1])),d}var y=s.Encryptor=s.extend({processBlock:function(d,p){var a=this._cipher,c=a.blockSize,g=this._iv,n=this._counter;g&&(n=this._counter=g.slice(0),this._iv=void 0),o(n);var u=n.slice(0);a.encryptBlock(u,0);for(var h=0;h<c;h++)d[p+h]^=u[h]}});return s.Decryptor=y,s}(),t.mode.CTRGladman})}(p0)),p0.exports}var h0={exports:{}},Yr;function uo(){return Yr||(Yr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.mode.OFB=function(){var s=t.lib.BlockCipherMode.extend(),i=s.Encryptor=s.extend({processBlock:function(o,y){var d=this._cipher,p=d.blockSize,a=this._iv,c=this._keystream;a&&(c=this._keystream=a.slice(0),this._iv=void 0),d.encryptBlock(c,0);for(var g=0;g<p;g++)o[y+g]^=c[g]}});return s.Decryptor=i,s}(),t.mode.OFB})}(h0)),h0.exports}var f0={exports:{}},Jr;function po(){return Jr||(Jr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.mode.ECB=function(){var s=t.lib.BlockCipherMode.extend();return s.Encryptor=s.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),s.Decryptor=s.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),s}(),t.mode.ECB})}(f0)),f0.exports}var v0={exports:{}},Zr;function ho(){return Zr||(Zr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.AnsiX923={pad:function(s,i){var o=s.sigBytes,y=i*4,d=y-o%y,p=o+d-1;s.clamp(),s.words[p>>>2]|=d<<24-p%4*8,s.sigBytes+=d},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Ansix923})}(v0)),v0.exports}var y0={exports:{}},Qr;function fo(){return Qr||(Qr=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.Iso10126={pad:function(s,i){var o=i*4,y=o-s.sigBytes%o;s.concat(t.lib.WordArray.random(y-1)).concat(t.lib.WordArray.create([y<<24],1))},unpad:function(s){var i=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=i}},t.pad.Iso10126})}(y0)),y0.exports}var m0={exports:{}},es;function vo(){return es||(es=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.Iso97971={pad:function(s,i){s.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(s,i)},unpad:function(s){t.pad.ZeroPadding.unpad(s),s.sigBytes--}},t.pad.Iso97971})}(m0)),m0.exports}var E0={exports:{}},ts;function yo(){return ts||(ts=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.ZeroPadding={pad:function(s,i){var o=i*4;s.clamp(),s.sigBytes+=o-(s.sigBytes%o||o)},unpad:function(s){for(var i=s.words,o=s.sigBytes-1,o=s.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){s.sigBytes=o+1;break}}},t.pad.ZeroPadding})}(E0)),E0.exports}var g0={exports:{}},rs;function mo(){return rs||(rs=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(g0)),g0.exports}var b0={exports:{}},ss;function Eo(){return ss||(ss=1,function(r,e){(function(t,s,i){r.exports=s(q(),ee())})(L,function(t){return function(s){var i=t,o=i.lib,y=o.CipherParams,d=i.enc,p=d.Hex,a=i.format;a.Hex={stringify:function(c){return c.ciphertext.toString(p)},parse:function(c){var g=p.parse(c);return y.create({ciphertext:g})}}}(),t.format.Hex})}(b0)),b0.exports}var B0={exports:{}},is;function go(){return is||(is=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.WordArray,y=i.BlockCipher,d=s.algo,p=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=d.DES=y.extend({_doReset:function(){for(var B=this._key,x=B.words,l=[],v=0;v<56;v++){var E=p[v]-1;l[v]=x[E>>>5]>>>31-E%32&1}for(var _=this._subKeys=[],A=0;A<16;A++){for(var w=_[A]=[],I=c[A],v=0;v<24;v++)w[v/6|0]|=l[(a[v]-1+I)%28]<<31-v%6,w[4+(v/6|0)]|=l[28+(a[v+24]-1+I)%28]<<31-v%6;w[0]=w[0]<<1|w[0]>>>31;for(var v=1;v<7;v++)w[v]=w[v]>>>(v-1)*4+3;w[7]=w[7]<<5|w[7]>>>27}for(var b=this._invSubKeys=[],v=0;v<16;v++)b[v]=_[15-v]},encryptBlock:function(B,x){this._doCryptBlock(B,x,this._subKeys)},decryptBlock:function(B,x){this._doCryptBlock(B,x,this._invSubKeys)},_doCryptBlock:function(B,x,l){this._lBlock=B[x],this._rBlock=B[x+1],h.call(this,4,252645135),h.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),h.call(this,1,1431655765);for(var v=0;v<16;v++){for(var E=l[v],_=this._lBlock,A=this._rBlock,w=0,I=0;I<8;I++)w|=g[I][((A^E[I])&n[I])>>>0];this._lBlock=A,this._rBlock=_^w}var b=this._lBlock;this._lBlock=this._rBlock,this._rBlock=b,h.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),B[x]=this._lBlock,B[x+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(B,x){var l=(this._lBlock>>>B^this._rBlock)&x;this._rBlock^=l,this._lBlock^=l<<B}function m(B,x){var l=(this._rBlock>>>B^this._lBlock)&x;this._lBlock^=l,this._rBlock^=l<<B}s.DES=y._createHelper(u);var f=d.TripleDES=y.extend({_doReset:function(){var B=this._key,x=B.words;if(x.length!==2&&x.length!==4&&x.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var l=x.slice(0,2),v=x.length<4?x.slice(0,2):x.slice(2,4),E=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=u.createEncryptor(o.create(l)),this._des2=u.createEncryptor(o.create(v)),this._des3=u.createEncryptor(o.create(E))},encryptBlock:function(B,x){this._des1.encryptBlock(B,x),this._des2.decryptBlock(B,x),this._des3.encryptBlock(B,x)},decryptBlock:function(B,x){this._des3.decryptBlock(B,x),this._des2.encryptBlock(B,x),this._des1.decryptBlock(B,x)},keySize:192/32,ivSize:64/32,blockSize:64/32});s.TripleDES=y._createHelper(f)}(),t.TripleDES})}(B0)),B0.exports}var _0={exports:{}},os;function bo(){return os||(os=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.StreamCipher,y=s.algo,d=y.RC4=o.extend({_doReset:function(){for(var c=this._key,g=c.words,n=c.sigBytes,u=this._S=[],h=0;h<256;h++)u[h]=h;for(var h=0,m=0;h<256;h++){var f=h%n,B=g[f>>>2]>>>24-f%4*8&255;m=(m+u[h]+B)%256;var x=u[h];u[h]=u[m],u[m]=x}this._i=this._j=0},_doProcessBlock:function(c,g){c[g]^=p.call(this)},keySize:256/32,ivSize:0});function p(){for(var c=this._S,g=this._i,n=this._j,u=0,h=0;h<4;h++){g=(g+1)%256,n=(n+c[g])%256;var m=c[g];c[g]=c[n],c[n]=m,u|=c[(c[g]+c[n])%256]<<24-h*8}return this._i=g,this._j=n,u}s.RC4=o._createHelper(d);var a=y.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)p.call(this)}});s.RC4Drop=o._createHelper(a)}(),t.RC4})}(_0)),_0.exports}var C0={exports:{}},ns;function Bo(){return ns||(ns=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.StreamCipher,y=s.algo,d=[],p=[],a=[],c=y.Rabbit=o.extend({_doReset:function(){for(var n=this._key.words,u=this.cfg.iv,h=0;h<4;h++)n[h]=(n[h]<<8|n[h]>>>24)&16711935|(n[h]<<24|n[h]>>>8)&4278255360;var m=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],f=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var h=0;h<4;h++)g.call(this);for(var h=0;h<8;h++)f[h]^=m[h+4&7];if(u){var B=u.words,x=B[0],l=B[1],v=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,E=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=v>>>16|E&4294901760,A=E<<16|v&65535;f[0]^=v,f[1]^=_,f[2]^=E,f[3]^=A,f[4]^=v,f[5]^=_,f[6]^=E,f[7]^=A;for(var h=0;h<4;h++)g.call(this)}},_doProcessBlock:function(n,u){var h=this._X;g.call(this),d[0]=h[0]^h[5]>>>16^h[3]<<16,d[1]=h[2]^h[7]>>>16^h[5]<<16,d[2]=h[4]^h[1]>>>16^h[7]<<16,d[3]=h[6]^h[3]>>>16^h[1]<<16;for(var m=0;m<4;m++)d[m]=(d[m]<<8|d[m]>>>24)&16711935|(d[m]<<24|d[m]>>>8)&4278255360,n[u+m]^=d[m]},blockSize:128/32,ivSize:64/32});function g(){for(var n=this._X,u=this._C,h=0;h<8;h++)p[h]=u[h];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<p[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<p[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<p[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<p[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<p[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<p[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<p[6]>>>0?1:0)|0,this._b=u[7]>>>0<p[7]>>>0?1:0;for(var h=0;h<8;h++){var m=n[h]+u[h],f=m&65535,B=m>>>16,x=((f*f>>>17)+f*B>>>15)+B*B,l=((m&4294901760)*m|0)+((m&65535)*m|0);a[h]=x^l}n[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,n[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,n[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,n[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,n[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,n[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,n[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,n[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s.Rabbit=o._createHelper(c)}(),t.Rabbit})}(C0)),C0.exports}var A0={exports:{}},as;function _o(){return as||(as=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.StreamCipher,y=s.algo,d=[],p=[],a=[],c=y.RabbitLegacy=o.extend({_doReset:function(){var n=this._key.words,u=this.cfg.iv,h=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],m=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var f=0;f<4;f++)g.call(this);for(var f=0;f<8;f++)m[f]^=h[f+4&7];if(u){var B=u.words,x=B[0],l=B[1],v=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,E=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,_=v>>>16|E&4294901760,A=E<<16|v&65535;m[0]^=v,m[1]^=_,m[2]^=E,m[3]^=A,m[4]^=v,m[5]^=_,m[6]^=E,m[7]^=A;for(var f=0;f<4;f++)g.call(this)}},_doProcessBlock:function(n,u){var h=this._X;g.call(this),d[0]=h[0]^h[5]>>>16^h[3]<<16,d[1]=h[2]^h[7]>>>16^h[5]<<16,d[2]=h[4]^h[1]>>>16^h[7]<<16,d[3]=h[6]^h[3]>>>16^h[1]<<16;for(var m=0;m<4;m++)d[m]=(d[m]<<8|d[m]>>>24)&16711935|(d[m]<<24|d[m]>>>8)&4278255360,n[u+m]^=d[m]},blockSize:128/32,ivSize:64/32});function g(){for(var n=this._X,u=this._C,h=0;h<8;h++)p[h]=u[h];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<p[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<p[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<p[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<p[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<p[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<p[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<p[6]>>>0?1:0)|0,this._b=u[7]>>>0<p[7]>>>0?1:0;for(var h=0;h<8;h++){var m=n[h]+u[h],f=m&65535,B=m>>>16,x=((f*f>>>17)+f*B>>>15)+B*B,l=((m&4294901760)*m|0)+((m&65535)*m|0);a[h]=x^l}n[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,n[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,n[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,n[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,n[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,n[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,n[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,n[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s.RabbitLegacy=o._createHelper(c)}(),t.RabbitLegacy})}(A0)),A0.exports}var w0={exports:{}},cs;function Co(){return cs||(cs=1,function(r,e){(function(t,s,i){r.exports=s(q(),_e,we,Fe(),ee())})(L,function(t){return function(){var s=t,i=s.lib,o=i.BlockCipher,y=s.algo;const d=16,p=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function g(f,B){let x=B>>24&255,l=B>>16&255,v=B>>8&255,E=B&255,_=f.sbox[0][x]+f.sbox[1][l];return _=_^f.sbox[2][v],_=_+f.sbox[3][E],_}function n(f,B,x){let l=B,v=x,E;for(let _=0;_<d;++_)l=l^f.pbox[_],v=g(f,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^f.pbox[d],l=l^f.pbox[d+1],{left:l,right:v}}function u(f,B,x){let l=B,v=x,E;for(let _=d+1;_>1;--_)l=l^f.pbox[_],v=g(f,l)^v,E=l,l=v,v=E;return E=l,l=v,v=E,v=v^f.pbox[1],l=l^f.pbox[0],{left:l,right:v}}function h(f,B,x){for(let A=0;A<4;A++){f.sbox[A]=[];for(let w=0;w<256;w++)f.sbox[A][w]=a[A][w]}let l=0;for(let A=0;A<d+2;A++)f.pbox[A]=p[A]^B[l],l++,l>=x&&(l=0);let v=0,E=0,_=0;for(let A=0;A<d+2;A+=2)_=n(f,v,E),v=_.left,E=_.right,f.pbox[A]=v,f.pbox[A+1]=E;for(let A=0;A<4;A++)for(let w=0;w<256;w+=2)_=n(f,v,E),v=_.left,E=_.right,f.sbox[A][w]=v,f.sbox[A][w+1]=E;return!0}var m=y.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var f=this._keyPriorReset=this._key,B=f.words,x=f.sigBytes/4;h(c,B,x)}},encryptBlock:function(f,B){var x=n(c,f[B],f[B+1]);f[B]=x.left,f[B+1]=x.right},decryptBlock:function(f,B){var x=u(c,f[B],f[B+1]);f[B]=x.left,f[B+1]=x.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=o._createHelper(m)}(),t.Blowfish})}(w0)),w0.exports}(function(r,e){(function(t,s,i){r.exports=s(q(),pt(),eo(),to(),_e,ro(),we,Dr(),i0(),so(),Wr(),io(),oo(),no(),Vt(),ao(),Fe(),ee(),co(),xo(),lo(),uo(),po(),ho(),fo(),vo(),yo(),mo(),Eo(),Ir(),go(),bo(),Bo(),_o(),Co())})(L,function(t){return t})})(Tr);var Ao=Tr.exports;const Ie=Re(Ao);class ds{constructor(){this.data={client_key:""}}encryptKey(){return jt(this.data.client_key).toString().substring(0,16)}encrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const t=typeof e=="string"?e:JSON.stringify(e),s=Jt.encrypt(t,Ie.enc.Utf8.parse(this.encryptKey()),{mode:Ie.mode.ECB,padding:Ie.pad.Pkcs7});return Oe.stringify(s.ciphertext)}decrypt(e){if(se(this.encryptKey()))throw new Error("privateKey is not set");const s=Jt.decrypt(e,Ie.enc.Utf8.parse(this.encryptKey()),{mode:Ie.mode.ECB,padding:Ie.pad.Pkcs7}).toString(Ie.enc.Utf8);try{return JSON.parse(s)}catch{return s}}callHook(e,...t){if(this.hooks&&this.hooks[e]&&typeof this.hooks[e]=="function")return this.hooks[e](...t);throw new Error(`Hook ${e} is not defined`)}}class wo{constructor(e={}){this.hooks={},Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}setHooks(e){Object.keys(e).forEach(t=>{this.hooks[t]=e[t]})}callHook(e,...t){if(this.hooks[e])try{this.hooks[e](...t)}catch(s){console.error(`Error in hook ${e}:`,s)}}}class Fo extends wo{constructor(e={}){super(e)}}const Be=new Fo;class xs extends ds{setWidgetData(e,t){Be.setHooks(t.hooks??{}),this.el=String(e).replace(/#/gi,""),this.data=t,this.termsPassed=!1,this.data.terms=this.data.terms??[],this.widgetType=1,this.data.widget=1,this.data.use_terms=this.data.use_terms??!0,this.widgetExtra={}}setPayment(e,t,s,i=!1,o,y){this.data.pg=e,this.data.method=t,this.data.wallet_id=s,this.termsPassed=i,this.data.terms=o,this.widgetExtra=y}updateOnProcessing(e){N(e.price)&&(this.data.price=e.price),N(e.tax_free)&&(this.data.tax_free=e.tax_free),N(e.currency)&&(this.data.currency=e.currency),e.user_token!==void 0&&(this.data.user_token=e.user_token),N(e.use_terms)&&(this.data.use_terms=e.use_terms!==!1),N(e.sandbox)&&(this.data.sandbox=e.sandbox===!0),N(e.widget_key)&&(this.data.widget_key=e.widget_key),N(e.widget_type)&&(this.widgetType=e.widget_type),e.external_terms!==void 0&&(this.data.external_terms=e.external_terms),e.use_bootpay_inapp_sdk!==void 0&&(this.data.use_bootpay_inapp_sdk=e.use_bootpay_inapp_sdk),e.widget_key!==void 0&&(this.data.widget_key=e.widget_key)}encryptParameters(){return encodeURIComponent(this.encrypt({order_name:this.data.order_name,use_only_brandpay:this.data.use_only_brandpay,subscribe_brandpay_type:this.data.subscribe_brandpay_type,user_token:this.data.user_token,sandbox:this.data.sandbox,use_terms:this.data.use_terms,external_terms:this.data.external_terms,key:this.data.widget_key,use_bootpay_inapp_sdk:this.data.use_bootpay_inapp_sdk,use_popup:this.data.use_popup===!0,extra:this.data.extra,log_level:U.level}))}encryptKey(){return N(this.data.application_id)?jt(this.data.application_id).toString().substring(0,16):""}getExtra(e=void 0){return mt(e??{},mt(this.data.extra??{},this.widgetExtra??{}))}getRequestPaymentData(e=void 0){return this.data.widget_sandbox=this.data.sandbox,this.data.extra=this.getExtra(e.extra),mt(e,this.data)}}const z=new xs;class Do extends ge{constructor(){super(),this.$iFrameId="bootpay-widget-iframe",this.$widgetStore=z,this.$template=this.defaultIframeHtml()}render(){const e=document.getElementById(this.$widgetStore.el);if(this.$blank(this.$widgetStore.el)||e===null)throw new Error("부트페이 위젯을 설정할 Element ID를 입력하지 않았거나 해당 Element DOM이 존재하지 않습니다.");this.templateRender(R.toWidget(`p/${this.$widgetStore.data.application_id}/${this.$widgetStore.encryptParameters()}`))}templateRender(e){const t=document.getElementById(this.$widgetStore.el);t.style.setProperty("height","0px"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}resize(e){this.templateResize(this.$widgetStore.el,e)}rerender(){this.postMessage("bootpayWidgetRerender")}destroy(){const e=document.getElementById(this.$widgetStore.el);e.innerHTML=""}}const G=new Do;class $o extends Ue{constructor(){super(),this.message=Zt}initialize(){z.setWidgetData(void 0,{application_id:void 0,order_name:"",order_id:void 0,price:0,tax_free:0,currency:"KRW",user_token:void 0,pg:void 0,method:void 0,widget_key:void 0})}render(e,t){if(this.$blank(t==null?void 0:t.price)||t.price<0)throw new Error("결제금액은 1원 이상을 입력해주세요.");if(this.$blank(t==null?void 0:t.application_id))throw new Error("application_id가 입력되지 않았습니다.");this.initialize(),z.setWidgetData(e,t),G.render(),ls.bind()}update(e){const{price:t,tax_free:s,currency:i,user_token:o,use_only_brandpay:y,use_terms:d,sandbox:p,widget_key:a,external_terms:c}=e;z.updateOnProcessing({price:t,tax_free:s,currency:i,user_token:o,use_only_brandpay:y,use_terms:d,external_terms:c,sandbox:p,widget_key:a}),(this.$present(o)||this.$present(y)||this.$present(d)||this.$present(p))&&G.postMessage("bootpayWidgetUpdateUserToken",{user_token:o,use_only_brandpay:y,use_terms:d,external_terms:c,sandbox:p,key:a})}rerender(){G.rerender()}destroy(){G.destroy()}selectPayment(e,t,s,i=!1,o,y){z.setPayment(e,t,s,i,o,y),U.debug("selectPayment",`pg: ${e}, method: ${t}, wallet_id: ${s}, terms: ${i}, select_terms: ${JSON.stringify(o)}, extra: ${JSON.stringify(y)}`)}currentTermsCondition(){return z.data.terms}async requestPayment(e){return this.widgetRequestPaymentValidate(1),be.requestPayment(z.getRequestPaymentData(e))}async requestSubscription(e){return this.widgetRequestPaymentValidate(2),be.requestSubscription(z.getRequestPaymentData(e))}isRendered(){return G.isRendered()}synchronizedRealTimeTransfer(e){G.postMessage("bootpayWidgetSynchronizedRealTimeTransfer",e)}sendSelectPayment(e){G.postMessage("bootpayWidgetSelectPayment",e)}sendMessage(e,t){G.postMessage(e,t)}currentPaymentParameters(){return{pg:z.data.pg,method:z.data.method,wallet_id:z.data.wallet_id,terms:z.data.terms,widget_key:z.data.widget_key,widget_sandbox:z.data.sandbox,extra:z.getExtra({})}}widgetRequestPaymentValidate(e=void 0){if(e!==void 0&&z.widgetType!==e)throw new le({event:"error",error_code:"RC_WIDGET_TYPE_INVALID",message:e===1?this.message.getLocaleMessage("widgetTypeNotPayment","ko"):this.message.getLocaleMessage("widgetTypeNotSubscription","ko")});if(this.$blank(z.data.pg)||this.$blank(z.data.method))throw new le({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!z.termsPassed&&z.data.use_terms)throw new le({event:"error",error_code:"RC_TERMS_NOT_AGREE",message:this.message.getLocaleMessage("termsNotAgree","ko")});if(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(z.data.method)>-1&&z.data.wallet_id===void 0)throw new le({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectBrandpay","ko")})}}const re=new $o;class ko extends ge{constructor(e={isBackground:!0}){super(),this.$brandpayWindowId="__bootpay-brandpay-window",this.$iFrameId="__bootpay-brandpay-iframe",this.$windowId="__bootpay-brandpay-container-window",this.$additionalClass=R.isMobile()?"transparent":"rounded-iframe transparent",this.$template=this.template({isBackground:e.isBackground??!0}),this.$widgetStore=z}template({isBackground:e}){return e?`
63
63
  <div id="${this.$windowId}" class="bootpay-payment-background">
64
64
  <div class="bootpay-payment-window ${R.isMobile()?"__mobile":""}" id="${this.$brandpayWindowId}">
65
65
  <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootpay/client-js",
3
- "version": "5.2.0-beta.20",
3
+ "version": "5.2.0-beta.21",
4
4
  "main": "dist/index.mjs",
5
5
  "exports": {
6
6
  ".": {