@one-commerce/sdk-backoffice-vue3 1.19.4 → 1.19.7

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.
@@ -1,2 +1,2 @@
1
- import{reactive as t,getCurrentInstance as e}from"vue";function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var a,c,u,s={},f={};a=f,Object.defineProperty(a,"__esModule",{value:!0}),a.Errors=a.Message=void 0,(c=a.Message||(a.Message={})).INIT="one:init",c.UPDATE="one:update",c.METHOD_CALL="one:method:call",c.METHOD_CALL_ERROR="one:method:error",c.METHOD_RESULT="one:method:result",c.NAVIGATION_PUSH="one:navigation:push",c.FRAME_HEIGHT_REQUEST="one:frameheight:request",c.FRAME_HEIGHT_CHANGE="one:frameheight:change",(u=a.Errors||(a.Errors={})).METHOD_DOES_NOT_EXISTS="Method does not exists",u.SERVICE_DOES_NOT_EXISTS="Service does not exists";var l={};Object.defineProperty(l,"__esModule",{value:!0}),function(t){var e=o&&o.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=o&&o.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(f,t),n(l,t)}(s);var p={exports:{}};window;var h=i(p.exports=function(){return n={},t.m=e=[function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(26),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(74),o=n(77);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(7),o=n(51),i=n(52),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(23);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(1).Symbol;t.exports=r},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&-1<t&&t%1==0&&t<e}},function(t,e,n){var r=n(64),o=n(65),i=n(66),a=n(67),c=n(68);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(11);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(2)(Object,"create");t.exports=r},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(38);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(3),o=n(128),i=n(4),a=Function.prototype,c=Object.prototype,u=a.toString,s=c.hasOwnProperty,f=u.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==f}},function(t,e,n){var r=n(47),o=n(57),i=n(18);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(31),o=n(17);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(2)(n(1),"Map");t.exports=r},function(t,e,n){var r=n(78),o=n(85),i=n(87),a=n(88),c=n(89);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(0),o=n(22),i=n(114),a=n(117);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e,n){var r=n(0),o=n(23),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(129);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e,n){var r=n(49),o=n(4),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=u},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(50))},function(t,e,n){(function(t){var r=n(1),o=n(53),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i?r.Buffer:void 0,u=(c?c.isBuffer:void 0)||o;t.exports=u}).call(this,n(28)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(54),o=n(55),i=n(56),a=i&&i.isTypedArray,c=a?o(a):r;t.exports=c},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(3),o=n(5);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(9),o=n(69),i=n(70),a=n(71),c=n(72),u=n(73);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,t.exports=s},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(90),o=n(4);t.exports=function t(e,n,i,a,c){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,c))}},function(t,e,n){var r=n(91),o=n(94),i=n(95);t.exports=function(t,e,n,a,c,u){var s=1&n,f=t.length,l=e.length;if(f!=l&&!(s&&f<l))return!1;var p=u.get(t);if(p&&u.get(e))return p==e;var h=-1,v=!0,d=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h<f;){var b=t[h],g=e[h];if(a)var y=s?a(g,b,h,e,t,u):a(b,g,h,t,e,u);if(void 0!==y){if(y)continue;v=!1;break}if(d){if(!o(e,(function(t,e){if(!i(d,e)&&(b===t||c(b,t,n,a,u)))return d.push(e)}))){v=!1;break}}else if(b!==g&&!c(b,g,n,a,u)){v=!1;break}}return u.delete(t),u.delete(e),v}},function(t,e,n){var r=n(5);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(21),o=n(6);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},function(t,e,n){var r=n(41),o=n(42),i=n(61),a=n(0),c=n(127);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&c(t,e,n)&&(e=void 0),u(t,i(e,3))}},function(t,e,n){var r,o,i=n(133),a=n(134),c=0,u=0;t.exports=function(t,e,n){var s=e&&n||0,f=e||[],l=(t=t||{}).node||r,p=void 0!==t.clockseq?t.clockseq:o;if(null==l||null==p){var h=i();null==l&&(l=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=o=16383&(h[6]<<8|h[7]))}var v=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,b=v-c+(d-u)/1e4;if(b<0&&void 0===t.clockseq&&(p=p+1&16383),(b<0||c<v)&&void 0===t.nsecs&&(d=0),1e4<=d)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=v,o=p;var g=(1e4*(268435455&(v+=122192928e5))+(u=d))%4294967296;f[s++]=g>>>24&255,f[s++]=g>>>16&255,f[s++]=g>>>8&255,f[s++]=255&g;var y=v/4294967296*1e4&268435455;f[s++]=y>>>8&255,f[s++]=255&y,f[s++]=y>>>24&15|16,f[s++]=y>>>16&255,f[s++]=p>>>8|128,f[s++]=255&p;for(var _=0;_<6;++_)f[s+_]=l[_];return e||a(f)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}},function(t,e,n){var r=n(43);t.exports=function(t,e){var n=!0;return r(t,(function(t,r,o){return n=!!e(t,r,o)})),n}},function(t,e,n){var r=n(44),o=n(60)(r);t.exports=o},function(t,e,n){var r=n(45),o=n(16);t.exports=function(t,e){return t&&r(t,e,o)}},function(t,e,n){var r=n(46)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),c=a.length;c--;){var u=a[t?c:++o];if(!1===n(i[u],u,i))break}return e}}},function(t,e,n){var r=n(48),o=n(25),i=n(0),a=n(27),c=n(8),u=n(29),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),l=!n&&!f&&a(t),p=!n&&!f&&!l&&u(t),h=n||f||l||p,v=h?r(t.length,String):[],d=v.length;for(var b in t)!e&&!s.call(t,b)||h&&("length"==b||l&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,d))||v.push(b);return v}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(7),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{var r=!(t[c]=void 0)}catch(t){}var o=a.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(3),o=n(17),i=n(4),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(26),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=c}).call(this,n(28)(t))},function(t,e,n){var r=n(58),o=n(59),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(30)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(18);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,a=e?i:-1,c=Object(n);(e?a--:++a<i)&&!1!==o(c[a],a,c););return n}}},function(t,e,n){var r=n(62),o=n(113),i=n(123),a=n(0),c=n(124);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):c(t)}},function(t,e,n){var r=n(63),o=n(112),i=n(37);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(32),o=n(34);t.exports=function(t,e,n,i){var a=n.length,c=a,u=!i;if(null==t)return!c;for(t=Object(t);a--;){var s=n[a];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<c;){var f=(s=n[a])[0],l=t[f],p=s[1];if(u&&s[2]){if(void 0===l&&!(f in t))return!1}else{var h=new r;if(i)var v=i(l,p,f,t,e,h);if(!(void 0===v?o(p,l,3,i,h):v))return!1}}return!0}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(10),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(10);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(10);t.exports=function(t){return-1<r(this.__data__,t)}},function(t,e,n){var r=n(10);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(9);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(9),o=n(19),i=n(20);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(31),o=n(75),i=n(5),a=n(33),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,f=u.toString,l=s.hasOwnProperty,p=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:c).test(a(t))}},function(t,e,n){var r,o=n(76),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(1)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(79),o=n(9),i=n(19);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(80),o=n(81),i=n(82),a=n(83),c=n(84);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(12);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(12);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(13);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(13);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(32),o=n(35),i=n(96),a=n(100),c=n(107),u=n(0),s=n(27),f=n(29),l="[object Arguments]",p="[object Array]",h="[object Object]",v=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,b,g){var y=u(t),_=u(e),x=y?p:c(t),j=_?p:c(e),m=(x=x==l?h:x)==h,O=(j=j==l?h:j)==h,w=x==j;if(w&&s(t)){if(!s(e))return!1;m=!(y=!0)}if(w&&!m)return g=g||new r,y||f(t)?o(t,e,n,d,b,g):i(t,e,x,n,d,b,g);if(!(1&n)){var E=m&&v.call(t,"__wrapped__"),P=O&&v.call(e,"__wrapped__");if(E||P)return b(E?t.value():t,P?e.value():e,n,d,g=g||new r)}return w&&(g=g||new r,a(t,e,n,d,b,g))}},function(t,e,n){var r=n(20),o=n(92),i=n(93);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(7),o=n(97),i=n(11),a=n(35),c=n(98),u=n(99),s=r?r.prototype:void 0,f=s?s.valueOf:void 0;t.exports=function(t,e,n,r,s,l,p){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var h=c;case"[object Set]":var v=1&r;if(h=h||u,t.size!=e.size&&!v)return!1;var d=p.get(t);if(d)return d==e;r|=2,p.set(t,e);var b=a(h(t),h(e),r,s,l,p);return p.delete(t),b;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},function(t,e,n){var r=n(1).Uint8Array;t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(101),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,a,c){var u=1&n,s=r(t),f=s.length;if(f!=r(e).length&&!u)return!1;for(var l=f;l--;){var p=s[l];if(!(u?p in e:o.call(e,p)))return!1}var h=c.get(t);if(h&&c.get(e))return h==e;var v=!0;c.set(t,e),c.set(e,t);for(var d=u;++l<f;){var b=t[p=s[l]],g=e[p];if(i)var y=u?i(g,b,p,e,t,c):i(b,g,p,t,e,c);if(!(void 0===y?b===g||a(b,g,n,i,c):y)){v=!1;break}d=d||"constructor"==p}if(v&&!d){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(v=!1)}return c.delete(t),c.delete(e),v}},function(t,e,n){var r=n(102),o=n(104),i=n(16);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(103),o=n(0);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e,n){var r=n(105),o=n(106),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(108),o=n(19),i=n(109),a=n(110),c=n(111),u=n(3),s=n(33),f="[object Map]",l="[object Promise]",p="[object Set]",h="[object WeakMap]",v="[object DataView]",d=s(r),b=s(o),g=s(i),y=s(a),_=s(c),x=u;(r&&x(new r(new ArrayBuffer(1)))!=v||o&&x(new o)!=f||i&&x(i.resolve())!=l||a&&x(new a)!=p||c&&x(new c)!=h)&&(x=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?s(n):"";if(r)switch(r){case d:return v;case b:return f;case g:return l;case y:return p;case _:return h}return e}),t.exports=x},function(t,e,n){var r=n(2)(n(1),"DataView");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Promise");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Set");t.exports=r},function(t,e,n){var r=n(2)(n(1),"WeakMap");t.exports=r},function(t,e,n){var r=n(36),o=n(16);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var i=e[n],a=t[i];e[n]=[i,a,r(a)]}return e}},function(t,e,n){var r=n(34),o=n(14),i=n(120),a=n(22),c=n(36),u=n(37),s=n(6);t.exports=function(t,e){return a(t)&&c(e)?u(s(t),e):function(n){var a=o(n,t);return void 0===a&&a===e?i(n,t):r(e,a,3)}}},function(t,e,n){var r=n(115),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(116);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(20),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(118);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(7),o=n(119),i=n(0),a=n(23),c=1/0,u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-c?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e,n){var r=n(121),o=n(122);t.exports=function(t,e){return null!=t&&o(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(21),o=n(25),i=n(0),a=n(8),c=n(17),u=n(6);t.exports=function(t,e,n){for(var s=-1,f=(e=r(e,t)).length,l=!1;++s<f;){var p=u(e[s]);if(!(l=null!=t&&n(t,p)))break;t=t[p]}return l||++s!=f?l:!!(f=null==t?0:t.length)&&c(f)&&a(p,f)&&(i(t)||o(t))}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(125),o=n(126),i=n(22),a=n(6);t.exports=function(t){return i(t)?r(a(t)):o(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(38);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(11),o=n(18),i=n(8),a=n(5);t.exports=function(t,e,n){if(!a(n))return!1;var c=typeof e;return!!("number"==c?o(n)&&i(e,n.length):"string"==c&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(30)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(130),o=n(21),i=n(8),a=n(5),c=n(6);t.exports=function(t,e,n,u){if(!a(t))return t;for(var s=-1,f=(e=o(e,t)).length,l=f-1,p=t;null!=p&&++s<f;){var h=c(e[s]),v=n;if(s!=l){var d=p[h];void 0===(v=u?u(d,h,p):void 0)&&(v=a(d)?d:i(e[s+1])?[]:{})}r(p,h,v),p=p[h]}return t}},function(t,e,n){var r=n(131),o=n(11),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(132);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(2),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);t.exports=function(){return n(r),r}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0,o=n;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]]].join("")}},function(t,e,n){n.r(e);var r=n(39),o=n.n(r),i=n(0),a=n.n(i),c=n(15),u=n.n(c),s=n(14),f=n.n(s),l=n(24),p=n.n(l),h=n(40),v=n.n(h);function d(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"default",(function(){return x}));var y,_="__FUNCTION__",x=((y=[{key:"_handleQueue",value:function(){var t=this;this._queue.forEach((function(e){var n=e.message,r=e.msgChan;t._target.postMessage(n,t._targetOrigin,[r.port2])})),this._queue=[]}},{key:"_publish",value:function(t){var e=t.data,n=e.type,r=e.data,o=e.meta,i=this._parseFunction(n,r,o.functionKeys),a=(this._subscribers[n]||[]).map((function(e){return function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return new Promise((function(e,r){try{var o=t.apply(void 0,n);o&&o.then?o.then(e).catch(r):e(o)}catch(e){r(e)}}))}}(e)(i,t.data,t).then((function(t){if(t)return{type:n,data:t}})).catch((function(t){return{type:n,error:t.message}}))}));Promise.all(a).then((function(e){e=e.filter((function(t){return!!t}));var n={};e.forEach((function(t){Object.assign(n,t)})),t.ports[0].postMessage(n)}))}},{key:"_subscribeFunction",value:function(t,e){this.unsubscribe(t),this.subscribe(t,(function(t){return e.apply(void 0,d(t))}))}},{key:"_stringifyFunction",value:function(t,e,n){var r=this,i=2<arguments.length&&void 0!==n?n:[];if(i&&0!==i.length)return i.forEach((function(n){var o=f()(e,n),i="".concat(_).concat(t,"_").concat(n);r._subscribeFunction(i,o),p()(e,n,i)})),{data:e,keys:i};if("function"!=typeof e)return function t(e,n,r){var i=2<arguments.length&&void 0!==r?r:"";return o()(e,(function(r,o){var c="".concat(i,"[").concat(o,"]");return"number"!=typeof o&&(c=i?"".concat(i,".").concat(o):"".concat(o)),!1===n(r,o,e,c)||!u()(r)&&!a()(r)||t(r,n,c)}))}(e,(function(e,n,o,a){if("function"==typeof e){var c="".concat(_).concat(t,"_").concat(a);r._subscribeFunction(c,e),o[n]=c,i.push(a)}})),{data:e,keys:i};var c="".concat(_).concat(t);return this._subscribeFunction(c,e),{data:c,keys:[""]}}},{key:"_parseFunction",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:[];return 0===o.length?e:1===o.length&&""===o[0]?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.postMessage(e,n)}:(o.forEach((function(n){var o=n.replace("".concat(_).concat(t,"_"),""),i=f()(e,o);p()(e,o,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.postMessage(i,e)}))})),e)}},{key:"_subscribe",value:function(t,e){var n=this;this._subscribers[t]||(this._subscribers[t]=[]);var r=this._subscribers[t];e.forEach((function(e){if(r.includes(e)||r.push(e),"connect"===t&&n._isTargetReady){var o={source:n._target};e(o.data,o)}}))}},{key:"subscribe",value:function(t,e){var n=this;"string"!=typeof t&&!u()(t)||"string"==typeof t&&!e||("string"==typeof t&&(t=g({},t,e)),Object.keys(t).forEach((function(e){var r=t[e];"function"==typeof r&&(r=[r]),n._subscribe(e,r)})))}},{key:"unsubscribe",value:function(t,e){if(void 0!==t){var n=this._subscribers[t]||[];if(void 0!==e){var r=n.indexOf(e);-1<r&&n.splice(r,1)}else this._subscribers[t]=[]}else this._subscribers={}}},{key:"postMessage",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:{};return new Promise((function(n,i){var a=new MessageChannel;a.port1.onmessage=function(t){var e=t.data,r=e.data,o=e.error;o?i(new Error(o)):n(r)};var c={type:t,data:e,meta:{id:r._id}},u=o.hasFunction,s=o.functionKeys,f=void 0===s?[]:s;if(!0===u){var l=r._stringifyFunction(t,e,f);c.data=l.data,c.meta.functionKeys=l.keys}r._isTargetReady||"pre_connect"===t?r._target.postMessage(c,r._targetOrigin,[a.port2]):r._queue.push({message:c,msgChan:a})}))}},{key:"_preConnect",value:function(){function t(){o++,n.postMessage("pre_connect",n._id).then((function(t){e&&(clearTimeout(e),e=void 0),r[0]&&(r[0](t),r=[])})).catch((function(t){e&&(clearTimeout(e),e=void 0),r[1]&&(r[1](t),r=[])}))}var e,n=this,r=[],o=0,i=new Promise((function(t,e){r[0]=t,r[1]=e}));return t(),function t(i){!n._isTargetReady&&o>=n._maxAttempts?r[1]&&(r[1](new Error("Exceed the max attempts, connect failed.")),r=[]):e=setTimeout((function(){i(),t(i)}),n._attemptInterval)}(t),i}},{key:"connect",value:function(){var t=this;return this._target?this._isTargetReady?Promise.resolve("Target has already connected."):this._preConnect().then((function(e){return t._targetId=e,t._isTargetReady=!0,t._handleQueue(),t.postMessage("connect")})).catch((function(e){throw t._isTargetReady=!1,e})):Promise.reject(new Error("Target is not exist."))}},{key:"clearQueue",value:function(){this._queue=[]}},{key:"destory",value:function(){this._subscribers={},this._targetOrigin="",this._target=void 0,this._queue=[],this._isTargetReady=!1,window.removeEventListener("message",this._handleMessage)}}])&&b(j.prototype,y),j);function j(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,j),g(this,"_handleMessage",(function(e){if(e.origin===t._targetOrigin||"*"===t._targetOrigin){var n=e.data,r=n.type,o=n.meta;"pre_connect"!==r&&(void 0===o?{}:o).id!==t._targetId||t._publish(e)}})),g(this,"_handlePreConnect",(function(e,n,r){var o=r.source;if(t._target&&t._target!==o)throw new Error("Connection is rejected.");return t._target=o,t._targetId=e,t._id})),g(this,"_handleConnect",(function(e,n,r){t._isTargetReady=!0,t._handleQueue()}));var n=e.targetOrigin,r=void 0===n?"":n,o=e.subscribers,i=void 0===o?{}:o,a=e.target,c=e.attemptInterval,u=void 0===c?1e3:c,s=e.maxAttempts,f=void 0===s?10:s;if(a===window)throw new Error("The target can not be current window.");this._subscribers=i,this._targetOrigin=r,this._target=a,this._queue=[],this._isTargetReady=!1,this._id=v()(),this._targetId="",this._attemptInterval=u,this._maxAttempts=f,this.subscribe("pre_connect",this._handlePreConnect),this.subscribe("connect",this._handleConnect),window.addEventListener("message",this._handleMessage,!1),window.addEventListener("beforeunload",(function(){t.destory()}))}}],t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=135);function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,n}());function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const d=t=>t.toString(16).padStart(2,"0");class b{constructor(t){v(this,"serviceName",""),v(this,"call",void 0),this.call=(e,...n)=>t(this.serviceName,e,...n)}static update(t,e){Object.keys(e).forEach((n=>{t[n]=e[n]}))}update(t){const e=t[this.serviceName];e&&b.update(this,e)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class y extends b{constructor(...t){super(...t),g(this,"serviceName","context")}}class _ extends y{constructor(...t){super(...t),g(this,"productId",void 0),g(this,"cartId",void 0),g(this,"warehouses",void 0),g(this,"meta",void 0)}closePlugin(){return this.call("closePlugin")}closePluginAndAddToCart(){return this.call("closePluginAndAddToCart")}closePluginAndRefreshCart(){return this.call("closePluginAndRefreshCart")}}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class j extends b{constructor(...t){super(...t),x(this,"serviceName","catalog")}fetchCategories(){return this.call("fetchCategories")}fetchProduct(t){return this.call("fetchProduct",t)}}class m extends b{constructor(...t){super(...t),x(this,"serviceName","user"),x(this,"email",void 0),x(this,"id",void 0),x(this,"name",void 0),x(this,"authorities",void 0)}}class O extends b{constructor(...t){super(...t),x(this,"serviceName","tenant"),x(this,"tenantKey",void 0),x(this,"language",void 0),x(this,"currency",void 0)}}class w extends b{constructor(...t){super(...t),x(this,"serviceName","layout"),x(this,"isAsideOpened",void 0)}}class E extends b{constructor(...t){super(...t),x(this,"serviceName","authorization")}getAuthToken(){return this.call("getAuthToken")}}class P extends b{constructor(...t){super(...t),x(this,"serviceName","customer"),x(this,"id",void 0),x(this,"name",void 0)}}class T extends b{constructor(...t){super(...t),x(this,"serviceName","plugin"),x(this,"id",void 0),x(this,"srcUrl",void 0),x(this,"name",void 0)}}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var I;let M;!function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(I||(I={})),function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(M||(M={}));class S extends class{constructor(){var t,e,n;n=void 0,(e="_callbacks")in(t=this)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,this._callbacks={}}on(t,e){void 0===this._callbacks[t]&&(this._callbacks[t]=[]),this._callbacks[t].push(e)}emit(t,...e){if(void 0!==this._callbacks[t])for(let n=0;n<this._callbacks[t].length;n++)this._callbacks[t][n](...e)}}{static log(...t){S.debug&&console.log("[SDK Core] ",...t)}static warn(...t){console.warn("[SDK Core] ",...t)}initializeContextClass(){return this.contextClass?new this.contextClass(this.callFunction.bind(this)):{}}initializeServiceGetters(){this.instances&&Object.keys(this.instances).forEach((t=>{Object.defineProperty(this,t,{get:()=>this.isInitialized?this.instances[t]:null})}))}constructor(t){super(),A(this,"channel",void 0),A(this,"autoheight",!0),A(this,"heightMutationObserver",null),A(this,"origin",void 0),A(this,"isInitialized",!1),A(this,"instances",void 0),A(this,"contextClass",void 0),this.initializeServiceGetters(),this.origin=t.origin,this.channel=new h({targetOrigin:this.origin,target:window.parent}),this.channel.subscribe(s.Message.INIT,(t=>{S.log("Handling INIT message"),Object.entries(this.instances).forEach((([e,n])=>{if(n instanceof b)n.update(t);else{void 0!==t[e]?b.update(n,t[e]):S.warn(`Missing attributes for ${e} in `,t)}})),S.log("Emitting INIT with payload ",this.instances),this.emit(I.INIT,this.instances),this.isInitialized=!0})),this.channel.subscribe(s.Message.UPDATE,(t=>{S.log("Emitting UPDATE with payload ",t),this.emit(I.UPDATE,t)})),this.channel.subscribe(s.Message.FRAME_HEIGHT_REQUEST,(t=>{this.autoheight&&(S.log("Request for iframe height"),this.sendFrameHeight())})),this.channel.connect().then((()=>{S.log("Connected with ONe SDK"),this.autoheight&&this.initializeHeightObserver()})),this.setupOptions(t),S.log("Initialized.")}sendFrameHeight(){const t=document.body,e=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight);this.channel.postMessage(s.Message.FRAME_HEIGHT_CHANGE,n)}initializeHeightObserver(){if("MutationObserver"in window){const t=()=>{this.sendFrameHeight()},e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};this.heightMutationObserver=new MutationObserver(t),S.log("Create body MutationObserver"),this.heightMutationObserver.observe(e,n)}else S.warn("MutationObserver not available. Auto-height functionality disabled.")}setupOptions(t){t&&(void 0!==t.debug&&(S.debug=t.debug),void 0!==t.autoheight&&(this.autoheight=t.autoheight),this.contextClass=t.context)}callFunction(t,e,...n){const r=function(){const t=new Uint8Array(5);return window.crypto.getRandomValues(t),Array.from(t,d).join("")}();return this.isInitialized?(S.log(`Call ID ${r} for ${t}:${e}`,n),this.channel.postMessage(s.Message.METHOD_CALL,{callId:r,service:t,method:e,payload:n}),new Promise(((t,e)=>{const n=o=>{if(o.callId===r)return this.channel.unsubscribe(s.Message.METHOD_RESULT,n),null!=o&&o.isException?e(o.result):t(o.result)};this.channel.subscribe(s.Message.METHOD_RESULT,n)}))):(S.log("SDK is not initialized!"),Promise.resolve(null))}navigate(t){this.channel.postMessage(s.Message.NAVIGATION_PUSH,t)}}A(S,"debug",!1);class k extends S{constructor(...t){super(...t),A(this,"instances",{route:{hash:"",query:{}},catalog:new j(this.callFunction.bind(this)),user:new m(this.callFunction.bind(this)),tenant:new O(this.callFunction.bind(this)),layout:new w(this.callFunction.bind(this)),authorization:new E(this.callFunction.bind(this)),customer:new P(this.callFunction.bind(this)),plugin:new T(this.callFunction.bind(this)),context:this.initializeContextClass()})}}var C=function(){var t=e();return null==t?void 0:t.appContext.config.globalProperties.$one},z={install:function(e,o){if(void 0===o)throw new Error("[SDK Vue3] MISSING_ORIGIN_ERROR");var i=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(null==o?void 0:o.debug)&&console.log("[SDK Vue3] ".concat(e.join(" ")))},a=new k(o),c=t(function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({isInitialized:!1,navigate:a.navigate},a.instances)),u=function(t){c.route=t.route,c.user.update(t),c.tenant.update(t),c.layout.update(t),c.catalog.update(t),c.authorization.update(t),c.customer.update(t),c.plugin.update(t),c.context.update(t)};a.on(M.INIT,(function(t){i("Handling INIT "),c.isInitialized||(c.isInitialized=!0,u(t))})),a.on(M.UPDATE,(function(t){i("Handling UPDATE"),u(t)})),e.config.globalProperties.$one=c}};export{_ as AddToCartContext,z as default,C as useOneSdk};
1
+ import{reactive as t,getCurrentInstance as e}from"vue";function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var a,c,u,s={},f={};a=f,Object.defineProperty(a,"__esModule",{value:!0}),a.Errors=a.Message=void 0,(c=a.Message||(a.Message={})).INIT="one:init",c.UPDATE="one:update",c.METHOD_CALL="one:method:call",c.METHOD_CALL_ERROR="one:method:error",c.METHOD_RESULT="one:method:result",c.NAVIGATION_PUSH="one:navigation:push",c.FRAME_HEIGHT_REQUEST="one:frameheight:request",c.FRAME_HEIGHT_CHANGE="one:frameheight:change",(u=a.Errors||(a.Errors={})).METHOD_DOES_NOT_EXISTS="Method does not exists",u.SERVICE_DOES_NOT_EXISTS="Service does not exists";var l={};Object.defineProperty(l,"__esModule",{value:!0}),function(t){var e=o&&o.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=o&&o.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(f,t),n(l,t)}(s);var p={exports:{}};window;var h=i(p.exports=function(){return n={},t.m=e=[function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(26),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(74),o=n(77);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(7),o=n(51),i=n(52),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(23);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(1).Symbol;t.exports=r},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&-1<t&&t%1==0&&t<e}},function(t,e,n){var r=n(64),o=n(65),i=n(66),a=n(67),c=n(68);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(11);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(2)(Object,"create");t.exports=r},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(38);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(3),o=n(128),i=n(4),a=Function.prototype,c=Object.prototype,u=a.toString,s=c.hasOwnProperty,f=u.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==f}},function(t,e,n){var r=n(47),o=n(57),i=n(18);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(31),o=n(17);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(2)(n(1),"Map");t.exports=r},function(t,e,n){var r=n(78),o=n(85),i=n(87),a=n(88),c=n(89);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(0),o=n(22),i=n(114),a=n(117);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e,n){var r=n(0),o=n(23),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(129);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e,n){var r=n(49),o=n(4),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=u},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(50))},function(t,e,n){(function(t){var r=n(1),o=n(53),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i?r.Buffer:void 0,u=(c?c.isBuffer:void 0)||o;t.exports=u}).call(this,n(28)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(54),o=n(55),i=n(56),a=i&&i.isTypedArray,c=a?o(a):r;t.exports=c},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(3),o=n(5);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(9),o=n(69),i=n(70),a=n(71),c=n(72),u=n(73);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,t.exports=s},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(90),o=n(4);t.exports=function t(e,n,i,a,c){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,c))}},function(t,e,n){var r=n(91),o=n(94),i=n(95);t.exports=function(t,e,n,a,c,u){var s=1&n,f=t.length,l=e.length;if(f!=l&&!(s&&f<l))return!1;var p=u.get(t);if(p&&u.get(e))return p==e;var h=-1,v=!0,d=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h<f;){var b=t[h],g=e[h];if(a)var y=s?a(g,b,h,e,t,u):a(b,g,h,t,e,u);if(void 0!==y){if(y)continue;v=!1;break}if(d){if(!o(e,(function(t,e){if(!i(d,e)&&(b===t||c(b,t,n,a,u)))return d.push(e)}))){v=!1;break}}else if(b!==g&&!c(b,g,n,a,u)){v=!1;break}}return u.delete(t),u.delete(e),v}},function(t,e,n){var r=n(5);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(21),o=n(6);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},function(t,e,n){var r=n(41),o=n(42),i=n(61),a=n(0),c=n(127);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&c(t,e,n)&&(e=void 0),u(t,i(e,3))}},function(t,e,n){var r,o,i=n(133),a=n(134),c=0,u=0;t.exports=function(t,e,n){var s=e&&n||0,f=e||[],l=(t=t||{}).node||r,p=void 0!==t.clockseq?t.clockseq:o;if(null==l||null==p){var h=i();null==l&&(l=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=o=16383&(h[6]<<8|h[7]))}var v=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,b=v-c+(d-u)/1e4;if(b<0&&void 0===t.clockseq&&(p=p+1&16383),(b<0||c<v)&&void 0===t.nsecs&&(d=0),1e4<=d)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=v,o=p;var g=(1e4*(268435455&(v+=122192928e5))+(u=d))%4294967296;f[s++]=g>>>24&255,f[s++]=g>>>16&255,f[s++]=g>>>8&255,f[s++]=255&g;var y=v/4294967296*1e4&268435455;f[s++]=y>>>8&255,f[s++]=255&y,f[s++]=y>>>24&15|16,f[s++]=y>>>16&255,f[s++]=p>>>8|128,f[s++]=255&p;for(var _=0;_<6;++_)f[s+_]=l[_];return e||a(f)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}},function(t,e,n){var r=n(43);t.exports=function(t,e){var n=!0;return r(t,(function(t,r,o){return n=!!e(t,r,o)})),n}},function(t,e,n){var r=n(44),o=n(60)(r);t.exports=o},function(t,e,n){var r=n(45),o=n(16);t.exports=function(t,e){return t&&r(t,e,o)}},function(t,e,n){var r=n(46)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),c=a.length;c--;){var u=a[t?c:++o];if(!1===n(i[u],u,i))break}return e}}},function(t,e,n){var r=n(48),o=n(25),i=n(0),a=n(27),c=n(8),u=n(29),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),l=!n&&!f&&a(t),p=!n&&!f&&!l&&u(t),h=n||f||l||p,v=h?r(t.length,String):[],d=v.length;for(var b in t)!e&&!s.call(t,b)||h&&("length"==b||l&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,d))||v.push(b);return v}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(7),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{var r=!(t[c]=void 0)}catch(t){}var o=a.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(3),o=n(17),i=n(4),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(26),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=c}).call(this,n(28)(t))},function(t,e,n){var r=n(58),o=n(59),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(30)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(18);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,a=e?i:-1,c=Object(n);(e?a--:++a<i)&&!1!==o(c[a],a,c););return n}}},function(t,e,n){var r=n(62),o=n(113),i=n(123),a=n(0),c=n(124);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):c(t)}},function(t,e,n){var r=n(63),o=n(112),i=n(37);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(32),o=n(34);t.exports=function(t,e,n,i){var a=n.length,c=a,u=!i;if(null==t)return!c;for(t=Object(t);a--;){var s=n[a];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<c;){var f=(s=n[a])[0],l=t[f],p=s[1];if(u&&s[2]){if(void 0===l&&!(f in t))return!1}else{var h=new r;if(i)var v=i(l,p,f,t,e,h);if(!(void 0===v?o(p,l,3,i,h):v))return!1}}return!0}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(10),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(10);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(10);t.exports=function(t){return-1<r(this.__data__,t)}},function(t,e,n){var r=n(10);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(9);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(9),o=n(19),i=n(20);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(31),o=n(75),i=n(5),a=n(33),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,f=u.toString,l=s.hasOwnProperty,p=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:c).test(a(t))}},function(t,e,n){var r,o=n(76),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(1)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(79),o=n(9),i=n(19);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(80),o=n(81),i=n(82),a=n(83),c=n(84);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(12);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(12);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(13);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(13);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(32),o=n(35),i=n(96),a=n(100),c=n(107),u=n(0),s=n(27),f=n(29),l="[object Arguments]",p="[object Array]",h="[object Object]",v=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,b,g){var y=u(t),_=u(e),x=y?p:c(t),j=_?p:c(e),m=(x=x==l?h:x)==h,O=(j=j==l?h:j)==h,w=x==j;if(w&&s(t)){if(!s(e))return!1;m=!(y=!0)}if(w&&!m)return g=g||new r,y||f(t)?o(t,e,n,d,b,g):i(t,e,x,n,d,b,g);if(!(1&n)){var E=m&&v.call(t,"__wrapped__"),P=O&&v.call(e,"__wrapped__");if(E||P)return b(E?t.value():t,P?e.value():e,n,d,g=g||new r)}return w&&(g=g||new r,a(t,e,n,d,b,g))}},function(t,e,n){var r=n(20),o=n(92),i=n(93);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(7),o=n(97),i=n(11),a=n(35),c=n(98),u=n(99),s=r?r.prototype:void 0,f=s?s.valueOf:void 0;t.exports=function(t,e,n,r,s,l,p){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var h=c;case"[object Set]":var v=1&r;if(h=h||u,t.size!=e.size&&!v)return!1;var d=p.get(t);if(d)return d==e;r|=2,p.set(t,e);var b=a(h(t),h(e),r,s,l,p);return p.delete(t),b;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},function(t,e,n){var r=n(1).Uint8Array;t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(101),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,a,c){var u=1&n,s=r(t),f=s.length;if(f!=r(e).length&&!u)return!1;for(var l=f;l--;){var p=s[l];if(!(u?p in e:o.call(e,p)))return!1}var h=c.get(t);if(h&&c.get(e))return h==e;var v=!0;c.set(t,e),c.set(e,t);for(var d=u;++l<f;){var b=t[p=s[l]],g=e[p];if(i)var y=u?i(g,b,p,e,t,c):i(b,g,p,t,e,c);if(!(void 0===y?b===g||a(b,g,n,i,c):y)){v=!1;break}d=d||"constructor"==p}if(v&&!d){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(v=!1)}return c.delete(t),c.delete(e),v}},function(t,e,n){var r=n(102),o=n(104),i=n(16);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(103),o=n(0);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e,n){var r=n(105),o=n(106),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(108),o=n(19),i=n(109),a=n(110),c=n(111),u=n(3),s=n(33),f="[object Map]",l="[object Promise]",p="[object Set]",h="[object WeakMap]",v="[object DataView]",d=s(r),b=s(o),g=s(i),y=s(a),_=s(c),x=u;(r&&x(new r(new ArrayBuffer(1)))!=v||o&&x(new o)!=f||i&&x(i.resolve())!=l||a&&x(new a)!=p||c&&x(new c)!=h)&&(x=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?s(n):"";if(r)switch(r){case d:return v;case b:return f;case g:return l;case y:return p;case _:return h}return e}),t.exports=x},function(t,e,n){var r=n(2)(n(1),"DataView");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Promise");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Set");t.exports=r},function(t,e,n){var r=n(2)(n(1),"WeakMap");t.exports=r},function(t,e,n){var r=n(36),o=n(16);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var i=e[n],a=t[i];e[n]=[i,a,r(a)]}return e}},function(t,e,n){var r=n(34),o=n(14),i=n(120),a=n(22),c=n(36),u=n(37),s=n(6);t.exports=function(t,e){return a(t)&&c(e)?u(s(t),e):function(n){var a=o(n,t);return void 0===a&&a===e?i(n,t):r(e,a,3)}}},function(t,e,n){var r=n(115),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(116);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(20),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(118);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(7),o=n(119),i=n(0),a=n(23),c=1/0,u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-c?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e,n){var r=n(121),o=n(122);t.exports=function(t,e){return null!=t&&o(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(21),o=n(25),i=n(0),a=n(8),c=n(17),u=n(6);t.exports=function(t,e,n){for(var s=-1,f=(e=r(e,t)).length,l=!1;++s<f;){var p=u(e[s]);if(!(l=null!=t&&n(t,p)))break;t=t[p]}return l||++s!=f?l:!!(f=null==t?0:t.length)&&c(f)&&a(p,f)&&(i(t)||o(t))}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(125),o=n(126),i=n(22),a=n(6);t.exports=function(t){return i(t)?r(a(t)):o(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(38);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(11),o=n(18),i=n(8),a=n(5);t.exports=function(t,e,n){if(!a(n))return!1;var c=typeof e;return!!("number"==c?o(n)&&i(e,n.length):"string"==c&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(30)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(130),o=n(21),i=n(8),a=n(5),c=n(6);t.exports=function(t,e,n,u){if(!a(t))return t;for(var s=-1,f=(e=o(e,t)).length,l=f-1,p=t;null!=p&&++s<f;){var h=c(e[s]),v=n;if(s!=l){var d=p[h];void 0===(v=u?u(d,h,p):void 0)&&(v=a(d)?d:i(e[s+1])?[]:{})}r(p,h,v),p=p[h]}return t}},function(t,e,n){var r=n(131),o=n(11),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(132);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(2),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);t.exports=function(){return n(r),r}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0,o=n;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]]].join("")}},function(t,e,n){n.r(e);var r=n(39),o=n.n(r),i=n(0),a=n.n(i),c=n(15),u=n.n(c),s=n(14),f=n.n(s),l=n(24),p=n.n(l),h=n(40),v=n.n(h);function d(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"default",(function(){return x}));var y,_="__FUNCTION__",x=((y=[{key:"_handleQueue",value:function(){var t=this;this._queue.forEach((function(e){var n=e.message,r=e.msgChan;t._target.postMessage(n,t._targetOrigin,[r.port2])})),this._queue=[]}},{key:"_publish",value:function(t){var e=t.data,n=e.type,r=e.data,o=e.meta,i=this._parseFunction(n,r,o.functionKeys),a=(this._subscribers[n]||[]).map((function(e){return function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return new Promise((function(e,r){try{var o=t.apply(void 0,n);o&&o.then?o.then(e).catch(r):e(o)}catch(e){r(e)}}))}}(e)(i,t.data,t).then((function(t){if(t)return{type:n,data:t}})).catch((function(t){return{type:n,error:t.message}}))}));Promise.all(a).then((function(e){e=e.filter((function(t){return!!t}));var n={};e.forEach((function(t){Object.assign(n,t)})),t.ports[0].postMessage(n)}))}},{key:"_subscribeFunction",value:function(t,e){this.unsubscribe(t),this.subscribe(t,(function(t){return e.apply(void 0,d(t))}))}},{key:"_stringifyFunction",value:function(t,e,n){var r=this,i=2<arguments.length&&void 0!==n?n:[];if(i&&0!==i.length)return i.forEach((function(n){var o=f()(e,n),i="".concat(_).concat(t,"_").concat(n);r._subscribeFunction(i,o),p()(e,n,i)})),{data:e,keys:i};if("function"!=typeof e)return function t(e,n,r){var i=2<arguments.length&&void 0!==r?r:"";return o()(e,(function(r,o){var c="".concat(i,"[").concat(o,"]");return"number"!=typeof o&&(c=i?"".concat(i,".").concat(o):"".concat(o)),!1===n(r,o,e,c)||!u()(r)&&!a()(r)||t(r,n,c)}))}(e,(function(e,n,o,a){if("function"==typeof e){var c="".concat(_).concat(t,"_").concat(a);r._subscribeFunction(c,e),o[n]=c,i.push(a)}})),{data:e,keys:i};var c="".concat(_).concat(t);return this._subscribeFunction(c,e),{data:c,keys:[""]}}},{key:"_parseFunction",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:[];return 0===o.length?e:1===o.length&&""===o[0]?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.postMessage(e,n)}:(o.forEach((function(n){var o=n.replace("".concat(_).concat(t,"_"),""),i=f()(e,o);p()(e,o,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.postMessage(i,e)}))})),e)}},{key:"_subscribe",value:function(t,e){var n=this;this._subscribers[t]||(this._subscribers[t]=[]);var r=this._subscribers[t];e.forEach((function(e){if(r.includes(e)||r.push(e),"connect"===t&&n._isTargetReady){var o={source:n._target};e(o.data,o)}}))}},{key:"subscribe",value:function(t,e){var n=this;"string"!=typeof t&&!u()(t)||"string"==typeof t&&!e||("string"==typeof t&&(t=g({},t,e)),Object.keys(t).forEach((function(e){var r=t[e];"function"==typeof r&&(r=[r]),n._subscribe(e,r)})))}},{key:"unsubscribe",value:function(t,e){if(void 0!==t){var n=this._subscribers[t]||[];if(void 0!==e){var r=n.indexOf(e);-1<r&&n.splice(r,1)}else this._subscribers[t]=[]}else this._subscribers={}}},{key:"postMessage",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:{};return new Promise((function(n,i){var a=new MessageChannel;a.port1.onmessage=function(t){var e=t.data,r=e.data,o=e.error;o?i(new Error(o)):n(r)};var c={type:t,data:e,meta:{id:r._id}},u=o.hasFunction,s=o.functionKeys,f=void 0===s?[]:s;if(!0===u){var l=r._stringifyFunction(t,e,f);c.data=l.data,c.meta.functionKeys=l.keys}r._isTargetReady||"pre_connect"===t?r._target.postMessage(c,r._targetOrigin,[a.port2]):r._queue.push({message:c,msgChan:a})}))}},{key:"_preConnect",value:function(){function t(){o++,n.postMessage("pre_connect",n._id).then((function(t){e&&(clearTimeout(e),e=void 0),r[0]&&(r[0](t),r=[])})).catch((function(t){e&&(clearTimeout(e),e=void 0),r[1]&&(r[1](t),r=[])}))}var e,n=this,r=[],o=0,i=new Promise((function(t,e){r[0]=t,r[1]=e}));return t(),function t(i){!n._isTargetReady&&o>=n._maxAttempts?r[1]&&(r[1](new Error("Exceed the max attempts, connect failed.")),r=[]):e=setTimeout((function(){i(),t(i)}),n._attemptInterval)}(t),i}},{key:"connect",value:function(){var t=this;return this._target?this._isTargetReady?Promise.resolve("Target has already connected."):this._preConnect().then((function(e){return t._targetId=e,t._isTargetReady=!0,t._handleQueue(),t.postMessage("connect")})).catch((function(e){throw t._isTargetReady=!1,e})):Promise.reject(new Error("Target is not exist."))}},{key:"clearQueue",value:function(){this._queue=[]}},{key:"destory",value:function(){this._subscribers={},this._targetOrigin="",this._target=void 0,this._queue=[],this._isTargetReady=!1,window.removeEventListener("message",this._handleMessage)}}])&&b(j.prototype,y),j);function j(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,j),g(this,"_handleMessage",(function(e){if(e.origin===t._targetOrigin||"*"===t._targetOrigin){var n=e.data,r=n.type,o=n.meta;"pre_connect"!==r&&(void 0===o?{}:o).id!==t._targetId||t._publish(e)}})),g(this,"_handlePreConnect",(function(e,n,r){var o=r.source;if(t._target&&t._target!==o)throw new Error("Connection is rejected.");return t._target=o,t._targetId=e,t._id})),g(this,"_handleConnect",(function(e,n,r){t._isTargetReady=!0,t._handleQueue()}));var n=e.targetOrigin,r=void 0===n?"":n,o=e.subscribers,i=void 0===o?{}:o,a=e.target,c=e.attemptInterval,u=void 0===c?1e3:c,s=e.maxAttempts,f=void 0===s?10:s;if(a===window)throw new Error("The target can not be current window.");this._subscribers=i,this._targetOrigin=r,this._target=a,this._queue=[],this._isTargetReady=!1,this._id=v()(),this._targetId="",this._attemptInterval=u,this._maxAttempts=f,this.subscribe("pre_connect",this._handlePreConnect),this.subscribe("connect",this._handleConnect),window.addEventListener("message",this._handleMessage,!1),window.addEventListener("beforeunload",(function(){t.destory()}))}}],t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=135);function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,n}());function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const d=t=>t.toString(16).padStart(2,"0");class b{constructor(t){v(this,"serviceName",""),v(this,"call",void 0),this.call=(e,...n)=>t(this.serviceName,e,...n)}static update(t,e){Object.keys(e).forEach((n=>{t[n]=e[n]}))}update(t){const e=t[this.serviceName];e&&b.update(this,e)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class y extends b{constructor(...t){super(...t),g(this,"serviceName","context")}}class _ extends y{constructor(...t){super(...t),g(this,"productId",void 0),g(this,"cartId",void 0),g(this,"warehouses",void 0),g(this,"meta",void 0)}closePlugin(){return this.call("closePlugin")}closePluginAndAddToCart(){return this.call("closePluginAndAddToCart")}closePluginAndRefreshCart(){return this.call("closePluginAndRefreshCart")}}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class j extends b{constructor(...t){super(...t),x(this,"serviceName","catalog")}fetchCategories(){return this.call("fetchCategories")}fetchProduct(t){return this.call("fetchProduct",t)}}class m extends b{constructor(...t){super(...t),x(this,"serviceName","user"),x(this,"email",void 0),x(this,"id",void 0),x(this,"name",void 0),x(this,"authorities",void 0)}}class O extends b{constructor(...t){super(...t),x(this,"serviceName","tenant"),x(this,"tenantKey",void 0),x(this,"language",void 0),x(this,"currency",void 0)}}class w extends b{constructor(...t){super(...t),x(this,"serviceName","layout"),x(this,"isAsideOpened",void 0)}}class E extends b{constructor(...t){super(...t),x(this,"serviceName","authorization")}getAuthToken(){return this.call("getAuthToken")}}class P extends b{constructor(...t){super(...t),x(this,"serviceName","customer"),x(this,"id",void 0),x(this,"name",void 0)}}class T extends b{constructor(...t){super(...t),x(this,"serviceName","plugin"),x(this,"id",void 0),x(this,"srcUrl",void 0),x(this,"name",void 0)}}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var I;let M;!function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(I||(I={})),function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(M||(M={}));class S extends class{constructor(){var t,e,n;n=void 0,(e="_callbacks")in(t=this)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,this._callbacks={}}on(t,e){void 0===this._callbacks[t]&&(this._callbacks[t]=[]),this._callbacks[t].push(e)}emit(t,...e){if(void 0!==this._callbacks[t])for(let n=0;n<this._callbacks[t].length;n++)this._callbacks[t][n](...e)}}{static log(...t){S.debug&&console.log("[SDK Core] ",...t)}static warn(...t){console.warn("[SDK Core] ",...t)}initializeContextClass(){return this.contextClass?new this.contextClass(this.callFunction.bind(this)):{}}initializeServiceGetters(){this.instances&&Object.keys(this.instances).forEach((t=>{Object.defineProperty(this,t,{get:()=>this.isInitialized?this.instances[t]:null})}))}constructor(t){super(),A(this,"channel",void 0),A(this,"autoheight",!0),A(this,"heightMutationObserver",null),A(this,"origin",void 0),A(this,"isInitialized",!1),A(this,"instances",void 0),A(this,"contextClass",void 0),this.initializeServiceGetters(),this.origin=t.origin,this.channel=new h({targetOrigin:this.origin,target:window.parent}),this.channel.subscribe(s.Message.INIT,(t=>{S.log("Handling INIT message"),Object.entries(this.instances).forEach((([e,n])=>{if(n instanceof b)n.update(t);else{void 0!==t[e]?b.update(n,t[e]):S.warn(`Missing attributes for ${e} in `,t)}})),S.log("Emitting INIT with payload ",this.instances),this.isInitialized=!0,this.emit(I.INIT,this.instances)})),this.channel.subscribe(s.Message.UPDATE,(t=>{S.log("Emitting UPDATE with payload ",t),this.emit(I.UPDATE,t)})),this.channel.subscribe(s.Message.FRAME_HEIGHT_REQUEST,(t=>{this.autoheight&&(S.log("Request for iframe height"),this.sendFrameHeight())})),this.channel.connect().then((()=>{S.log("Connected with ONe SDK"),this.autoheight&&this.initializeHeightObserver()})),this.setupOptions(t),S.log("Initialized.")}sendFrameHeight(){const t=document.body,e=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight);this.channel.postMessage(s.Message.FRAME_HEIGHT_CHANGE,n)}initializeHeightObserver(){if("MutationObserver"in window){const t=()=>{this.sendFrameHeight()},e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};this.heightMutationObserver=new MutationObserver(t),S.log("Create body MutationObserver"),this.heightMutationObserver.observe(e,n)}else S.warn("MutationObserver not available. Auto-height functionality disabled.")}setupOptions(t){t&&(void 0!==t.debug&&(S.debug=t.debug),void 0!==t.autoheight&&(this.autoheight=t.autoheight),this.contextClass=t.context)}callFunction(t,e,...n){const r=function(){const t=new Uint8Array(5);return window.crypto.getRandomValues(t),Array.from(t,d).join("")}();return this.isInitialized?(S.log(`Call ID ${r} for ${t}:${e}`,n),this.channel.postMessage(s.Message.METHOD_CALL,{callId:r,service:t,method:e,payload:n}),new Promise(((t,e)=>{const n=o=>{if(o.callId===r)return this.channel.unsubscribe(s.Message.METHOD_RESULT,n),null!=o&&o.isException?e(o.result):t(o.result)};this.channel.subscribe(s.Message.METHOD_RESULT,n)}))):(S.log("SDK is not initialized!"),Promise.resolve(null))}navigate(t){this.channel.postMessage(s.Message.NAVIGATION_PUSH,t)}}A(S,"debug",!1);class k extends S{constructor(...t){super(...t),A(this,"instances",{route:{hash:"",query:{}},catalog:new j(this.callFunction.bind(this)),user:new m(this.callFunction.bind(this)),tenant:new O(this.callFunction.bind(this)),layout:new w(this.callFunction.bind(this)),authorization:new E(this.callFunction.bind(this)),customer:new P(this.callFunction.bind(this)),plugin:new T(this.callFunction.bind(this)),context:this.initializeContextClass()})}}var C=function(){var t=e();return null==t?void 0:t.appContext.config.globalProperties.$one},z={install:function(e,o){if(void 0===o)throw new Error("[SDK Vue3] MISSING_ORIGIN_ERROR");var i=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(null==o?void 0:o.debug)&&console.log("[SDK Vue3] ".concat(e.join(" ")))},a=new k(o),c=t(function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({isInitialized:!1,navigate:a.navigate},a.instances)),u=function(t){c.route=t.route,c.user.update(t),c.tenant.update(t),c.layout.update(t),c.catalog.update(t),c.authorization.update(t),c.customer.update(t),c.plugin.update(t),c.context.update(t)};a.on(M.INIT,(function(t){i("Handling INIT "),c.isInitialized||(c.isInitialized=!0,u(t))})),a.on(M.UPDATE,(function(t){i("Handling UPDATE"),u(t)})),e.config.globalProperties.$one=c}};export{_ as AddToCartContext,z as default,C as useOneSdk};
2
2
  //# sourceMappingURL=bundle.esm.min.js.map