UNPKG

webcom

Version:

Webcom library

18 lines 165 kB
/*! * Webcom. Build realtime apps. Share and sync data instantly between your clients * * Module name: Webcom * Version: 3.8.0 * Created: 2025-06-26T13:36:46.673Z * * Copyright (C) <2015-2025> Orange * * This software is confidential and proprietary information of Orange. * You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the agreement you entered into. * Unauthorized copying of this file, via any medium is strictly prohibited. * * If you are Orange employee you shall use this software in accordance with * the Orange Source Charter (http://opensource.itn.ftgroup/index.php/Orange_Source_Charter) */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(()=>(()=>{var t={553:t=>{var e=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var r=e&&e.prototype instanceof _?e:_,o=Object.create(r.prototype),a=new R(i||[]);return o._invoke=function(t,e,n){var i=h;return function(r,o){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===r)throw o;return O()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var u=l(t,e,n);if("normal"===u.type){if(i=n.done?v:f,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=v,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",d="executing",v="completed",p={};function _(){}function g(){}function y(){}var m={};u(m,o,(function(){return this}));var k=Object.getPrototypeOf,b=k&&k(k(N([])));b&&b!==n&&i.call(b,o)&&(m=b);var w=y.prototype=_.prototype=Object.create(m);function C(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&i.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var r;this._invoke=function(t,i){function o(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(o,o):o()}}function S(t,n){var i=t.iterator[n.method];if(i===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=l(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,p;var o=r.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function N(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:O}}function O(){return{value:e,done:!0}}return g.prototype=y,u(w,"constructor",y),u(y,"constructor",g),g.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},C(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var a=new E(c(e,n,i,r),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(w),u(w,s,"Generator"),u(w,o,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},t.values=N,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(i,r){return s.type="throw",s.arg=t,n.next=i,r&&(n.method="next",n.arg=e),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;D(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:N(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},757:(t,e,n)=>{t.exports=n(553)},842:(t,e,n)=>{"use strict";n.d(e,{Yk:()=>l,ZP:()=>D,ab:()=>T,hu:()=>R});var i=n(982),r=n(671),o=n(144),a=n(885),s=n(924),u=n(55),c=n(857),l=" ",h=!1,f=15,d=[],v={},p={},_={},g="_leaf_";function y(t){return t?t.split("."):[]}function m(t){return{disabledDepth:w(t,_),enabledDepth:w(t,p)}}function k(t,e,n,i){for(var r=0;r<t.length;){var o=t[r++];e.hasOwnProperty(o)||(e[o]={}),e=e[o]}i&&Object.keys(e).forEach((function(t){return delete e[t]})),e._leaf_=n}function b(t,e){for(var n=0;n<t.length;){var i=t[n++];if(!e.hasOwnProperty(i))return;e=e[i]}delete e._leaf_}function w(t,e){var n=-1,i=0;do{e.hasOwnProperty(g)&&(n=i)}while(i<t.length&&(e=e[t[i++]]));return n}function C(t,e){Object.entries(t||{}).forEach((function(t){var n=(0,a.Z)(t,2),i=n[0],r=n[1];i===g?e(r):C(r,e)}))}function E(t,e){for(var n=[],i=0;e&&i<t.length;)e=e[t[i++]];return C(e,(function(t){return n.push(t)})),n}function S(t){h=t,d.forEach((function(t){return t.displayTimestamp=h}))}var T="LogManager",D=function(){function t(){(0,r.Z)(this,t)}return(0,o.Z)(t,null,[{key:"enable",value:function(e){(0,c.T2)([T,".enable"],arguments,(0,c.jt)(c.Z_));var n=y(e),i=m(n),r=i.enabledDepth,o=i.disabledDepth;r<=o&&(o<0&&t.disable(),k(n,p,!0,!0),b(n,_),E(n,v).forEach((function(t){return t.setLevel(N)})))}},{key:"disable",value:function(t){(0,c.T2)([T,".disable"],arguments,(0,c.jt)(c.Z_));var e=y(t),n=m(e),i=n.enabledDepth,r=n.disabledDepth;r<=i&&(k(e,_,!0,!0),b(e,p),E(e,v).forEach((function(t){return t.setLevel(-1)})))}},{key:"showTimestamp",value:function(){(0,c.T2)([T,".showTimestamp"],arguments),S(!0)}},{key:"hideTimestamp",value:function(){(0,c.T2)([T,".hideTimestamp"],arguments),S(!1)}},{key:"setPrefixWidth",value:function(t){(0,c.T2)([T,".setPrefixWidth"],arguments,c.Dp),t<0?t=0:t>l.length&&(t=l.length),f=t,d.forEach((function(t){return t.setPrefixWidth(f)}))}},{key:"level",get:function(){return N},set:function(t){(0,c.T2)([T,".level"],arguments,c.Dp),t>-1&&t!==N&&(d.forEach((function(e){return e.updateLevel(t)})),N=t)}},{key:"LOG",get:function(){return 4}},{key:"INFO",get:function(){return 3}},{key:"WARN",get:function(){return 2}},{key:"ERROR",get:function(){return 1}},{key:"NONE",get:function(){return 0}},{key:"debugOnCallback",value:function(t){var e=t&&t.toUpperCase();return function(t,n){return u.i.log("********** UPDATE ".concat(e||t.ref().pathString()," **********"),t.toString(),n?"[<<".concat(n,"]"):"")}}},{key:"debugOnCompletionCallback",value:function(t,e){var n=t&&t.toUpperCase();return function(t){return t?u.i.log("********** REVOKED ".concat(n," **********"),t):u.i.log("********** COMPLETED ".concat(n," **********")),e}}},{key:"debugOnCallbackWithCancel",value:function(e){var n=e&&e.toUpperCase();return[t.debugOnCallback(e),function(t){return u.i.log.apply(u.i,["********** COMPLETE ".concat(n," **********")].concat((0,i.Z)(t?["FAILED:",t.code,t.message]:["cancelled"])))}]}}]),t}();function R(t,e){var n=y(t),i=new s.Z(n,e||n[n.length-1],h,f);return function(t){var e=t.fqdn;k(e,v,t),d.push(t);var n=m(e),i=n.disabledDepth,r=n.enabledDepth;t.setLevel(r>=i?N:-1)}(i),i}var N=D.INFO},406:(t,e,n)=>{"use strict";n.d(e,{X2:()=>f,ZP:()=>l,t6:()=>v,uF:()=>d});var i=n(885),r=n(671),o=n(144),a=n(857),s=n(842),u=n(303),c="WebcomApp",l=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,t),(0,a.T2)(["new ",c],arguments,(0,a.wB)(/^[a-z0-9](?:[-a-z0-9]{0,38}[a-z0-9])?$/),(0,a.jt)((0,a.wE)(a.Ry,a.Z_))),this._logger=(0,s.hu)("api.WebcomApp",c),this._services={},this.appId=e,this.config={},(0,u.HD)(n)&&(n=Object.keys(v).reduce((function(t,e){return t[e]={baseUrl:n},t}),{})),this._fillConfig(n),this._logger.log("Initialized %s with options %s",e,JSON.stringify(this.config))}return(0,o.Z)(t,[{key:"dispose",value:function(){(0,a.T2)([c,"#dispose"],arguments),Object.values(this._services).forEach((function(t){return t._dispose()})),this._services={}}},{key:"_fillConfig",value:function(t){h.call(this,t,v)}},{key:"toString",value:function(){return"".concat(this.appId,"{").concat(Object.keys(this._services).join(","),"}")}}]),t}();function h(t,e){var n=this;!function t(e,r,o,s){var u=function(t){return"".concat(c,".Configuration.").concat(s.concat(t).join("."))};r=Object.assign({},r),Object.entries(o).forEach((function(o){var c=(0,i.Z)(o,2),l=c[0],h=c[1];if(h instanceof Object&&!(h instanceof Array))e[l]=e[l]||{},t(e[l],r[l]||{},h,s.concat(l));else{var f=r[l],d=h[1]||function(t){return t};try{e[l]=d(void 0===f?void 0===e[l]?h.length?h[0]:h:e[l]:f)}catch(t){var v=u(l);void 0===t.value?(0,a._y)(v,t.message):(n._logger.warn("%s: %s",v,t.message),e[l]=t.value)}}delete r[l]})),Object.keys(r).forEach((function(t){return n._logger.warn("%s: unknown config key",u(t))}))}(this.config,t,e,[])}function f(t,e){var n=e.baseUrl;return"/".concat(n.protocol.slice(0,-1),"/").concat(n.host,"/").concat(t.appId,"/")}function d(t,e,n){return"".concat(n.key,":").concat(e,":").concat(f(t,n))}var v={}},949:(t,e,n)=>{"use strict";n.d(e,{Zw:()=>M,pj:()=>L,ak:()=>A,P0:()=>b,$7:()=>m,Zr:()=>T,mh:()=>Z,n5:()=>O,oX:()=>k,_f:()=>w,yE:()=>E,iW:()=>R});var i=n(982);function r(t,e,n,i,r,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(i,r)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}}var a=n(757),s=n.n(a),u=n(939),c=n(548),l=n(671),h=n(144),f=n(857),d=n(343),v=n(803),p="LongTermSubscription",_=function(){function t(e,n,i,r){(0,l.Z)(this,t),this.data=e,this.uid=n,this.startDate=i,(0,v.CZ)(this,"_db",r)}return(0,h.Z)(t,[{key:"id",get:function(){return this.data.id}},{key:"path",get:function(){return this.data.path}},{key:"kind",get:function(){return this.data.kind}},{key:"context",get:function(){return this.data.context}},{key:"destination",get:function(){return this.data.destination}},{key:"mode",get:function(){return this.data.mode}},{key:"childEventFilter",get:function(){return this.data.childEventFilter}},{key:"expirationDate",get:function(){return new Date(1e3*this.data.expirationTimestampSeconds)}},{key:"cancel",value:function(){var t=[p,"#cancel"];return(0,f.T2)(t,arguments),T.call(this._db,t,this)}},{key:"update",value:function(t){var e=[p,"#update"];return(0,f.T2)(e,arguments,(0,f.l4)(d.Z)),R.call(this._db,e,this,t)}}]),t}(),g=n(406),y="none",m={};function k(t,e){this._auth=t.authentication,this._ltsKey=(0,g.uF)(t,"subscriptions",e),this._datasyncRoute="".concat(e.baseUrl.href,"/datasync/v2/").concat(t.appId),n(265)._this_init4browsers.call(this)}function b(t){u.J.set(this._ltsKey,t)}function w(t,e,n,i){return C.apply(this,arguments)}function C(){return(C=o(s().mark((function t(e,n,i,r){var o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=this._auth._getCurrentAuthenticationDetails(e),t.next=3,A.call(this,o,!0,V(n,i,r,m));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function E(t,e,n,i){return S.apply(this,arguments)}function S(){return(S=o(s().mark((function t(e,n,i,r){var o,a;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=this._auth._getCurrentAuthenticationDetails(e),a=d.Z.ValueChange,r||a.excludeRevocations(),t.next=5,A.call(this,o,!1,V(n,a,i,m));case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function T(t,e){return D.apply(this,arguments)}function D(){return(D=o(s().mark((function t(e,n){var i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this._auth._getCurrentAuthenticationDetails(e),t.next=3,L.call(this,i,n.id);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function R(t,e,n){return N.apply(this,arguments)}function N(){return(N=o(s().mark((function t(e,n,i){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this._auth._getCurrentAuthenticationDetails(e),t.next=3,I.call(this,r,n.data,n.startDate,i);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function O(t,e){var n=this,r=[].concat((0,i.Z)(t),["#getLongTermSubscriptions"]);(0,f.T2)(r,e);var o=this._auth._getCurrentAuthenticationDetails(r);return F.call(this).filter((function(t){return t.uid===o.uid})).map((function(t){return new _(t.data,t.uid,t.startDate,n)}))}function Z(t,e){var n=[].concat((0,i.Z)(t),["#cleanLongTermSubscriptions"]);(0,f.T2)(n,e);var r=this._auth._getCurrentAuthenticationDetails(n),o=F.call(this).filter((function(t){return t.uid!==r.uid}));this._saveLts(o)}function A(t,e,n,i){return P.apply(this,arguments)}function P(){return(P=o(s().mark((function t(e,n,i,r){var o,a,u,l;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((o=F.call(this).find((function(t){return t.uid===e.uid&&t.data.path===i.path&&t.data.kind===i.kind&&t.data.context===i.context&&t.data.destination===i.destination})))&&n&&W(o.data,o.startDate,i))){t.next=3;break}return t.abrupt("return",new _(o.data,o.uid,o.startDate,this));case 3:return t.next=5,(0,c.v_)("".concat(this._datasyncRoute,"/subscriptions"),e.uid).addHeader((0,c.E9)(e.webcomAuthToken)).addQueryParameters(n?{allowsUpdate:!0}:{delete:!0}).addJson(i).send();case 5:return a=t.sent,u=F.call(this).filter((function(t){return t.data.id!==(o&&o.data.id)})),n&&(l=new _(a.body,e.uid,r||Math.floor(Date.now()/1e3),this),u.push(Object.assign({},l))),this._saveLts(u),t.abrupt("return",l);case 10:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function L(t,e,n){return x.apply(this,arguments)}function x(){return(x=o(s().mark((function t(e,n,i){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.t)("".concat(this._datasyncRoute,"/subscriptions"),e.uid,n).addHeader((0,c.E9)(e.webcomAuthToken)).send();case 2:i||(r=F.call(this).filter((function(t){return t.data.id!==n})),this._saveLts(r));case 3:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function I(t,e,n,i){return j.apply(this,arguments)}function j(){return(j=o(s().mark((function t(e,n,i,r){var o,a,u;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.gz)("".concat(this._datasyncRoute,"/subscriptions"),e.uid,n.id).addHeader((0,c.E9)(e.webcomAuthToken)).addJson(M(n,r)).send();case 2:return o=t.sent,a=new _(o.body,e.uid,i,this),u=F.call(this).filter((function(t){return t.data.id!==o.body.id})),u.push(Object.assign({},a)),this._saveLts(u),t.abrupt("return",a);case 8:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function F(){return u.J.get(this._ltsKey)||[]}function V(t,e,n,i){var r={context:i&&i[n.kind]||n.context};return Object.assign({path:t.toString()},n,e,r)}function M(t,e){return Object.assign({},t,t.encryption?{encryption:{alg:t.encryption.alg}}:{},e)}function W(t,e,n){var i,r;if(t.receivesRevocations!==n.receivesRevocations||t.mode!==n.mode)return!1;if("childEvent"===t.mode){var o=t.childEventFilter,a=n.childEventFilter;if(o.added!==a.added||o.removed!==a.removed||o.changed!==a.changed)return!1}if(((null===(i=t.encryption)||void 0===i?void 0:i.alg)||y)!==((null===(r=n.encryption)||void 0===r?void 0:r.alg)||y))return!1;var s=t.expirationTimestampSeconds;return(Math.floor(Date.now()/1e3)-e)/(s-e)<.5}},343:(t,e,n)=>{"use strict";n.d(e,{Z:()=>f,_:()=>d});var i,r=n(885),o=n(942),a=n(671),s=n(144),u=n(857),c=n(803),l=n(109),h="EventDescriptor",f=function(){function t(e){var n;((0,a.Z)(this,t),this.mode=e,e===_)&&(this.childEventFilter=(n={},(0,o.Z)(n,y,!1),(0,o.Z)(n,m,!1),(0,o.Z)(n,k,!1),n))}return(0,s.Z)(t,[{key:"isValueChange",get:function(){return this.mode!==_}},{key:"isValueChangeWithoutData",get:function(){return this.mode===g}},{key:"isChildEvent",get:function(){return this.mode===_}},{key:"isChildAddition",get:function(){return this.isChildEvent&&this.childEventFilter[y]}},{key:"isChildRemoval",get:function(){return this.isChildEvent&&this.childEventFilter[m]}},{key:"isChildChange",get:function(){return this.isChildEvent&&this.childEventFilter[k]}},{key:"excludeRevocations",value:function(){return(0,u.T2)([h,"#excludeRevocations"],arguments),this.receivesRevocations=!1,this}}],[{key:"ValueChange",get:function(){var e=new t(p);return(0,c.fE)(e,"WithoutData",(function(){return e.mode=g,e})),e}},{key:"Child",get:function(){var e=new t(_);return v(e,"Addition",y),v(e,"Removal",m),v(e,"Change",k),e}}]),t}();function d(t,e){var n;return t.mode===_?(n=Object.entries(t.childEventFilter).filter((function(t){var e=(0,r.Z)(t,2);e[0];return e[1]})).map((function(t){var e=(0,r.Z)(t,1)[0];return b[e]})),e&&n.push(l.bF)):(n=[l.o9],e&&n.push(l.bc)),n}function v(t,e,n){(0,c.fE)(t,e,(function(){return t.childEventFilter[n]=!0,t}))}var p="value",_="childEvent",g="noData",y="added",m="removed",k="changed",b=(i={},(0,o.Z)(i,y,l.vs),(0,o.Z)(i,k,l.W3),(0,o.Z)(i,m,l.Y3),i)},265:(t,e,n)=>{"use strict";n.r(e),n.d(e,{_this_init4browsers:()=>u,_this_listenLts:()=>h,_this_setLtsContext:()=>d,_this_unlistenLts:()=>f});var i=n(982),r=n(885),o=n(939),a=n(857),s=n(949);function u(){var t=this;this._ltsListeners=[],this._saveLts=l,this._auth.subscribe((function(e,n){e||n.isRequired()||(t._ltsAuth&&t._ltsAuth.isAuthenticated()&&v.call(t,(function(e,n){return e.uid!==n.uid||!s.$7[e.data.kind]||(s.pj.call(t,n,e.data.id,!0).catch((function(n){return t._logger.error("Failed to cancel a long term subscription #%s: %s",e.data.id,n.message)})),!1)})),t._ltsAuth=n,p.call(t))}),!0)}function c(t){return t.filter((function(t){return t.data.encryption})).map((function(t){return[t.data.encryption,1e3*t.data.expirationTimestampSeconds]}))}function l(t){var e=c.call(this,t);this._ltsListeners.forEach((function(t){return t(e)})),e.forEach((function(t){var e=(0,r.Z)(t,1)[0];return Object.keys(e).filter((function(t){return"alg"!==t&&"kid"!==t})).forEach((function(t){return delete e[t]}))})),s.P0.call(this,t)}function h(t,e,n){(0,a.T2)([].concat((0,i.Z)(e),["#_listenLts"]),n,a.Yl),this._ltsListeners.push(t),t(c.call(this,o.J.get(this._ltsKey)))}function f(t,e,n){(0,a.T2)([].concat((0,i.Z)(e),["#_unlistenLts"]),n,a.Yl),this._ltsListeners=this._ltsListeners.filter((function(e){return e!==t}))}function d(t,e,n,r){(0,a.T2)([].concat((0,i.Z)(n),["#_setLtsContext"]),r,a.Z_,a.Z_),s.$7[t]=e,p.call(this)}function v(t){var e=o.J.get(this._ltsKey);if(e){var n,i=null===(n=this._ltsAuth)||void 0===n?void 0:n.details,r=[];e.forEach((function(e){Date.now()<1e3*e.data.expirationTimestampSeconds&&t(e,i)&&r.push(e)})),this._saveLts(r)}}function p(){var t=this;v.call(this,(function(e,n){if(n&&e.startDate&&e.uid===n.uid){var i=e.data,r=s.$7[i.kind];if(r&&r!==i.context)return t._logger.log("Refresh the context of the long term subscription #%s: %s --\x3e %s",i.id,i.context,r),s.pj.call(t,n,i.id,!0).then((function(){return delete i.id,s.ak.call(t,n,!0,(0,s.Zw)(i,{context:r}),e.startDate)})).catch((function(e){return t._logger.error("Failed to refresh the long term subscription #%s: %s",i.id,e.message)})),!1}return!0}))}},109:(t,e,n)=>{"use strict";n.d(e,{W3:()=>s,Y3:()=>a,ZP:()=>h,bF:()=>u,bc:()=>l,o9:()=>c,vs:()=>o});var i=n(671),r=n(144),o="child_added",a="child_removed",s="child_changed",u="child_ack",c="value",l="value_ack",h=function(){function t(e,n,r){var o=r.childName,a=r.prevChildName,s=r.acknowledged;(0,i.Z)(this,t),this.type=e,this.snapshotNode=n,this.childName=o,this.prevName=a,this.acknowledged=s}return(0,r.Z)(t,null,[{key:"Value",value:function(e,n){return new t(n?l:c,e,{acknowledged:e.acknowledged()})}},{key:"ChildChanged",value:function(e,n,i,r){return new t(r?u:s,e,{childName:n,prevChildName:i,acknowledged:e.acknowledged()})}},{key:"ChildRemoved",value:function(e,n,i){return e.isEmpty()?new t(u,e,{childName:n,acknowledged:i}):new t(a,e,{childName:n,acknowledged:i})}},{key:"ChildAdded",value:function(e,n,i){return new t(o,e,{childName:n,prevChildName:i,acknowledged:e.acknowledged()})}}]),t}()},466:(t,e,n)=>{"use strict";n.d(e,{DV:()=>l,RY:()=>h,s2:()=>f});var i=n(24),r=n(28),o="browser",a="mobile/",s="".concat(a,"android"),u="".concat(a,"iOS"),c={browser:"b"};c[s]="a",c[u]="i",c.node="n";var l,h=!0,f=!1,d="device",v=r.sZ.device;if(!v){var p=i.Z.window;p&&p.location?p.location.href.indexOf("webview.datasync.orange.com")<0?_(o):_(s):_(u)}function _(t){v=t,h=t===o,f=0===t.indexOf(a),l=(c[t]||"")+"3.8.0"}(0,r.x$)(d,(function(){return v}),(function(t){return _(t)}))},55:(t,e,n)=>{"use strict";n.d(e,{X:()=>c,i:()=>u});var i=n(982),r=n(24),o=n(28),a=n(303),s="console",u=o.sZ.console,c=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=function(t){return(0,a.Kn)(t)?JSON.stringify(t):(t||"undefined").toString()};if((0,a.HD)(t)){var s=0;return[t=t.replace(/%(.)/g,(function(t,e){switch(e){case"%":return"%";case"s":case"o":case"O":return o(n[s++]);case"d":case"i":case"f":return n[s++];default:return t}}))].concat((0,i.Z)(n.slice(s).map(o))).join(" ")}return[t].concat(n).map(o).join(" ")};function l(t,e,n,i,r){if(!n||!i||!r){var o=e,a=function(t){return function(e){return o("[".concat(t,"] ").concat(e))}};n=n||a("INFO"),i=i||a("WARN"),r=r||a("ERR!"),e=a("LOG ")}return{log:function(){return e.call(t,c.apply(void 0,arguments))},info:function(){return n.call(t,c.apply(void 0,arguments))},warn:function(){return i.call(t,c.apply(void 0,arguments))},error:function(){return r.call(t,c.apply(void 0,arguments))}}}if((0,a.mf)(u))u=l(r.Z,u);else if((0,a.Kn)(u)&&u){var h=u,f=h.log,d=h.info,v=h.warn,p=h.error;u=l(u,f,d,v,p)}else{u=l(r.Z.console,r.Z.console.log,r.Z.console.info,r.Z.console.warn,r.Z.console.error)}(0,o.x$)(s,(function(){return u}),(function(t){return u=t}))},28:(t,e,n)=>{"use strict";n.d(e,{HO:()=>r,sZ:()=>i,x$:()=>o});var i=n(24).Z.WebcomDependencies||{},r={};function o(t,e,n){Object.defineProperty(r,t,{enumerable:!0,get:e,set:n})}},618:(t,e,n)=>{"use strict";n.d(e,{Zi:()=>l,cv:()=>f,gr:()=>u,iK:()=>a});var i=n(24),r=n(28),o="setTimeout",a=r.sZ.setTimeout;a||(a=i.Z.setTimeout),(0,r.x$)(o,(function(){return a}),(function(t){return a=t})),i.Z.setTimeout||(i.Z.setTimeout=a),i.Z.setImmediate||(i.Z.setImmediate=a);var s="clearTimeout",u=r.sZ.clearTimeout;u||(u=i.Z.clearTimeout),(0,r.x$)(s,(function(){return u}),(function(t){return u=t})),i.Z.clearTimeout||(i.Z.clearTimeout=u),i.Z.clearImmediate||(i.Z.clearImmediate=u);var c="setInterval",l=r.sZ.setInterval;l||(l=i.Z.setInterval),(0,r.x$)(c,(function(){return l}),(function(t){return l=t}));var h="clearInterval",f=r.sZ.clearInterval;f||(f=i.Z.clearInterval),(0,r.x$)(h,(function(){return f}),(function(t){return f=t}))},519:(t,e,n)=>{"use strict";function i(t){var e=t.code||"UNKNOWN_ERROR",n=t.message||JSON.stringify(t),i=new Error("".concat(e,"[").concat(n,"]"));return i.code=e,i}n.d(e,{W:()=>i})},548:(t,e,n)=>{"use strict";n.d(e,{E9:()=>I,t:()=>x,U2:()=>A,v_:()=>L,gz:()=>P});var i=n(611);function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function o(t,e,n){return o=r()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&(0,i.Z)(o,n.prototype),o},o.apply(null,arguments)}var a=n(885),s=n(982),u=n(144),c=n(671),l=n(584),h=n(519),f=n(842),d=n(466),v=n(303),p=n(24),_=n(28),g=n(857);var y="XMLHttpRequest",m=_.sZ.XMLHttpRequest;m||(void 0===(m=p.Z.XMLHttpRequest)||function(){if(d.RY&&"Microsoft Internet Explorer"===window.navigator.appName){var t=window.navigator.userAgent.match(/MSIE (\d+[.\d]*)/);return t&&t.length>1&&parseFloat(t[1])<10}return!1}())&&(0,g._y)(g.O4,"XMLHttpRequest not found"),(0,_.x$)(y,(function(){return m}),(function(t){return m=t}));var k=(0,f.hu)("network.HttpRequest","HttpRequest"),b="application/x-www-form-urlencoded",w="application/json",C="Content-Type",E="PUT",S="PATCH",T="POST",D="DELETE",R="GET",N=(0,u.Z)((function t(e,n){(0,c.Z)(this,t),this.name=e,this.value=n})),O="HttpRequest",Z=function(){function t(e,n){(0,c.Z)(this,t);for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];this.url=(0,l.fl)([n].concat((0,s.Z)(r.filter((function(t){return t&&t.length})).map((function(t){return encodeURIComponent(t)})))).join("/"),{c:d.DV}),this.method=e.toUpperCase(),this.headers={Accept:"application/json, text/plain"}}return(0,u.Z)(t,[{key:"addQueryParameters",value:function(t){return this.url=(0,l.fl)(this.url,t),this}},{key:"addJson",value:function(t){return this.contentType=w,this.data=t,this}},{key:"addForm",value:function(t){return this.contentType=b,this.data=t,this}},{key:"addHeader",value:function(t){return(0,g.T2)([O,"#addHeader"],arguments,(0,g.jt)((0,g.l4)(N))),t&&(this.headers[t.name]=t.value),this}},{key:"readResponseHeaders",value:function(){return this.readHeaders=!0,this}},{key:"send",value:function(){var t=this;return new Promise((function(e,n){var i=null;void 0!==t.data&&[T,E,S].indexOf(t.method)>=0&&((i=t.contentType===b?(0,l.nB)(t.data):t.contentType===w?JSON.stringify(t.data):t.data)?t.headers[C]=t.contentType:delete t.headers[C]),k.log("==> ".concat(t.method," ").concat(t.url)),Object.keys(t.headers).forEach((function(e){return k.log(" > HEADER ".concat(e,": ").concat(t.headers[e]))})),i&&k.log(" > DATA: ".concat(i)),t._open(i,e,(function(t){k.log("<== ERROR: ".concat(JSON.stringify(t))),n((0,h.W)(t))}))}))}},{key:"_open",value:function(t,e,n){var i=this,r=new m,o="RESPONSE_PAYLOAD_ERROR";r.onreadystatechange=function(){if(4===r.readyState){var t=r.responseText,a=r.status;if(a>=500)n({code:o,message:"HTTP status ".concat(a)});else try{var s=t.length?JSON.parse(t):{};if(a>=400)n(s.error||s);else if(a>=200&&a<300||304===a){var u={body:s},c=u.body.error||null;c?n((0,v.Kn)(c)?c:{code:u.body.status,message:c}):(i.readHeaders&&(u.headers=function(t){var e=t.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};return e.forEach((function(t){var e=t.indexOf(": "),i=t.substring(0,e).toLowerCase();n[i]=t.substring(e+2)})),n}(r)),k.log("<== ".concat(JSON.stringify(u))),e(u))}else n({code:o,message:"HTTP status ".concat(a)})}catch(t){n({code:o,message:"invalid response payload, not a Json content type"})}}},r.open(this.method,this.url,!0),Object.entries(this.headers).forEach((function(t){var e=(0,a.Z)(t,2),n=e[0],i=e[1];return r.setRequestHeader(n,i)})),r.send(t)}}]),t}();function A(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return o(Z,[R,t].concat(n))}function P(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return o(Z,[E,t].concat(n))}function L(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return o(Z,[T,t].concat(n))}function x(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return o(Z,[D,t].concat(n))}function I(t){if(t)return new N("Authorization","Bearer ".concat(t))}},730:(t,e)=>{"use strict";var n,i={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}};i.bitArray={bitSlice:function(t,e,n){return t=i.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===n?t:i.bitArray.clamp(t,n-e)},extract:function(t,e,n){var i=Math.floor(-e-n&31);return(-32&(e+n-1^e)?t[e/32|0]<<32-i^t[e/32+1|0]>>>i:t[e/32|0]>>>i)&(1<<n)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var n=t[t.length-1],r=i.bitArray.getPartial(n);return 32===r?t.concat(e):i.bitArray._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength:function(t){var e,n=t.length;return 0===n?0:(e=t[n-1],32*(n-1)+i.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t;var n=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=i.bitArray.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:function(t,e,n){return 32===t?e:(n?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(i.bitArray.bitLength(t)!==i.bitArray.bitLength(e))return!1;var n,r=0;for(n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r},_shiftRight:function(t,e,n,r){var o,a,s;for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(o=0;o<t.length;o++)r.push(n|t[o]>>>e),n=t[o]<<32-e;return a=t.length?t[t.length-1]:0,s=i.bitArray.getPartial(a),r.push(i.bitArray.partial(e+s&31,e+s>32?n:r.pop(),1)),r},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,n;for(e=0;e<t.length;++e)n=t[e],t[e]=n>>>24|n>>>8&65280|(65280&n)<<8|n<<24;return t}},i.codec.utf8String={fromBits:function(t){var e,n,r="",o=i.bitArray.bitLength(t);for(e=0;e<o/8;e++)0==(3&e)&&(n=t[e/4]),r+=String.fromCharCode(n>>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(r))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,n=[],r=0;for(e=0;e<t.length;e++)r=r<<8|t.charCodeAt(e),3==(3&e)&&(n.push(r),r=0);return 3&e&&n.push(i.bitArray.partial(8*(3&e),r)),n}},i.codec.base64={_chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(t,e,n){var r,o="",a=0,s=i.codec.base64._chars,u=0,c=i.bitArray.bitLength(t);for(n&&(s=s.substr(0,62)+"-_"),r=0;6*o.length<c;)o+=s.charAt((u^t[r]>>>a)>>>26),a<6?(u=t[r]<<6-a,a+=26,r++):(u<<=6,a-=6);for(;3&o.length&&!e;)o+="=";return o},toBits:function(t,e){t=t.replace(/\s|=/g,"");var n,r,o=[],a=0,s=i.codec.base64._chars,u=0;for(e&&(s=s.substr(0,62)+"-_"),n=0;n<t.length;n++){if((r=s.indexOf(t.charAt(n)))<0)throw new i.exception.invalid("this isn't base64!");a>26?(a-=26,o.push(u^r>>>a),u=r<<32-a):u^=r<<32-(a+=6)}return 56&a&&o.push(i.bitArray.partial(56&a,u,1)),o}},i.codec.base64url={fromBits:function(t){return i.codec.base64.fromBits(t,1,1)},toBits:function(t){return i.codec.base64.toBits(t,1)}},i.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},i.hash.sha256.hash=function(t){return(new i.hash.sha256).update(t).finalize()},i.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=i.codec.utf8String.toBits(t));var e,n=this._buffer=i.bitArray.concat(this._buffer,t),r=this._length,o=this._length=r+i.bitArray.bitLength(t);if(o>9007199254740991)throw new i.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(e=512+r-(512+r&511);e<=o;e+=512)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(e=512+r-(512+r&511);e<=o;e+=512)this._block(n.splice(0,16));return this},finalize:function(){var t,e=this._buffer,n=this._h;for(t=(e=i.bitArray.concat(e,[i.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),n},_init:[],_key:[],_precompute:function(){var t,e,n=0,i=2;function r(t){return 4294967296*(t-Math.floor(t))|0}for(;n<64;i++){for(e=!0,t=2;t*t<=i;t++)if(i%t==0){e=!1;break}e&&(n<8&&(this._init[n]=r(Math.pow(i,.5))),this._key[n]=r(Math.pow(i,1/3)),n++)}},_block:function(t){var e,n,i,r,o=this._h,a=this._key,s=o[0],u=o[1],c=o[2],l=o[3],h=o[4],f=o[5],d=o[6],v=o[7];for(e=0;e<64;e++)e<16?n=t[e]:(i=t[e+1&15],r=t[e+14&15],n=t[15&e]=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+t[15&e]+t[e+9&15]|0),n=n+v+(h>>>6^h>>>11^h>>>25^h<<26^h<<21^h<<7)+(d^h&(f^d))+a[e],v=d,d=f,f=h,h=l+n|0,l=c,c=u,s=n+((u=s)&c^l&(u^c))+(u>>>2^u>>>13^u>>>22^u<<30^u<<19^u<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+u|0,o[2]=o[2]+c|0,o[3]=o[3]+l|0,o[4]=o[4]+h|0,o[5]=o[5]+f|0,o[6]=o[6]+d|0,o[7]=o[7]+v|0}},i.hash.sha1=function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},i.hash.sha1.hash=function(t){return(new i.hash.sha1).update(t).finalize()},i.hash.sha1.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=i.codec.utf8String.toBits(t));var e,n=this._buffer=i.bitArray.concat(this._buffer,t),r=this._length,o=this._length=r+i.bitArray.bitLength(t);if(o>9007199254740991)throw new i.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(e=this.blockSize+r-(this.blockSize+r&this.blockSize-1);e<=o;e+=this.blockSize)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(e=this.blockSize+r-(this.blockSize+r&this.blockSize-1);e<=o;e+=this.blockSize)this._block(n.splice(0,16));return this},finalize:function(){var t,e=this._buffer,n=this._h;for(t=(e=i.bitArray.concat(e,[i.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,i){return t<=19?e&n|~e&i:t<=39?e^n^i:t<=59?e&n|e&i|n&i:t<=79?e^n^i:void 0},_S:function(t,e){return e<<t|e>>>32-t},_block:function(t){var e,n,i,r,o,a,s,u,c=this._h;if("undefined"!=typeof Uint32Array){u=Array(80);for(var l=0;l<16;l++)u[l]=t[l]}else u=t;for(i=c[0],r=c[1],o=c[2],a=c[3],s=c[4],e=0;e<=79;e++)e>=16&&(u[e]=this._S(1,u[e-3]^u[e-8]^u[e-14]^u[e-16])),n=this._S(5,i)+this._f(e,r,o,a)+s+u[e]+this._key[Math.floor(e/20)]|0,s=a,a=o,o=this._S(30,r),r=i,i=n;c[0]=c[0]+i|0,c[1]=c[1]+r|0,c[2]=c[2]+o|0,c[3]=c[3]+a|0,c[4]=c[4]+s|0}},t.exports&&(t.exports=i),void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)},939:(t,e,n)=>{"use strict";n.d(e,{J:()=>p,y:()=>_});var i=n(144),r=n(671),o=n(28),a=n(24),s=function(){function t(){(0,r.Z)(this,t),this.cache_={}}return(0,i.Z)(t,[{key:"length",get:function(){return Object.keys(this.cache_).length}},{key:"key",value:function(t){var e=Object.keys(this.cache_);return 0<=t&&t<e.length?e[t]:null}},{key:"getItem",value:function(t){return this.cache_.hasOwnProperty(t)?this.cache_[t]:null}},{key:"setItem",value:function(t,e){this.cache_[t]=e}},{key:"removeItem",value:function(t){delete this.cache_[t]}},{key:"clear",value:function(){this.cache_={}}}]),t}(),u="localStorage",c=o.sZ.localStorage;c||(c=a.Z.localStorage||new s),(0,o.x$)(u,(function(){return c}),(function(t){return c=t}));var l="sessionStorage",h=o.sZ.sessionStorage;h||(h=a.Z.sessionStorage||null),(0,o.x$)(l,(function(){return h}),(function(t){return h=t}));var f=n(857);function d(t){return"webcom:"+t}var v=(0,i.Z)((function t(e,n){(0,r.Z)(this,t);var i=e();if(i){var o=d("sentinel");i.setItem(o,""),i.removeItem(o)}function a(){return e()||(0,f._y)("JSONStorage","the ".concat(n," implementation could not be found!"))}this.set=function(t,e){if(null===e)a().removeItem(d(t));else{var n=JSON.stringify(e);a().setItem(d(t),"string"==typeof n?n:"null")}},this.get=function(t){var e=a().getItem(d(t));return e&&JSON.parse(e)},this.remove=function(t){a().removeItem(d(t))}})),p=new v((function(){return c}),"localStorage"),_=new v((function(){return h}),"sessionStorage")},924:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p,k:()=>v});var i=n(671),r=n(144),o=n(982),a=n(842),s=n(55),u=n(303),c=n(857),l=n(455),h={};function f(t,e){var n=t.length;return n>=e?t.substring(0,e):t+a.Yk.substring(0,e-n)}function d(t){return t.map((function(t){return(0,u.mf)(t)?t():t}))}function v(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(0,c._y)(c.O4,s.X.apply(void 0,(0,o.Z)(d(e))))}var p=function(){function t(e,n,r,o){(0,i.Z)(this,t),this._fqdn=e,this._prefix=n;var a=e.join(".");this._count=void 0===h[a]?h[a]=0:++h[a],this.displayTimestamp=r,this.setPrefixWidth(o||8),this._log=this._emitLog.bind(this,s.i.log),this._info=this._emitLog.bind(this,s.i.info),this._warn=this._emitLog.bind(this,s.i.warn),this._error=this._emitLog.bind(this,s.i.error),this._enabled=!0}return(0,r.Z)(t,[{key:"fqdn",get:function(){return this._fqdn}},{key:"_emitLog",value:function(t,e){var n=this.displayTimestamp?[(new Date).toISOString()]:[];n.push(this._displayedPrefix);for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];(0,u.HD)(e)?(n.push(e),e=n.join(" "),t.apply(void 0,[e].concat((0,o.Z)(d(r))))):t.apply(void 0,n.concat((0,o.Z)(d([e].concat(r)))))}},{key:"setPrefixWidth",value:function(t){this._displayedPrefix="".concat(f(this._prefix,t)," #").concat(f(this._count.toString(),3))}},{key:"setLevel",value:function(t){this._enabled=t>=0,this.log=t>=a.ZP.LOG?this._log:l.ZT,this.info=t>=a.ZP.INFO?this._info:l.ZT,this.warn=t>=a.ZP.WARN?this._warn:l.ZT,this.error=t>=a.ZP.ERROR?this._error:l.ZT}},{key:"updateLevel",value:function(t){this._enabled&&this.setLevel(t)}}]),t}()},455:(t,e,n)=>{"use strict";n.d(e,{Rk:()=>a,Tl:()=>o,ZT:()=>r,mb:()=>s});var i=n(618),r=Function.prototype;function o(t){try{t()}catch(t){(0,i.iK)((function(){throw t}))}}function a(t,e){var n=t||r;try{return e(n)}catch(t){n(t)}}function s(t){return new Promise((function(e,n){return t((function(t,i){return t&&n(t)||e(i)}))}))}},24:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var i=function(){if("undefined"!=typeof globalThis)return globalThis;return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:Function("return this")()}()},303:(t,e,n)=>{"use strict";n.d(e,{HD:()=>a,Kn:()=>c,hj:()=>s,jn:()=>o,lk:()=>l,mf:()=>u});var i=n(2),r=n(466);function o(t){return"boolean"==typeof t}function a(t){return"string"==typeof t}function s(t){return"number"==typeof t}function u(t){return"function"==typeof t}function c(t){return"object"===(0,i.Z)(t)}function l(){return r.RY&&(window.navigator.userAgent.match(/CriOS|Twitter for iPhone|FBAN\/FBIOS|Windows Phone/)||window.navigator.standalone)}},803:(t,e,n)=>{"use strict";function i(t,e,n,i){return o(t.prototype,e,n,i)}function r(t,e,n,i){return a(t.prototype,e,n,i)}function o(t,e,n,i){return s(t,e,{value:n},i)}function a(t,e,n,i){return s(t,e,{get:n},i)}function s(t,e,n,i){return Object.defineProperty(t,e,Object.assign(n,{enumerable:i,configurable:!0}))}n.d(e,{CZ:()=>o,Xt:()=>i,fE:()=>a,mi:()=>r})},584:(t,e,n)=>{"use strict";n.d(e,{BN:()=>l,JQ:()=>p,dS:()=>d,fl:()=>f,nB:()=>h,q4:()=>v,zO:()=>c});var i=n(885),r=n(857),o=n(730),a=n.n(o),s=n(303);function u(t){return decodeURIComponent(t.replace(/\+/g," "))}function c(){var t=2147483648;return Math.floor(Math.random()*t).toString(36)+Math.abs(Math.floor(Math.random()*t)^Date.now()).toString(36)}function l(t){var e={};return t.replace(/^[^?]*\?/,"").split("&").forEach((function(t){var n=t.indexOf("=");if(n<0)e[u(t)]=!0;else{var i=u(t.substring(0,n));e[i]=u(t.substring(n+1))}})),e}function h(t){if(!t)return"";var e=[];return Object.entries(t).forEach((function(t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];null!=o&&((0,s.Kn)(o)&&(o=JSON.stringify(o)),e.push(encodeURIComponent(r)+"="+encodeURIComponent(o)))})),e.join("&")}function f(t,e){var n=t.indexOf("?"),i=e?(n<0?"?":"&")+h(e):"",r=t.indexOf("#");return r<0?t+i:t.substring(0,r)+i+t.substring(r)}function d(t){for(var e,n,i=[],o=0,a=0;a<t.length;a++)(e=t.charCodeAt(a))>=55296&&e<=56319&&(n=e-55296,a++,(0,r.hu)(a<t.length,"Surrogate pair missing trail surrogate."),e=65536+(n<<10)+(t.charCodeAt(a)-56320)),e<128?i[o++]=e:e<2048?(i[o++]=e>>6|192,i[o++]=63&e|128):e<65536?(i[o++]=e>>12|224,i[o++]=e>>6&63|128,i[o++]=63&e|128):(i[o++]=e>>18|240,i[o++]=e>>12&63|128,i[o++]=e>>6&63|128,i[o++]=63&e|128);return i}function v(t,e){return a().codec.base64.fromBits(a().hash.sha1.hash(t),!1,e)}function p(t,e){return a().codec.base64.fromBits(a().hash.sha256.hash(t),!1,e)}},857:(t,e,n)=>{"use strict";n.d(e,{Dp:()=>E,Hk:()=>D,IH:()=>l,O3:()=>s,O4:()=>a,O7:()=>C,Q3:()=>v,Ry:()=>S,T2:()=>d,Yl:()=>w,Z_:()=>b,_T:()=>h,__:()=>g,_y:()=>f,hu:()=>u,jt:()=>p,kw:()=>R,l4:()=>y,sR:()=>k,vA:()=>_,wB:()=>O,wE:()=>T});var i=n(2),r=n(982),o=n(303),a="Webcom internal error";function s(){f(a,"not (yet) implemented abstract member!")}function u(t,e){t||f(a,e)}var c={values:[]};function l(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];Object.assign(c,{method:t,args:e||[],checkers:i})}function h(t,e,n){c.values.push({name:t,value:e,checker:n})}var f=function(t,e){var n;throw new Error("".concat((n="").concat.apply(n,(0,r.Z)(t)),": ").concat(e))};function d(t,e){if(!c.method){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];l.apply(void 0,[t,e].concat(i))}var o=c.method,a=c.args,s=c.checkers,u=c.values;Object.assign(c,{method:void 0,args:void 0,checkers:void 0,values:[]}),a.length>s.length&&f(o,"too many arguments, ".concat(a.length," instead of ").concat(s.length)),s.forEach((function(t,e){return v(t,a[e],o,(function(t){return"argument #".concat(e+1," ").concat(t)}))})),u.forEach((function(t){var e=t.name,n=t.value;return v(t.checker,n,o,(function(t){return"".concat(e," ").concat(t)}))}))}function v(t,e,n,i){var r=t(e);r&&f(n,i(r))}function p(t){return function(e){return m("undefined")(e)&&t&&t(e)}}function _(t){return function(e){return null===e?"must not be null":t&&t(e)}}var g=function(t){return void 0===t?"is missing":""};function y(t){return function(e){return!(e instanceof t)&&"must be an instance of ".concat(t.name)}}function m(t){return function(e){return(0,i.Z)(e)!==t&&"must be a ".concat(t)}}var k=m("undefined"),b=m("string"),w=m("function"),C=m("boolean"),E=N(Number.isFinite,"must be a finite number"),S=m("object");function T(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.every((function(e){return e(t)}))&&"either ".concat(e.map((function(e){return e(t)})).join(" or "))}}function D(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){var n;return e.some((function(e){return n=e(t)}))&&n}}function R(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.every((function(e){return e!==t}))&&"must be either ".concat(e.join(" or "))}}function N(t,e){return function(n){return!t(n)&&(e||"is not valid")}}N((function(t){return(0,o.hj)(t)&&Math.floor(t)===t}),"must be an integer");function O(t,e){return N((function(e){return t.test(e)}),e)}},907:(t,e,n)=>{"use strict";function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.d(e,{Z:()=>i})},671:(t,e,n)=>{"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:()=>i})},144:(t,e,n)=>{"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}n.d(e,{Z:()=>r})},942:(t,e,n)=>{"use strict";function i(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,{Z:()=>i})},611:(t,e,n)=>{"use strict";function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}n.d(e,{Z:()=>i})},885:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(181);function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}(t,e)||(0,i.Z)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},982:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(907);var r=n(181);function o(t){return function(t){if(Array.isArray(t))return(0,i.Z)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||(0,r.Z)(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.")}()}},2:(t,e,n)=>{"use strict";function i(t){return i="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},i(t)}n.d(e,{Z:()=>i})},181:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(907);function r(t,e){if(t){if("string"==typeof t)return(0,i.Z)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,i.Z)(t,e):void 0}}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.d(i,{default:()=>g});var t=n(24),e=n(671),r=n(144),o=n(406),a=n(842),s=n(28),u=n(857),c="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",l=c.length,h=l-1,f=0,d=[];function v(t){var e=t===f;f=t;var n,i=new Array(8);for(n=7;n>=0;n--)i[n]=c.charAt(t%l),t=Math.floor(t/l);(0,u.hu)(0===t,"Cannot push at time == 0");var r=i.join("");if(e){for(n=11;n>=0&&d[n]===h;n--)d[n]=0;d[n]++}else for(n=0;n<12;n++)d[n]=Math.floor(Math.random()*