@one-commerce/sdk-backoffice-vue3 2.3.11 → 2.4.3

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,s,u={},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",(s=a.Errors||(a.Errors={})).METHOD_DOES_NOT_EXISTS="Method does not exists",s.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);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}: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)}(u);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);n="object"==typeof self&&self&&self.Object===Object&&self,n=r||n||Function("return this")(),t.exports=n},function(t,e,n){var r=n(74),o=n(77);t.exports=function(t,e){return e=o(t,e),r(e)?e:void 0}},function(t,e,n){var r=n(8),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: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(3),o=n(128),i=n(4),a=Function.prototype,c=(n=Object.prototype,a.toString),s=n.hasOwnProperty,u=c.call(Object);t.exports=function(t){return!(!i(t)||"[object Object]"!=r(t))&&(null===(t=o(t))||"function"==typeof(t=s.call(t,"constructor")&&t.constructor)&&t instanceof t&&c.call(t)==u)}},function(t,e,n){n=n(1).Symbol,t.exports=n},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);function c(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])}}n=n(68),c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=n,t.exports=c},function(t,e,n){var r=n(12);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){n=n(2)(Object,"create"),t.exports=n},function(t,e,n){var r=n(86);t.exports=function(t,e){return t=t.__data__,r(e)?t["string"==typeof e?"string":"hash"]:t.map}},function(t,e,n){var r=n(38);t.exports=function(t,e,n){return void 0===(e=null==t?void 0:r(t,e))?n:e}},function(t,e,n){var r=n(47),o=n(57),i=n(18);t.exports=function(t){return(i(t)?r: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){n=n(2)(n(1),"Map"),t.exports=n},function(t,e,n){var r=n(78),o=n(85),i=n(87),a=n(88);function c(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])}}n=n(89),c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=n,t.exports=c},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=(n=Object.prototype).hasOwnProperty,a=n.propertyIsEnumerable;r=r(function(){return arguments}())?r:function(t){return o(t)&&i.call(t,"callee")&&!a.call(t,"callee")},t.exports=r},function(t,e,n){(function(e){e="object"==typeof e&&e&&e.Object===Object&&e,t.exports=e}).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;r=(r=a&&a.exports===i?r.Buffer:void 0)?r.isBuffer:void 0,t.exports=r||o}).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);r=(n=(n=n(56))&&n.isTypedArray)?o(n):r,t.exports=r},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){return!!o(t)&&("[object Function]"==(t=r(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}},function(t,e,n){var r=n(10),o=n(69),i=n(70),a=n(71),c=n(72);function s(t){t=this.__data__=new r(t),this.size=t.size}n=n(73),s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=n,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,s){var u=1&n,f=t.length;if(f!=(p=e.length)&&!(u&&f<p))return!1;var l=s.get(t),p=s.get(e);if(l&&p)return l==e&&p==t;var h=-1,d=!0,v=2&n?new r:void 0;for(s.set(t,e),s.set(e,t);++h<f;){var b,g=t[h],y=e[h];if(void 0!==(b=a?u?a(y,g,h,e,t,s):a(g,y,h,t,e,s):b)){if(b)continue;d=!1;break}if(v){if(!o(e,(function(t,e){if(!i(v,e)&&(g===t||c(g,t,n,a,s)))return v.push(e)}))){d=!1;break}}else if(g!==y&&!c(g,y,n,a,s)){d=!1;break}}return s.delete(t),s.delete(e),d}},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 s=a(t)?r:o;return n&&c(t,e,n)&&(e=void 0),s(t,i(e,3))}},function(t,e,n){var r,o,i=n(133),a=n(134),c=0,s=0;t.exports=function(t,e,n){var u=e&&n||0,f=e||[],l=(t=t||{}).node||r,p=void 0!==t.clockseq?t.clockseq:o;null!=l&&null!=p||(d=i(),null==l&&(l=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==p&&(p=o=16383&(d[6]<<8|d[7])));var h=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=(n=void 0!==t.nsecs?t.nsecs:s+1,h-c+(n-s)/1e4);if(d<0&&void 0===t.clockseq&&(p=p+1&16383),1e4<=(n=(d<0||c<h)&&void 0===t.nsecs?0:n))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,o=p,n=(1e4*(268435455&(h+=122192928e5))+(s=n))%4294967296,f[u++]=n>>>24&255,f[u++]=n>>>16&255,f[u++]=n>>>8&255,f[u++]=255&n,h=h/4294967296*1e4&268435455,f[u++]=h>>>8&255,f[u++]=255&h,f[u++]=h>>>24&15|16,f[u++]=h>>>16&255,f[u++]=p>>>8|128,f[u++]=255&p;for(var v=0;v<6;++v)f[u+v]=l[v];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);r=n(60)(r),t.exports=r},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){n=n(46)(),t.exports=n},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 s=a[t?c:++o];if(!1===n(i[s],s,i))break}return e}}},function(t,e,n){var r=n(48),o=n(25),i=n(0),a=n(27),c=n(9),s=n(29),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n,f=i(t),l=!f&&o(t),p=!f&&!l&&a(t),h=!f&&!l&&!p&&s(t),d=f||l||p||h,v=d?r(t.length,String):[],b=v.length;for(n in t)!e&&!u.call(t,n)||d&&("length"==n||p&&("offset"==n||"parent"==n)||h&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||c(n,b))||v.push(n);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=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(8),o=(n=Object.prototype).hasOwnProperty,i=n.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{var r=!(t[a]=void 0)}catch(t){}var c=i.call(t);return r&&(e?t[a]=n:delete t[a]),c}},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;r=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}(),t.exports=r}).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,n=[];for(e in Object(t))i.call(t,e)&&"constructor"!=e&&n.push(e);return n}},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){n=n(30)(Object.keys,Object),t.exports=n},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,s=!i;if(null==t)return!c;for(t=Object(t);a--;){var u=n[a];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<c;){var f=(u=n[a])[0],l=t[f],p=u[1];if(s&&u[2]){if(void 0===l&&!(f in t))return!1}else{var h,d=new r;if(!(void 0===(h=i?i(l,p,f,t,e,d):h)?o(p,l,3,i,d):h))return!1}}return!0}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(11),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__;return!((t=r(e,t))<0||(t==e.length-1?e.pop():o.call(e,t,1),--this.size,0))}},function(t,e,n){var r=n(11);t.exports=function(t){var e=this.__data__;return(t=r(e,t))<0?void 0:e[t][1]}},function(t,e,n){var r=n(11);t.exports=function(t){return-1<r(this.__data__,t)}},function(t,e,n){var r=n(11);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(10);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__;return t=e.delete(t),this.size=e.size,t}},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(10),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\]$/,s=Function.prototype,u=(n=Object.prototype,s=s.toString,n=n.hasOwnProperty,RegExp("^"+s.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"));t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?u:c).test(a(t))}},function(t,e,n){n=n(76);var r=(n=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!r&&r in t}},function(t,e,n){n=n(1)["__core-js_shared__"],t.exports=n},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(10),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);function c(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])}}n=n(84),c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=n,t.exports=c},function(t,e,n){var r=n(13);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}},function(t,e,n){var r=n(13),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(13),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(13);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(14);t.exports=function(t){return t=r(this,t).delete(t),this.size-=t?1:0,t}},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(14);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(14);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(14);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),s=n(0),u=n(27),f=n(29),l="[object Arguments]",p="[object Array]",h="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,b,g){var y=s(t),_=s(e),x=y?p:c(t),m=_?p:c(e),O=(x=x==l?h:x)==h;if(_=(m=m==l?h:m)==h,(m=x==m)&&u(t)){if(!u(e))return!1;O=!(y=!0)}return m&&!O?(g=g||new r,y||f(t)?o(t,e,n,v,b,g):i(t,e,x,n,v,b,g)):1&n||(O=O&&d.call(t,"__wrapped__"),_=_&&d.call(e,"__wrapped__"),!O&&!_)?!!m&&(g=g||new r,a(t,e,n,v,b,g)):b(O?t.value():t,_?e.value():e,n,v,g=g||new r)}},function(t,e,n){var r=n(20),o=n(92);function i(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}n=n(93),i.prototype.add=i.prototype.push=o,i.prototype.has=n,t.exports=i},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(8),o=n(97),i=n(12),a=n(35),c=n(98),s=n(99),u=(r=r?r.prototype:void 0)?r.valueOf:void 0;t.exports=function(t,e,n,r,f,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]":if(h=h||s,t.size!=e.size&&!(1&r))return!1;var d=p.get(t);return d?d==e:(r|=2,p.set(t,e),h=a(h(t),h(e),r,f,l,p),p.delete(t),h);case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},function(t,e,n){n=n(1).Uint8Array,t.exports=n},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 s=1&n,u=r(t),f=u.length;if(f!=r(e).length&&!s)return!1;for(var l=f;l--;){var p=u[l];if(!(s?p in e:o.call(e,p)))return!1}var h=c.get(t),d=c.get(e);if(h&&d)return h==e&&d==t;var v=!0;c.set(t,e),c.set(e,t);for(var b=s;++l<f;){var g,y=t[p=u[l]],_=e[p];if(!(void 0===(g=i?s?i(_,y,p,e,t,c):i(y,_,p,t,e,c):g)?y===_||a(y,_,n,i,c):g)){v=!1;break}b=b||"constructor"==p}return!v||b||(h=t.constructor)!=(d=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof h&&h instanceof h&&"function"==typeof d&&d instanceof d)&&(v=!1),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){return e=e(t),o(t)?e:r(e,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=n(106),Object.prototype.propertyIsEnumerable),i=Object.getOwnPropertySymbols;t.exports=i?function(t){return null==t?[]:(t=Object(t),r(i(t),(function(e){return o.call(t,e)})))}:n},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),s=n(3),u=n(33),f="[object Map]",l="[object Promise]",p="[object Set]",h="[object WeakMap]",d="[object DataView]",v=u(r),b=u(o),g=u(i),y=u(a),_=u(c);n=s,(r&&n(new r(new ArrayBuffer(1)))!=d||o&&n(new o)!=f||i&&n(i.resolve())!=l||a&&n(new a)!=p||c&&n(new c)!=h)&&(n=function(t){var e=s(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?u(t):"")switch(t){case v:return d;case b:return f;case g:return l;case y:return p;case _:return h}return e}),t.exports=n},function(t,e,n){n=n(2)(n(1),"DataView"),t.exports=n},function(t,e,n){n=n(2)(n(1),"Promise"),t.exports=n},function(t,e,n){n=n(2)(n(1),"Set"),t.exports=n},function(t,e,n){n=n(2)(n(1),"WeakMap"),t.exports=n},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(15),i=n(120),a=n(22),c=n(36),s=n(37),u=n(6);t.exports=function(t,e){return a(t)&&c(e)?s(u(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){n=n(115);var r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;n=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e})),t.exports=n},function(t,e,n){var r=n(116);t.exports=function(t){var e=(t=r(t,(function(t){return 500===e.size&&e.clear(),t}))).cache;return t}},function(t,e,n){var r=n(20);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");function n(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;return i.has(o)?i.get(o):(r=t.apply(this,r),n.cache=i.set(o,r)||i,r)}return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},function(t,e,n){var r=n(118);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(8),o=n(119),i=n(0),a=n(23),c=(r=r?r.prototype:void 0)?r.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 c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-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(9),c=n(17),s=n(6);t.exports=function(t,e,n){for(var u=-1,f=(e=r(e,t)).length,l=!1;++u<f;){var p=s(e[u]);if(!(l=null!=t&&n(t,p)))break;t=t[p]}return l||++u!=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(12),o=n(18),i=n(9),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){n=n(30)(Object.getPrototypeOf,Object),t.exports=n},function(t,e,n){var r=n(130),o=n(21),i=n(9),a=n(5),c=n(6);t.exports=function(t,e,n,s){if(!a(t))return t;for(var u=-1,f=(e=o(e,t)).length,l=f-1,p=t;null!=p&&++u<f;){var h,d=c(e[u]),v=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;u!=l&&(h=p[d],void 0===(v=s?s(h,d,p):void 0)&&(v=a(h)?h:i(e[u+1])?[]:{})),r(p,d,v),p=p[d]}return t}},function(t,e,n){var r=n(131),o=n(12),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);n=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),t.exports=n},function(t,e){var n,r,o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);o?(n=new Uint8Array(16),t.exports=function(){return o(n),n}):(r=new Array(16),t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),r[e]=t>>>((3&e)<<3)&255;return r})},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;return[(e=n)[t[r++]],e[t[r++]],e[t[r++]],e[t[r++]],"-",e[t[r++]],e[t[r++]],"-",e[t[r++]],e[t[r++]],"-",e[t[r++]],e[t[r++]],"-",e[t[r++]],e[t[r++]],e[t[r++]],e[t[r++]],e[t[r++]],e[t[+r]]].join("")}},function(t,e,n){n.r(e),n.d(e,"default",(function(){return d})),e=n(39);var r=n.n(e),o=(e=n(0),n.n(e)),i=(e=n(7),n.n(e)),a=(e=n(15),n.n(e)),c=(e=n(24),n.n(e)),s=(e=n(40),n.n(e));function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(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 p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h="__FUNCTION__",d=(n=v,(e=[{key:"_handleQueue",value:function(){var t=this;this._queue.forEach((function(e){var n=e.message;e=e.msgChan,t._target.postMessage(n,t._targetOrigin,[e.port2])})),this._queue=[]}},{key:"_publish",value:function(t){var e=(r=t.data).type,n=r.data,r=r.meta,o=this._parseFunction(e,n,r.functionKeys);r=(this._subscribers[e]||[]).map((function(n){var r;return(r=n,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Promise((function(t,n){try{var o=r.apply(void 0,e);o&&o.then?o.then(t).catch(n):t(o)}catch(t){n(t)}}))})(o,t.data,t).then((function(t){if(t)return{type:e,data:t}})).catch((function(t){return{type:e,error:{message:t.message}}}))})),Promise.all(r).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,u(t))}))}},{key:"_stringifyFunction",value:function(t,e){var n=this,s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];if(s&&0!==s.length)return s.forEach((function(r){var o=a()(e,r),i="".concat(h).concat(t,"_").concat(r);n._subscribeFunction(i,o),c()(e,r,i)})),{data:e,keys:s};if("function"!=typeof e)return function t(e,n,a){var c=2<arguments.length&&void 0!==a?a:"";return r()(e,(function(r,a){var s="".concat(c,"[").concat(a,"]");return"number"!=typeof a&&(s=(c?"".concat(c,"."):"").concat(a)),!1===n(r,a,e,s)||!i()(r)&&!o()(r)||t(r,n,s)}))}(e,(function(e,r,o,i){var a;"function"==typeof e&&(a="".concat(h).concat(t,"_").concat(i),n._subscribeFunction(a,e),o[r]=a,s.push(i))})),{data:e,keys:s};var u="".concat(h).concat(t);return this._subscribeFunction(u,e),{data:u,keys:[""]}}},{key:"_parseFunction",value:function(t,e){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];return 0===r.length?e:1===r.length&&""===r[0]?function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.postMessage(e,r)}:(r.forEach((function(r){r=r.replace("".concat(h).concat(t,"_"),"");var o=a()(e,r);c()(e,r,(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return n.postMessage(o,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){r.includes(e)||r.push(e),"connect"===t&&n._isTargetReady&&e((e={source:n._target}).data,e)}))}},{key:"subscribe",value:function(t,e){var n=this;"string"!=typeof t&&!i()(t)||"string"==typeof t&&!e||("string"==typeof t&&(t=p({},t,e)),Object.keys(t).forEach((function(e){var r=t[e];n._subscribe(e,r="function"==typeof r?[r]:r)})))}},{key:"unsubscribe",value:function(t,e){var n,r=this;void 0!==t?i()(t)?Object.keys(t).forEach((function(e){var n=t[e];r.unsubscribe(e,n)})):o()(e)?e.forEach((function(e){r.unsubscribe(t,e)})):(n=this._subscribers[t]||[],void 0!==e?-1<(e=n.indexOf(e))&&n.splice(e,1):this._subscribers[t]=[]):this._subscribers={}}},{key:"postMessage",value:function(t,e){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(o,i){var a=new MessageChannel;a.port1.onmessage=function(t){var e;t=(e=t.data).data,(e=e.error)?i(new Error(e.message)):o(t)};var c={type:t,data:e,meta:{id:n._id}},s=r.hasFunction,u=r.functionKeys;!0===s&&(u=n._stringifyFunction(t,e,void 0===u?[]:u),c.data=u.data,c.meta.functionKeys=u.keys),n._isTargetReady||"pre_connect"===t?n._target.postMessage(c,n._targetOrigin,[a.port2]):n._queue.push({message:c,msgChan:a})}))}},{key:"_preConnect",value:function(){function t(){i++,r.postMessage("pre_connect",r._id).then((function(t){n&&(clearTimeout(n),n=void 0),o[0]&&(o[0](t),o=[])})).catch((function(t){n&&(clearTimeout(n),n=void 0),o[1]&&(o[1](t),o=[])}))}function e(t){!r._isTargetReady&&i>=r._maxAttempts?o[1]&&(o[1](new Error("Exceed the max attempts, connect failed.")),o=[]):n=setTimeout((function(){t(),e(t)}),r._attemptInterval)}var n,r=this,o=[],i=0,a=new Promise((function(t,e){o[0]=t,o[1]=e}));return t(),e(t),a}},{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(){console.error("Warning(iframe-channel): destory is deprecated and will be removed in a future major release. Please use destroy instead."),this.destroy()}},{key:"destroy",value:function(){this._subscribers={},this._targetOrigin="",this._target=void 0,this._queue=[],this._isTargetReady=!1,window.removeEventListener("message",this._handleMessage)}}])&&l(n.prototype,e),v);function v(){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,v),p(this,"_handleMessage",(function(e){var n,r;e.origin!==t._targetOrigin&&"*"!==t._targetOrigin||(n=(r=e.data).type,r=r.meta,"pre_connect"!==n&&(void 0===r?{}:r).id!==t._targetId||t._publish(e))})),p(this,"_handlePreConnect",(function(e,n,r){if(r=r.source,t._target&&!t._target.closed&&t._target!==r)throw new Error("Connection is rejected.");return t._target=r,t._targetId=e,t._id})),p(this,"_handleConnect",(function(e,n,r){t._isTargetReady=!0,t._handleQueue()}));var n=void 0===(o=e.targetOrigin)?"":o,r=void 0===(i=e.subscribers)?{}:i,o=e.target,i=void 0===(i=e.attemptInterval)?1e3:i;if(e=void 0===(e=e.maxAttempts)?10:e,o===window)throw new Error("The target can not be current window.");this._subscribers=r,this._targetOrigin=n,this._target=o,this._queue=[],this._isTargetReady=!1,this._id=s()(),this._targetId="",this._attemptInterval=i,this._maxAttempts=e,this.subscribe("pre_connect",this._handlePreConnect),this.subscribe("connect",this._handleConnect),window.addEventListener("message",this._handleMessage,!1),window.addEventListener("beforeunload",(function(){t.destroy()}))}}],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 d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const v=t=>t.toString(16).padStart(2,"0");class b{constructor(t){d(this,"serviceName",""),d(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","catalog")}fetchCategories(){return this.call("fetchCategories")}fetchProduct(t){return this.call("fetchProduct",t)}}class _ extends b{constructor(...t){super(...t),g(this,"serviceName","user"),g(this,"email",void 0),g(this,"id",void 0),g(this,"name",void 0),g(this,"authorities",void 0)}}class x extends b{constructor(...t){super(...t),g(this,"serviceName","tenant"),g(this,"tenantKey",void 0),g(this,"language",void 0),g(this,"currency",void 0)}}class m extends b{constructor(...t){super(...t),g(this,"serviceName","layout"),g(this,"isAsideOpened",void 0)}}class O extends b{constructor(...t){super(...t),g(this,"serviceName","authorization")}getAuthToken(){return this.call("getAuthToken")}}class j extends b{constructor(...t){super(...t),g(this,"serviceName","customer"),g(this,"id",void 0),g(this,"name",void 0)}}class w extends b{constructor(...t){super(...t),g(this,"serviceName","plugin"),g(this,"id",void 0),g(this,"srcUrl",void 0),g(this,"name",void 0)}}class E extends b{constructor(...t){super(...t),g(this,"serviceName","orderpath")}fetchCart(t){return this.call("fetchCart",t)}fetchOffer(t){return this.call("fetchOffer",t)}}function P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var T;let A;!function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(T||(T={})),function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(A||(A={}));class M 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)}off(t,e){if(void 0!==this._callbacks[t])for(let n=0;n<this._callbacks[t].length;n++)this._callbacks[t][n]===e&&this._callbacks[t].splice(n,1)}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){M.debug&&console.log("[SDK Core] ",...t)}static warn(...t){console.warn("[SDK Core] ",...t)}initializeServiceGetters(){this.instances&&Object.keys(this.instances).forEach((t=>{Object.defineProperty(this,t,{get:()=>this.isInitialized?this.instances[t]:null})}))}initializeContextClass(){return this.contextClass?new this.contextClass(this.callFunction.bind(this)):{}}constructor(t){super(),P(this,"channel",void 0),P(this,"autoheight",!0),P(this,"heightMutationObserver",null),P(this,"origin",void 0),P(this,"isInitialized",!1),P(this,"instances",void 0),P(this,"contextClass",void 0),this.initializeServiceGetters(),this.origin=t.origin,this.channel=new h({targetOrigin:this.origin,target:window.parent}),this.channel.subscribe(u.Message.INIT,(t=>{M.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]):M.warn(`Missing attributes for ${e} in `,t)}})),M.log("Emitting INIT with payload ",this.instances),this.isInitialized=!0,this.emit(T.INIT,this.instances)})),this.channel.subscribe(u.Message.UPDATE,(t=>{M.log("Emitting UPDATE with payload ",t),this.emit(T.UPDATE,t)})),this.channel.subscribe(u.Message.FRAME_HEIGHT_REQUEST,(t=>{this.autoheight&&(M.log("Request for iframe height"),this.sendFrameHeight())})),this.channel.connect().then((()=>{M.log("Connected with ONe SDK"),this.autoheight&&this.initializeHeightObserver()})),this.setupOptions(t),M.log("Initialized.")}sendFrameHeight(){this.channel.postMessage(u.Message.FRAME_HEIGHT_CHANGE,document.body.scrollHeight)}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),M.log("Create body MutationObserver"),this.heightMutationObserver.observe(e,n)}else M.warn("MutationObserver not available. Auto-height functionality disabled.")}setupOptions(t){t&&(void 0!==t.debug&&(M.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,v).join("")}();return this.isInitialized?(M.log(`Call ID ${r} for ${t}:${e}`,n),this.channel.postMessage(u.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(u.Message.METHOD_RESULT,n),null!=o&&o.isException?e(o.result):t(o.result)};this.channel.subscribe(u.Message.METHOD_RESULT,n)}))):(M.log("SDK is not initialized!"),Promise.resolve(null))}navigate(t){this.channel.postMessage(u.Message.NAVIGATION_PUSH,t)}}P(M,"debug",!1);class I extends M{constructor(...t){super(...t),P(this,"instances",{route:{hash:"",query:{}},catalog:new y(this.callFunction.bind(this)),user:new _(this.callFunction.bind(this)),tenant:new x(this.callFunction.bind(this)),layout:new m(this.callFunction.bind(this)),authorization:new O(this.callFunction.bind(this)),customer:new j(this.callFunction.bind(this)),plugin:new w(this.callFunction.bind(this)),orderpath:new E(this.callFunction.bind(this)),context:this.initializeContextClass()})}}var S=function(){var t=e();return null==t?void 0:t.appContext.config.globalProperties.$one},k={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 I(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,on:a.on,off:a.off},a.instances)),s=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.orderpath.update(t),c.plugin.update(t),c.context.update(t)};a.on(A.INIT,(function(t){i("Handling INIT "),c.isInitialized||(c.isInitialized=!0,s(t))})),a.on(A.UPDATE,(function(t){i("Handling UPDATE"),s(t)})),e.config.globalProperties.$one=c}};export{k as default,S 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,s,u={},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",(s=a.Errors||(a.Errors={})).METHOD_DOES_NOT_EXISTS="Method does not exists",s.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);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}: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)}(u);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 s(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])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,t.exports=s},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,s=a.toString,u=c.hasOwnProperty,f=s.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=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&s.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 s(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])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,t.exports=s},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,s=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=s},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,s=(c?c.isBuffer:void 0)||o;t.exports=s}).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),s=n(73);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=c,u.prototype.set=s,t.exports=u},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,s){var u=1&n,f=t.length,l=e.length;if(f!=l&&!(u&&f<l))return!1;var p=s.get(t);if(p&&s.get(e))return p==e;var h=-1,v=!0,d=2&n?new r:void 0;for(s.set(t,e),s.set(e,t);++h<f;){var b=t[h],g=e[h];if(a)var y=u?a(g,b,h,e,t,s):a(b,g,h,t,e,s);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,s)))return d.push(e)}))){v=!1;break}}else if(b!==g&&!c(b,g,n,a,s)){v=!1;break}}return s.delete(t),s.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 s=a(t)?r:o;return n&&c(t,e,n)&&(e=void 0),s(t,i(e,3))}},function(t,e,n){var r,o,i=n(133),a=n(134),c=0,s=0;t.exports=function(t,e,n){var u=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:s+1,b=v-c+(d-s)/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))+(s=d))%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var y=v/4294967296*1e4&268435455;f[u++]=y>>>8&255,f[u++]=255&y,f[u++]=y>>>24&15|16,f[u++]=y>>>16&255,f[u++]=p>>>8|128,f[u++]=255&p;for(var _=0;_<6;++_)f[u+_]=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 s=a[t?c:++o];if(!1===n(i[s],s,i))break}return e}}},function(t,e,n){var r=n(48),o=n(25),i=n(0),a=n(27),c=n(8),s=n(29),u=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&&s(t),h=n||f||l||p,v=h?r(t.length,String):[],d=v.length;for(var b in t)!e&&!u.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,s=!i;if(null==t)return!c;for(t=Object(t);a--;){var u=n[a];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<c;){var f=(u=n[a])[0],l=t[f],p=u[1];if(s&&u[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\]$/,s=Function.prototype,u=Object.prototype,f=s.toString,l=u.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 s(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])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,t.exports=s},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),s=n(0),u=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=s(t),_=s(e),x=y?p:c(t),O=_?p:c(e),j=(x=x==l?h:x)==h,m=(O=O==l?h:O)==h,w=x==O;if(w&&u(t)){if(!u(e))return!1;j=!(y=!0)}if(w&&!j)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=j&&v.call(t,"__wrapped__"),P=m&&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),s=n(99),u=r?r.prototype:void 0,f=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,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||s,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,u,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 s=1&n,u=r(t),f=u.length;if(f!=r(e).length&&!s)return!1;for(var l=f;l--;){var p=u[l];if(!(s?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=s;++l<f;){var b=t[p=u[l]],g=e[p];if(i)var y=s?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),s=n(3),u=n(33),f="[object Map]",l="[object Promise]",p="[object Set]",h="[object WeakMap]",v="[object DataView]",d=u(r),b=u(o),g=u(i),y=u(a),_=u(c),x=s;(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=s(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(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),s=n(37),u=n(6);t.exports=function(t,e){return a(t)&&c(e)?s(u(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,s=r?r.prototype:void 0,u=s?s.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 u?u.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),s=n(6);t.exports=function(t,e,n){for(var u=-1,f=(e=r(e,t)).length,l=!1;++u<f;){var p=s(e[u]);if(!(l=null!=t&&n(t,p)))break;t=t[p]}return l||++u!=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,s){if(!a(t))return t;for(var u=-1,f=(e=o(e,t)).length,l=f-1,p=t;null!=p&&++u<f;){var h=c(e[u]),v=n;if(u!=l){var d=p[h];void 0===(v=s?s(d,h,p):void 0)&&(v=a(d)?d:i(e[u+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),s=n.n(c),u=n(14),f=n.n(u),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)||!s()(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&&!s()(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}},s=o.hasFunction,u=o.functionKeys,f=void 0===u?[]:u;if(!0===s){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(O.prototype,y),O);function O(){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,O),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,s=void 0===c?1e3:c,u=e.maxAttempts,f=void 0===u?10:u;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=s,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","catalog")}fetchCategories(){return this.call("fetchCategories")}fetchProduct(t){return this.call("fetchProduct",t)}}class _ extends b{constructor(...t){super(...t),g(this,"serviceName","user"),g(this,"email",void 0),g(this,"id",void 0),g(this,"name",void 0),g(this,"authorities",void 0)}}class x extends b{constructor(...t){super(...t),g(this,"serviceName","tenant"),g(this,"tenantKey",void 0),g(this,"language",void 0),g(this,"currency",void 0)}}class O extends b{constructor(...t){super(...t),g(this,"serviceName","layout"),g(this,"isAsideOpened",void 0)}}class j extends b{constructor(...t){super(...t),g(this,"serviceName","authorization")}getAuthToken(){return this.call("getAuthToken")}}class m extends b{constructor(...t){super(...t),g(this,"serviceName","customer"),g(this,"id",void 0),g(this,"name",void 0)}}class w extends b{constructor(...t){super(...t),g(this,"serviceName","plugin"),g(this,"id",void 0),g(this,"srcUrl",void 0),g(this,"name",void 0)}}class E extends b{constructor(...t){super(...t),g(this,"serviceName","orderpath")}fetchCart(t){return this.call("fetchCart",t)}fetchOffer(t){return this.call("fetchOffer",t)}}function P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var T;let A;!function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(T||(T={})),function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(A||(A={}));class M 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)}off(t,e){if(void 0!==this._callbacks[t])for(let n=0;n<this._callbacks[t].length;n++)this._callbacks[t][n]===e&&this._callbacks[t].splice(n,1)}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){M.debug&&console.log("[SDK Core] ",...t)}static warn(...t){console.warn("[SDK Core] ",...t)}initializeServiceGetters(){this.instances&&Object.keys(this.instances).forEach((t=>{Object.defineProperty(this,t,{get:()=>this.isInitialized?this.instances[t]:null})}))}initializeContextClass(){return this.contextClass?new this.contextClass(this.callFunction.bind(this)):{}}constructor(t){super(),P(this,"channel",void 0),P(this,"autoheight",!0),P(this,"heightMutationObserver",null),P(this,"origin",void 0),P(this,"isInitialized",!1),P(this,"instances",void 0),P(this,"contextClass",void 0),this.initializeServiceGetters(),this.origin=t.origin,this.channel=new h({targetOrigin:this.origin,target:window.parent}),this.channel.subscribe(u.Message.INIT,(t=>{M.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]):M.warn(`Missing attributes for ${e} in `,t)}})),M.log("Emitting INIT with payload ",this.instances),this.isInitialized=!0,this.emit(T.INIT,this.instances)})),this.channel.subscribe(u.Message.UPDATE,(t=>{M.log("Emitting UPDATE with payload ",t),this.emit(T.UPDATE,t)})),this.channel.subscribe(u.Message.FRAME_HEIGHT_REQUEST,(t=>{this.autoheight&&(M.log("Request for iframe height"),this.sendFrameHeight())})),this.channel.connect().then((()=>{M.log("Connected with ONe SDK"),this.autoheight&&this.initializeHeightObserver()})),this.setupOptions(t),M.log("Initialized.")}sendFrameHeight(){this.channel.postMessage(u.Message.FRAME_HEIGHT_CHANGE,document.body.scrollHeight)}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),M.log("Create body MutationObserver"),this.heightMutationObserver.observe(e,n)}else M.warn("MutationObserver not available. Auto-height functionality disabled.")}setupOptions(t){t&&(void 0!==t.debug&&(M.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?(M.log(`Call ID ${r} for ${t}:${e}`,n),this.channel.postMessage(u.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(u.Message.METHOD_RESULT,n),null!=o&&o.isException?e(o.result):t(o.result)};this.channel.subscribe(u.Message.METHOD_RESULT,n)}))):(M.log("SDK is not initialized!"),Promise.resolve(null))}navigate(t){this.channel.postMessage(u.Message.NAVIGATION_PUSH,t)}}P(M,"debug",!1);class I extends M{constructor(...t){super(...t),P(this,"instances",{route:{hash:"",query:{}},catalog:new y(this.callFunction.bind(this)),user:new _(this.callFunction.bind(this)),tenant:new x(this.callFunction.bind(this)),layout:new O(this.callFunction.bind(this)),authorization:new j(this.callFunction.bind(this)),customer:new m(this.callFunction.bind(this)),plugin:new w(this.callFunction.bind(this)),orderpath:new E(this.callFunction.bind(this)),context:this.initializeContextClass()})}}var S=function(){var t=e();return null==t?void 0:t.appContext.config.globalProperties.$one},k={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 I(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,on:a.on,off:a.off},a.instances)),s=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.orderpath.update(t),c.plugin.update(t),c.context.update(t)};a.on(A.INIT,(function(t){i("Handling INIT "),c.isInitialized||(c.isInitialized=!0,s(t))})),a.on(A.UPDATE,(function(t){i("Handling UPDATE"),s(t)})),e.config.globalProperties.$one=c}};export{k as default,S as useOneSdk};
2
2
  //# sourceMappingURL=bundle.esm.min.js.map