Socket
Socket
Sign inDemoInstall

@beyonk/embedded

Package Overview
Dependencies
0
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

12

CHANGELOG.json

@@ -5,2 +5,14 @@ {

{
"version": "1.1.1",
"tag": "@beyonk/embedded_v1.1.1",
"date": "Wed, 17 Mar 2021 17:14:39 GMT",
"comments": {
"patch": [
{
"comment": "fix portal observer"
}
]
}
},
{
"version": "1.1.0",

@@ -7,0 +19,0 @@ "tag": "@beyonk/embedded_v1.1.0",

9

CHANGELOG.md
# Change Log - @beyonk/embedded
This log was last generated on Wed, 17 Mar 2021 09:47:43 GMT and should not be manually modified.
This log was last generated on Wed, 17 Mar 2021 17:14:39 GMT and should not be manually modified.
## 1.1.1
Wed, 17 Mar 2021 17:14:39 GMT
### Patches
- fix portal observer
## 1.1.0

@@ -6,0 +13,0 @@ Wed, 17 Mar 2021 09:47:43 GMT

2

dist/observers.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BeyonkEmbedded={})}(this,(function(e){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,l={f:a&&!c.call({1:2},1)?function(e){var t=a(this,e);return!!t&&t.enumerable}:c},f=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},s={}.toString,p=function(e){return s.call(e).slice(8,-1)},h="".split,v=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==p(e)?h.call(e,""):Object(e)}:Object,d=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return v(d(e))},y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},b=function(e,t){if(!y(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!y(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,x=function(e,t){return m.call(e,t)},E=o.document,w=y(E)&&y(E.createElement),S=!u&&!i((function(){return 7!=Object.defineProperty((e="div",w?E.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),O=Object.getOwnPropertyDescriptor,j={f:u?O:function(e,t){if(e=g(e),t=b(t,!0),S)try{return O(e,t)}catch(e){}if(x(e,t))return f(!l.f.call(e,t),e[t])}},P=function(e){if(!y(e))throw TypeError(String(e)+" is not an object");return e},R=Object.defineProperty,T={f:u?R:function(e,t,n){if(P(e),t=b(t,!0),P(n),S)try{return R(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},I=u?function(e,t,n){return T.f(e,t,f(1,n))}:function(e,t,n){return e[t]=n,e},_=function(e,t){try{I(o,e,t)}catch(n){o[e]=t}return t},N="__core-js_shared__",k=o[N]||_(N,{}),A=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(e){return A.call(e)});var C,M,F,D,L=k.inspectSource,U=o.WeakMap,z="function"==typeof U&&/native code/.test(L(U)),$=n((function(e){(e.exports=function(e,t){return k[e]||(k[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),B=0,K=Math.random(),q=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++B+K).toString(36)},G=$("keys"),Y={},J=o.WeakMap;if(z){var W=new J,V=W.get,X=W.has,H=W.set;C=function(e,t){return H.call(W,e,t),t},M=function(e){return V.call(W,e)||{}},F=function(e){return X.call(W,e)}}else{var Q=G[D="state"]||(G[D]=q(D));Y[Q]=!0,C=function(e,t){return I(e,Q,t),t},M=function(e){return x(e,Q)?e[Q]:{}},F=function(e){return x(e,Q)}}var Z={set:C,get:M,has:F,enforce:function(e){return F(e)?M(e):C(e,{})},getterFor:function(e){return function(t){var n;if(!y(t)||(n=M(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ee=n((function(e){var t=Z.get,n=Z.enforce,r=String(String).split("String");(e.exports=function(e,t,i,u){var c=!!u&&!!u.unsafe,a=!!u&&!!u.enumerable,l=!!u&&!!u.noTargetGet;"function"==typeof i&&("string"!=typeof t||x(i,"name")||I(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==o?(c?!l&&e[t]&&(a=!0):delete e[t],a?e[t]=i:I(e,t,i)):a?e[t]=i:_(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||L(this)}))})),te=o,ne=function(e){return"function"==typeof e?e:void 0},re=Math.ceil,oe=Math.floor,ie=function(e){return isNaN(e=+e)?0:(e>0?oe:re)(e)},ue=Math.min,ce=function(e){return e>0?ue(ie(e),9007199254740991):0},ae=Math.max,le=Math.min,fe=function(e){return function(t,n,r){var o,i=g(t),u=ce(i.length),c=function(e,t){var n=ie(e);return n<0?ae(n+t,0):le(n,t)}(r,u);if(e&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},se={includes:fe(!0),indexOf:fe(!1)}.indexOf,pe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),he={f:Object.getOwnPropertyNames||function(e){return function(e,t){var n,r=g(e),o=0,i=[];for(n in r)!x(Y,n)&&x(r,n)&&i.push(n);for(;t.length>o;)x(r,n=t[o++])&&(~se(i,n)||i.push(n));return i}(e,pe)}},ve={f:Object.getOwnPropertySymbols},de=function(e,t){return arguments.length<2?ne(te[e])||ne(o[e]):te[e]&&te[e][t]||o[e]&&o[e][t]}("Reflect","ownKeys")||function(e){var t=he.f(P(e)),n=ve.f;return n?t.concat(n(e)):t},ge=function(e,t){for(var n=de(t),r=T.f,o=j.f,i=0;i<n.length;i++){var u=n[i];x(e,u)||r(e,u,o(t,u))}},ye=/#|\.prototype\./,be=function(e,t){var n=xe[me(e)];return n==we||n!=Ee&&("function"==typeof t?i(t):!!t)},me=be.normalize=function(e){return String(e).replace(ye,".").toLowerCase()},xe=be.data={},Ee=be.NATIVE="N",we=be.POLYFILL="P",Se=be,Oe=j.f,je=function(e,t){var n,r,i,u,c,a=e.target,l=e.global,f=e.stat;if(n=l?o:f?o[a]||_(a,{}):(o[a]||{}).prototype)for(r in t){if(u=t[r],i=e.noTargetGet?(c=Oe(n,r))&&c.value:n[r],!Se(l?r:a+(f?".":"#")+r,e.forced)&&void 0!==i){if(typeof u==typeof i)continue;ge(u,i)}(e.sham||i&&i.sham)&&I(u,"sham",!0),ee(n,r,u,e)}},Pe=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Re=[].slice,Te={},Ie=function(e,t,n){if(!(t in Te)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";Te[t]=Function("C,a","return new C("+r.join(",")+")")}return Te[t](e,n)};je({target:"Function",proto:!0},{bind:Function.bind||function(e){var t=Pe(this),n=Re.call(arguments,1),r=function(){var o=n.concat(Re.call(arguments));return this instanceof r?Ie(t,o.length,o):t.apply(e,o)};return y(t.prototype)&&(r.prototype=t.prototype),r}}),je({target:"Object",stat:!0,forced:!u,sham:!u},{defineProperty:T.f});var _e=function(){var e=P(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function Ne(e,t){return RegExp(e,t)}var ke,Ae,Ce={UNSUPPORTED_Y:i((function(){var e=Ne("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=Ne("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},Me=RegExp.prototype.exec,Fe=String.prototype.replace,De=Me,Le=(ke=/a/,Ae=/b*/g,Me.call(ke,"a"),Me.call(Ae,"a"),0!==ke.lastIndex||0!==Ae.lastIndex),Ue=Ce.UNSUPPORTED_Y||Ce.BROKEN_CARET,ze=void 0!==/()??/.exec("")[1];(Le||ze||Ue)&&(De=function(e){var t,n,r,o,i=this,u=Ue&&i.sticky,c=_e.call(i),a=i.source,l=0,f=e;return u&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(a="(?: "+a+")",f=" "+f,l++),n=new RegExp("^(?:"+a+")",c)),ze&&(n=new RegExp("^"+a+"$(?!\\s)",c)),Le&&(t=i.lastIndex),r=Me.call(u?n:i,f),u?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Le&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),ze&&r&&r.length>1&&Fe.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var $e=De;je({target:"RegExp",proto:!0,forced:/./.exec!==$e},{exec:$e});var Be=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Ke=Be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,qe=$("wks"),Ge=o.Symbol,Ye=Ke?Ge:Ge&&Ge.withoutSetter||q,Je=function(e){return x(qe,e)||(Be&&x(Ge,e)?qe[e]=Ge[e]:qe[e]=Ye("Symbol."+e)),qe[e]},We=Je("species"),Ve=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Xe="$0"==="a".replace(/./,"$0"),He=Je("replace"),Qe=!!/./[He]&&""===/./[He]("a","$0"),Ze=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),et=function(e){return function(t,n){var r,o,i=String(d(t)),u=ie(n),c=i.length;return u<0||u>=c?e?"":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===c||(o=i.charCodeAt(u+1))<56320||o>57343?e?i.charAt(u):r:e?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}},tt={codeAt:et(!1),charAt:et(!0)}.charAt,nt=function(e,t,n){return t+(n?tt(e,t).length:1)},rt=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==p(e))throw TypeError("RegExp#exec called on incompatible receiver");return $e.call(e,t)};function ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function it(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ut(e,t,n){return t&&it(e.prototype,t),n&&it(e,n),e}!function(e,t,n,r){var o=Je(e),u=!i((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=u&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[We]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!u||!c||"replace"===e&&(!Ve||!Xe||Qe)||"split"===e&&!Ze){var a=/./[o],l=n(o,""[e],(function(e,t,n,r,o){return t.exec===$e?u&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Xe,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Qe}),f=l[0],s=l[1];ee(String.prototype,e,f),ee(RegExp.prototype,o,2==t?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)})}r&&I(RegExp.prototype[o],"sham",!0)}("match",1,(function(e,t,n){return[function(t){var n=d(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=P(e),i=String(this);if(!o.global)return rt(o,i);var u=o.unicode;o.lastIndex=0;for(var c,a=[],l=0;null!==(c=rt(o,i));){var f=String(c[0]);a[l]=f,""===f&&(o.lastIndex=nt(i,ce(o.lastIndex),u)),l++}return 0===l?null:a}]}));var ct="whitelabel:header:resize",at=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;ot(this,e),this.w=t,this.eventName=n}return ut(e,[{key:"update",value:function(e){var t=JSON.stringify({version:1,eventName:this.eventName,meta:{height:e}});this.w.parent.postMessage(t,"*")}}]),e}(),lt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/.*/;ot(this,e),this.w=t,this.originFilter=n}return ut(e,[{key:"handle",value:function(e,t){if(t.origin.match(this.originFilter))try{var n=JSON.parse(t.data),r=n.version,o=n.eventName,i=n.meta;if(r&&1!==r&&console.warn("Recieved event from incompatible script version"),o===e)return this.callback(i.height)}catch(e){console.warn("Recieved unparseable event",t.data)}}},{key:"subscribe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;this.callback=e,this.w.addEventListener("message",this.handle.bind(this,t),!1)}},{key:"unsubscribe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct;this.w.removeEventListener("message",this.handle.bind(this,e),!1)}}]),e}();e.ResizableElementDispatcher=at,e.ResizableElementObserver=lt,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).BeyonkEmbedded={})}(this,(function(t){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}var r=function(t){return t&&t.Math==Math&&t},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||Function("return this")(),i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,f={f:a&&!c.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:c},l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},s={}.toString,p=function(t){return s.call(t).slice(8,-1)},y="".split,h=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?y.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return h(v(t))},d=function(t){return"object"==typeof t?null!==t:"function"==typeof t},b=function(t,e){if(!d(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!d(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!d(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!d(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,S=function(t,e){return m.call(t,e)},O=o.document,w=d(O)&&d(O.createElement),E=function(t){return w?O.createElement(t):{}},x=!u&&!i((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),j=Object.getOwnPropertyDescriptor,P={f:u?j:function(t,e){if(t=g(t),e=b(e,!0),x)try{return j(t,e)}catch(t){}if(S(t,e))return l(!f.f.call(t,e),t[e])}},T=function(t){if(!d(t))throw TypeError(String(t)+" is not an object");return t},R=Object.defineProperty,_={f:u?R:function(t,e,n){if(T(t),e=b(e,!0),T(n),x)try{return R(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},A=u?function(t,e,n){return _.f(t,e,l(1,n))}:function(t,e,n){return t[e]=n,t},I=function(t,e){try{A(o,t,e)}catch(n){o[t]=e}return e},L="__core-js_shared__",k=o[L]||I(L,{}),C=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(t){return C.call(t)});var N,D,F,M=k.inspectSource,G=o.WeakMap,U="function"==typeof G&&/native code/.test(M(G)),z=n((function(t){(t.exports=function(t,e){return k[t]||(k[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),V=0,$=Math.random(),B=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++V+$).toString(36)},W=z("keys"),Y=function(t){return W[t]||(W[t]=B(t))},q={},H=o.WeakMap;if(U){var J=new H,K=J.get,X=J.has,Q=J.set;N=function(t,e){return Q.call(J,t,e),e},D=function(t){return K.call(J,t)||{}},F=function(t){return X.call(J,t)}}else{var Z=Y("state");q[Z]=!0,N=function(t,e){return A(t,Z,e),e},D=function(t){return S(t,Z)?t[Z]:{}},F=function(t){return S(t,Z)}}var tt,et={set:N,get:D,has:F,enforce:function(t){return F(t)?D(t):N(t,{})},getterFor:function(t){return function(e){var n;if(!d(e)||(n=D(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},nt=n((function(t){var e=et.get,n=et.enforce,r=String(String).split("String");(t.exports=function(t,e,i,u){var c=!!u&&!!u.unsafe,a=!!u&&!!u.enumerable,f=!!u&&!!u.noTargetGet;"function"==typeof i&&("string"!=typeof e||S(i,"name")||A(i,"name",e),n(i).source=r.join("string"==typeof e?e:"")),t!==o?(c?!f&&t[e]&&(a=!0):delete t[e],a?t[e]=i:A(t,e,i)):a?t[e]=i:I(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||M(this)}))})),rt=o,ot=function(t){return"function"==typeof t?t:void 0},it=function(t,e){return arguments.length<2?ot(rt[t])||ot(o[t]):rt[t]&&rt[t][e]||o[t]&&o[t][e]},ut=Math.ceil,ct=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ct:ut)(t)},ft=Math.min,lt=function(t){return t>0?ft(at(t),9007199254740991):0},st=Math.max,pt=Math.min,yt=function(t){return function(e,n,r){var o,i=g(e),u=lt(i.length),c=function(t,e){var n=at(t);return n<0?st(n+e,0):pt(n,e)}(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},ht={includes:yt(!0),indexOf:yt(!1)},vt=ht.indexOf,gt=function(t,e){var n,r=g(t),o=0,i=[];for(n in r)!S(q,n)&&S(r,n)&&i.push(n);for(;e.length>o;)S(r,n=e[o++])&&(~vt(i,n)||i.push(n));return i},dt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=dt.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(t){return gt(t,bt)}},St={f:Object.getOwnPropertySymbols},Ot=it("Reflect","ownKeys")||function(t){var e=mt.f(T(t)),n=St.f;return n?e.concat(n(t)):e},wt=function(t,e){for(var n=Ot(e),r=_.f,o=P.f,i=0;i<n.length;i++){var u=n[i];S(t,u)||r(t,u,o(e,u))}},Et=/#|\.prototype\./,xt=function(t,e){var n=Pt[jt(t)];return n==Rt||n!=Tt&&("function"==typeof e?i(e):!!e)},jt=xt.normalize=function(t){return String(t).replace(Et,".").toLowerCase()},Pt=xt.data={},Tt=xt.NATIVE="N",Rt=xt.POLYFILL="P",_t=xt,At=P.f,It=function(t,e){var n,r,i,u,c,a=t.target,f=t.global,l=t.stat;if(n=f?o:l?o[a]||I(a,{}):(o[a]||{}).prototype)for(r in e){if(u=e[r],i=t.noTargetGet?(c=At(n,r))&&c.value:n[r],!_t(f?r:a+(l?".":"#")+r,t.forced)&&void 0!==i){if(typeof u==typeof i)continue;wt(u,i)}(t.sham||i&&i.sham)&&A(u,"sham",!0),nt(n,r,u,t)}},Lt=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),kt=Lt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ct=Array.isArray||function(t){return"Array"==p(t)},Nt=function(t){return Object(v(t))},Dt=Object.keys||function(t){return gt(t,dt)},Ft=u?Object.defineProperties:function(t,e){T(t);for(var n,r=Dt(e),o=r.length,i=0;o>i;)_.f(t,n=r[i++],e[n]);return t},Mt=it("document","documentElement"),Gt=Y("IE_PROTO"),Ut=function(){},zt=function(t){return"<script>"+t+"</"+"script>"},Vt=function(){try{tt=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;Vt=tt?function(t){t.write(zt("")),t.close();var e=t.parentWindow.Object;return t=null,e}(tt):((e=E("iframe")).style.display="none",Mt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(zt("document.F=Object")),t.close(),t.F);for(var n=dt.length;n--;)delete Vt.prototype[dt[n]];return Vt()};q[Gt]=!0;var $t=Object.create||function(t,e){var n;return null!==t?(Ut.prototype=T(t),n=new Ut,Ut.prototype=null,n[Gt]=t):n=Vt(),void 0===e?n:Ft(n,e)},Bt=mt.f,Wt={}.toString,Yt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],qt={f:function(t){return Yt&&"[object Window]"==Wt.call(t)?function(t){try{return Bt(t)}catch(t){return Yt.slice()}}(t):Bt(g(t))}},Ht=z("wks"),Jt=o.Symbol,Kt=kt?Jt:Jt&&Jt.withoutSetter||B,Xt=function(t){return S(Ht,t)||(Lt&&S(Jt,t)?Ht[t]=Jt[t]:Ht[t]=Kt("Symbol."+t)),Ht[t]},Qt={f:Xt},Zt=_.f,te=function(t){var e=rt.Symbol||(rt.Symbol={});S(e,t)||Zt(e,t,{value:Qt.f(t)})},ee=_.f,ne=Xt("toStringTag"),re=function(t,e,n){t&&!S(t=n?t:t.prototype,ne)&&ee(t,ne,{configurable:!0,value:e})},oe=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},ie=Xt("species"),ue=function(t,e){var n;return Ct(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Ct(n.prototype)?d(n)&&null===(n=n[ie])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},ce=[].push,ae=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=5==t||i;return function(c,a,f,l){for(var s,p,y=Nt(c),v=h(y),g=function(t,e,n){if(oe(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}(a,f,3),d=lt(v.length),b=0,m=l||ue,S=e?m(c,d):n?m(c,0):void 0;d>b;b++)if((u||b in v)&&(p=g(s=v[b],b,y),t))if(e)S[b]=p;else if(p)switch(t){case 3:return!0;case 5:return s;case 6:return b;case 2:ce.call(S,s)}else if(o)return!1;return i?-1:r||o?o:S}},fe={forEach:ae(0),map:ae(1),filter:ae(2),some:ae(3),every:ae(4),find:ae(5),findIndex:ae(6)}.forEach,le=Y("hidden"),se="Symbol",pe=Xt("toPrimitive"),ye=et.set,he=et.getterFor(se),ve=Object.prototype,ge=o.Symbol,de=it("JSON","stringify"),be=P.f,me=_.f,Se=qt.f,Oe=f.f,we=z("symbols"),Ee=z("op-symbols"),xe=z("string-to-symbol-registry"),je=z("symbol-to-string-registry"),Pe=z("wks"),Te=o.QObject,Re=!Te||!Te.prototype||!Te.prototype.findChild,_e=u&&i((function(){return 7!=$t(me({},"a",{get:function(){return me(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=be(ve,e);r&&delete ve[e],me(t,e,n),r&&t!==ve&&me(ve,e,r)}:me,Ae=function(t,e){var n=we[t]=$t(ge.prototype);return ye(n,{type:se,tag:t,description:e}),u||(n.description=e),n},Ie=kt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof ge},Le=function(t,e,n){t===ve&&Le(Ee,e,n),T(t);var r=b(e,!0);return T(n),S(we,r)?(n.enumerable?(S(t,le)&&t[le][r]&&(t[le][r]=!1),n=$t(n,{enumerable:l(0,!1)})):(S(t,le)||me(t,le,l(1,{})),t[le][r]=!0),_e(t,r,n)):me(t,r,n)},ke=function(t,e){T(t);var n=g(e),r=Dt(n).concat(Fe(n));return fe(r,(function(e){u&&!Ce.call(n,e)||Le(t,e,n[e])})),t},Ce=function(t){var e=b(t,!0),n=Oe.call(this,e);return!(this===ve&&S(we,e)&&!S(Ee,e))&&(!(n||!S(this,e)||!S(we,e)||S(this,le)&&this[le][e])||n)},Ne=function(t,e){var n=g(t),r=b(e,!0);if(n!==ve||!S(we,r)||S(Ee,r)){var o=be(n,r);return!o||!S(we,r)||S(n,le)&&n[le][r]||(o.enumerable=!0),o}},De=function(t){var e=Se(g(t)),n=[];return fe(e,(function(t){S(we,t)||S(q,t)||n.push(t)})),n},Fe=function(t){var e=t===ve,n=Se(e?Ee:g(t)),r=[];return fe(n,(function(t){!S(we,t)||e&&!S(ve,t)||r.push(we[t])})),r};if(Lt||(nt((ge=function(){if(this instanceof ge)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=B(t),n=function(t){this===ve&&n.call(Ee,t),S(this,le)&&S(this[le],e)&&(this[le][e]=!1),_e(this,e,l(1,t))};return u&&Re&&_e(ve,e,{configurable:!0,set:n}),Ae(e,t)}).prototype,"toString",(function(){return he(this).tag})),nt(ge,"withoutSetter",(function(t){return Ae(B(t),t)})),f.f=Ce,_.f=Le,P.f=Ne,mt.f=qt.f=De,St.f=Fe,Qt.f=function(t){return Ae(Xt(t),t)},u&&(me(ge.prototype,"description",{configurable:!0,get:function(){return he(this).description}}),nt(ve,"propertyIsEnumerable",Ce,{unsafe:!0}))),It({global:!0,wrap:!0,forced:!Lt,sham:!Lt},{Symbol:ge}),fe(Dt(Pe),(function(t){te(t)})),It({target:se,stat:!0,forced:!Lt},{for:function(t){var e=String(t);if(S(xe,e))return xe[e];var n=ge(e);return xe[e]=n,je[n]=e,n},keyFor:function(t){if(!Ie(t))throw TypeError(t+" is not a symbol");if(S(je,t))return je[t]},useSetter:function(){Re=!0},useSimple:function(){Re=!1}}),It({target:"Object",stat:!0,forced:!Lt,sham:!u},{create:function(t,e){return void 0===e?$t(t):ke($t(t),e)},defineProperty:Le,defineProperties:ke,getOwnPropertyDescriptor:Ne}),It({target:"Object",stat:!0,forced:!Lt},{getOwnPropertyNames:De,getOwnPropertySymbols:Fe}),It({target:"Object",stat:!0,forced:i((function(){St.f(1)}))},{getOwnPropertySymbols:function(t){return St.f(Nt(t))}}),de){var Me=!Lt||i((function(){var t=ge();return"[null]"!=de([t])||"{}"!=de({a:t})||"{}"!=de(Object(t))}));It({target:"JSON",stat:!0,forced:Me},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(d(e)||void 0!==t)&&!Ie(t))return Ct(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!Ie(e))return e}),o[1]=e,de.apply(null,o)}})}ge.prototype[pe]||A(ge.prototype,pe,ge.prototype.valueOf),re(ge,se),q[le]=!0;var Ge=_.f,Ue=o.Symbol;if(u&&"function"==typeof Ue&&(!("description"in Ue.prototype)||void 0!==Ue().description)){var ze={},Ve=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Ve?new Ue(t):void 0===t?Ue():Ue(t);return""===t&&(ze[e]=!0),e};wt(Ve,Ue);var $e=Ve.prototype=Ue.prototype;$e.constructor=Ve;var Be=$e.toString,We="Symbol(test)"==String(Ue("test")),Ye=/^Symbol\((.*)\)[^)]+$/;Ge($e,"description",{configurable:!0,get:function(){var t=d(this)?this.valueOf():this,e=Be.call(t);if(S(ze,t))return"";var n=We?e.slice(7,-1):e.replace(Ye,"$1");return""===n?void 0:n}}),It({global:!0,forced:!0},{Symbol:Ve})}te("iterator");var qe=Xt("unscopables"),He=Array.prototype;null==He[qe]&&_.f(He,qe,{configurable:!0,value:$t(null)});var Je=function(t){He[qe][t]=!0},Ke=Object.defineProperty,Xe={},Qe=function(t){throw t},Ze=ht.includes,tn=function(t,e){if(S(Xe,t))return Xe[t];e||(e={});var n=[][t],r=!!S(e,"ACCESSORS")&&e.ACCESSORS,o=S(e,0)?e[0]:Qe,c=S(e,1)?e[1]:void 0;return Xe[t]=!!n&&!i((function(){if(r&&!u)return!0;var t={length:-1};r?Ke(t,1,{enumerable:!0,get:Qe}):t[1]=1,n.call(t,o,c)}))}("indexOf",{ACCESSORS:!0,1:0});It({target:"Array",proto:!0,forced:!tn},{includes:function(t){return Ze(this,t,arguments.length>1?arguments[1]:void 0)}}),Je("includes");var en,nn,rn,on=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),un=Y("IE_PROTO"),cn=Object.prototype,an=on?Object.getPrototypeOf:function(t){return t=Nt(t),S(t,un)?t[un]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?cn:null},fn=Xt("iterator"),ln=!1;[].keys&&("next"in(rn=[].keys())?(nn=an(an(rn)))!==Object.prototype&&(en=nn):ln=!0),null==en&&(en={}),S(en,fn)||A(en,fn,(function(){return this}));var sn={IteratorPrototype:en,BUGGY_SAFARI_ITERATORS:ln},pn=sn.IteratorPrototype,yn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return T(n),function(t){if(!d(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),hn=sn.IteratorPrototype,vn=sn.BUGGY_SAFARI_ITERATORS,gn=Xt("iterator"),dn="keys",bn="values",mn="entries",Sn=function(){return this},On=function(t,e,n,r,o,i,u){!function(t,e,n){var r=e+" Iterator";t.prototype=$t(pn,{next:l(1,n)}),re(t,r,!1)}(n,e,r);var c,a,f,s=function(t){if(t===o&&g)return g;if(!vn&&t in h)return h[t];switch(t){case dn:case bn:case mn:return function(){return new n(this,t)}}return function(){return new n(this)}},p=e+" Iterator",y=!1,h=t.prototype,v=h[gn]||h["@@iterator"]||o&&h[o],g=!vn&&v||s(o),d="Array"==e&&h.entries||v;if(d&&(c=an(d.call(new t)),hn!==Object.prototype&&c.next&&(an(c)!==hn&&(yn?yn(c,hn):"function"!=typeof c[gn]&&A(c,gn,Sn)),re(c,p,!0))),o==bn&&v&&v.name!==bn&&(y=!0,g=function(){return v.call(this)}),h[gn]!==g&&A(h,gn,g),o)if(a={values:s(bn),keys:i?g:s(dn),entries:s(mn)},u)for(f in a)(vn||y||!(f in h))&&nt(h,f,a[f]);else It({target:e,proto:!0,forced:vn||y},a);return a},wn="Array Iterator",En=et.set,xn=et.getterFor(wn),jn=On(Array,"Array",(function(t,e){En(this,{type:wn,target:g(t),index:0,kind:e})}),(function(){var t=xn(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");Je("keys"),Je("values"),Je("entries");var Pn=Date.prototype,Tn="Invalid Date",Rn="toString",_n=Pn.toString,An=Pn.getTime;new Date(NaN)+""!=Tn&&nt(Pn,Rn,(function(){var t=An.call(this);return t==t?_n.call(this):Tn}));var In=[].slice,Ln={},kn=function(t,e,n){if(!(e in Ln)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";Ln[e]=Function("C,a","return new C("+r.join(",")+")")}return Ln[e](t,n)},Cn=Function.bind||function(t){var e=oe(this),n=In.call(arguments,1),r=function(){var o=n.concat(In.call(arguments));return this instanceof r?kn(e,o.length,o):e.apply(t,o)};return d(e.prototype)&&(r.prototype=e.prototype),r};It({target:"Function",proto:!0},{bind:Cn}),It({target:"Object",stat:!0,sham:!u},{create:$t}),It({target:"Object",stat:!0,forced:!u,sham:!u},{defineProperty:_.f}),It({target:"Object",stat:!0},{setPrototypeOf:yn});var Nn={};Nn[Xt("toStringTag")]="z";var Dn="[object z]"===String(Nn),Fn=Xt("toStringTag"),Mn="Arguments"==p(function(){return arguments}()),Gn=Dn?p:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Fn))?n:Mn?p(e):"Object"==(r=p(e))&&"function"==typeof e.callee?"Arguments":r},Un=Dn?{}.toString:function(){return"[object "+Gn(this)+"]"};Dn||nt(Object.prototype,"toString",Un,{unsafe:!0});var zn=it("Reflect","construct"),Vn=i((function(){function t(){}return!(zn((function(){}),[],t)instanceof t)})),$n=!i((function(){zn((function(){}))})),Bn=Vn||$n;It({target:"Reflect",stat:!0,forced:Bn,sham:Bn},{construct:function(t,e){oe(t),T(e);var n=arguments.length<3?t:oe(arguments[2]);if($n&&!Vn)return zn(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(Cn.apply(t,r))}var o=n.prototype,i=$t(d(o)?o:Object.prototype),u=Function.apply.call(t,i,e);return d(u)?u:i}});var Wn=function(){var t=T(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function Yn(t,e){return RegExp(t,e)}var qn,Hn,Jn={UNSUPPORTED_Y:i((function(){var t=Yn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:i((function(){var t=Yn("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Kn=RegExp.prototype.exec,Xn=String.prototype.replace,Qn=Kn,Zn=(qn=/a/,Hn=/b*/g,Kn.call(qn,"a"),Kn.call(Hn,"a"),0!==qn.lastIndex||0!==Hn.lastIndex),tr=Jn.UNSUPPORTED_Y||Jn.BROKEN_CARET,er=void 0!==/()??/.exec("")[1];(Zn||er||tr)&&(Qn=function(t){var e,n,r,o,i=this,u=tr&&i.sticky,c=Wn.call(i),a=i.source,f=0,l=t;return u&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),l=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(a="(?: "+a+")",l=" "+l,f++),n=new RegExp("^(?:"+a+")",c)),er&&(n=new RegExp("^"+a+"$(?!\\s)",c)),Zn&&(e=i.lastIndex),r=Kn.call(u?n:i,l),u?r?(r.input=r.input.slice(f),r[0]=r[0].slice(f),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Zn&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),er&&r&&r.length>1&&Xn.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var nr=Qn;It({target:"RegExp",proto:!0,forced:/./.exec!==nr},{exec:nr});var rr="toString",or=RegExp.prototype,ir=or.toString,ur=i((function(){return"/a/b"!=ir.call({source:"a",flags:"b"})})),cr=ir.name!=rr;(ur||cr)&&nt(RegExp.prototype,rr,(function(){var t=T(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in or)?Wn.call(t):n)}),{unsafe:!0});var ar=Xt("match"),fr=function(t){if(function(t){var e;return d(t)&&(void 0!==(e=t[ar])?!!e:"RegExp"==p(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},lr=Xt("match");It({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[lr]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(v(this)).indexOf(fr(t),arguments.length>1?arguments[1]:void 0)}});var sr=function(t){return function(e,n){var r,o,i=String(v(e)),u=at(n),c=i.length;return u<0||u>=c?t?"":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===c||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):r:t?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}},pr={codeAt:sr(!1),charAt:sr(!0)},yr=pr.charAt,hr="String Iterator",vr=et.set,gr=et.getterFor(hr);On(String,"String",(function(t){vr(this,{type:hr,string:String(t),index:0})}),(function(){var t,e=gr(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=yr(n,r),e.index+=t.length,{value:t,done:!1})}));var dr=Xt("species"),br=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),mr="$0"==="a".replace(/./,"$0"),Sr=Xt("replace"),Or=!!/./[Sr]&&""===/./[Sr]("a","$0"),wr=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Er=pr.charAt,xr=function(t,e,n){return e+(n?Er(t,e).length:1)},jr=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==p(t))throw TypeError("RegExp#exec called on incompatible receiver");return nr.call(t,e)};!function(t,e,n,r){var o=Xt(t),u=!i((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),c=u&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[dr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!u||!c||"replace"===t&&(!br||!mr||Or)||"split"===t&&!wr){var a=/./[o],f=n(o,""[t],(function(t,e,n,r,o){return e.exec===nr?u&&!o?{done:!0,value:a.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:mr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Or}),l=f[0],s=f[1];nt(String.prototype,t,l),nt(RegExp.prototype,o,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)})}r&&A(RegExp.prototype[o],"sham",!0)}("match",1,(function(t,e,n){return[function(e){var n=v(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var o=T(t),i=String(this);if(!o.global)return jr(o,i);var u=o.unicode;o.lastIndex=0;for(var c,a=[],f=0;null!==(c=jr(o,i));){var l=String(c[0]);a[f]=l,""===l&&(o.lastIndex=xr(i,lt(o.lastIndex),u)),f++}return 0===f?null:a}]}));var Pr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Tr=Xt("iterator"),Rr=Xt("toStringTag"),_r=jn.values;for(var Ar in Pr){var Ir=o[Ar],Lr=Ir&&Ir.prototype;if(Lr){if(Lr[Tr]!==_r)try{A(Lr,Tr,_r)}catch(t){Lr[Tr]=_r}if(Lr[Rr]||A(Lr,Rr,Ar),Pr[Ar])for(var kr in jn)if(Lr[kr]!==jn[kr])try{A(Lr,kr,jn[kr])}catch(t){Lr[kr]=jn[kr]}}}function Cr(t){return(Cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dr(t,e)}function Dr(t,e){return(Dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Gr(t);if(e){var o=Gr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Mr(this,n)}}function Mr(t,e){return!e||"object"!==Cr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Gr(t){return(Gr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ur(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zr(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 Vr(t,e,n){return e&&zr(t.prototype,e),n&&zr(t,n),t}var $r=function(){function t(e){Ur(this,t),this.w=e}return Vr(t,[{key:"dispatch",value:function(t,e){var n=JSON.stringify({version:1,eventName:t,meta:e});this.w.parent.postMessage(n,"*")}}]),t}(),Br=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/.*/;Ur(this,t),this.w=e,this.originFilter=n,this.callbacks={}}return Vr(t,[{key:"handle",value:function(t,e){if(e.origin.match(this.originFilter))try{var n=JSON.parse(e.data),r=n.version,o=n.eventName,i=n.meta;if(r&&1!==r&&console.warn("Recieved event from incompatible script version"),o===t)return[Wr,"beyonk:portal:resize"].includes(t)?this.callbacks[t](i.height):this.callbacks[t](i)}catch(t){console.warn("Recieved unparseable event",e.data)}}},{key:"listen",value:function(t,e){this.callbacks[t]=e,this.w.addEventListener("message",this.handle.bind(this,t),!1)}},{key:"ignore",value:function(t){this.w.removeEventListener("message",this.handle.bind(this,t),!1)}}]),t}(),Wr="whitelabel:header:resize",Yr=function(t){Nr(n,t);var e=Fr(n);function n(){return Ur(this,n),e.apply(this,arguments)}return Vr(n,[{key:"subscribe",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wr;this.eventName=e,this.callbacks[e]=t,this.w.addEventListener("message",this.handle.bind(this,e),!1)}},{key:"unsubscribe",value:function(){this.w.removeEventListener("message",this.handle.bind(this,this.eventName),!1)}}]),n}(Br),qr=function(t){Nr(n,t);var e=Fr(n);function n(){return Ur(this,n),e.apply(this,arguments)}return Vr(n,[{key:"update",value:function(t){this.dispatch(Wr,{height:t})}}]),n}($r);t.RemoteEventDispatcher=$r,t.RemoteEventObserver=Br,t.ResizableElementDispatcher=qr,t.ResizableElementObserver=Yr,Object.defineProperty(t,"__esModule",{value:!0})}));
const thisVersion = 1
const legacyEventName = 'whitelabel:header:resize'

@@ -9,8 +8,2 @@ class RemoteEventDispatcher {

update (height) {
this.dispatch(legacyEventName, {
height
})
}
dispatch (eventName, meta) {

@@ -43,3 +36,6 @@ const message = JSON.stringify({

if (givenEventName === eventName) {
if (eventName === legacyEventName) {
if ([
defaultLegacyEventName,
'beyonk:portal:resize'
].includes(eventName)) {
return this.callbacks[eventName](meta.height)

@@ -55,12 +51,17 @@ }

subscribe (callback) {
this.callbacks[legacyEventName] = callback
this.w.addEventListener('message', this.handle.bind(this, legacyEventName), false)
listen (eventName, callback) {
this.callbacks[eventName] = callback
this.w.addEventListener('message', this.handle.bind(this, eventName), false)
}
unsubscribe () {
this.w.removeEventListener('message', this.handle.bind(this, legacyEventName), false)
ignore (eventName) {
this.w.removeEventListener('message', this.handle.bind(this, eventName), false)
}
}
listen (eventName, callback) {
const defaultLegacyEventName = 'whitelabel:header:resize'
class LegacyResizableElementObserver extends RemoteEventObserver {
subscribe (callback, eventName = defaultLegacyEventName) {
this.eventName = eventName
this.callbacks[eventName] = callback

@@ -70,12 +71,20 @@ this.w.addEventListener('message', this.handle.bind(this, eventName), false)

ignore (eventName) {
this.w.removeEventListener('message', this.handle.bind(this, eventName), false)
unsubscribe () {
this.w.removeEventListener('message', this.handle.bind(this, this.eventName), false)
}
}
class LegacyResizableElementDispatcher extends RemoteEventDispatcher {
update (height) {
this.dispatch(defaultLegacyEventName, {
height
})
}
}
export {
RemoteEventDispatcher as ResizableElementDispatcher,
RemoteEventObserver as ResizableElementObserver,
LegacyResizableElementDispatcher as ResizableElementDispatcher,
LegacyResizableElementObserver as ResizableElementObserver,
RemoteEventDispatcher,
RemoteEventObserver
}
{
"name": "@beyonk/embedded",
"version": "1.1.0",
"version": "1.1.1",
"description": "Embedded Beyonk Libraries",

@@ -5,0 +5,0 @@ "main": "lib/observers.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc