@everymatrix/general-navigation-bar 1.16.2 → 1.17.1
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.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
10
10
|
*/
|
|
11
|
-
function T(t){(function(){if(!s)throw new Error("Function called outside component initialization");return s})().$$.on_mount.push(t)}const A=[],B=[];let
|
|
11
|
+
function T(t){(function(){if(!s)throw new Error("Function called outside component initialization");return s})().$$.on_mount.push(t)}const A=[],B=[];let N=[];const S=[],H=Promise.resolve();let P=!1;function I(t){N.push(t)}
|
|
12
12
|
// flush() calls callbacks in this order:
|
|
13
13
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
14
14
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -41,15 +41,15 @@ throw A.length=0,L=0,t}for(_(null),A.length=0,L=0;B.length;)B.pop()();
|
|
|
41
41
|
// then, once components are updated, call
|
|
42
42
|
// afterUpdate functions. This may cause
|
|
43
43
|
// subsequent updates...
|
|
44
|
-
for(let t=0;t<
|
|
44
|
+
for(let t=0;t<N.length;t+=1){const e=N[t];O.has(e)||(
|
|
45
45
|
// ...so guard against infinite loops
|
|
46
|
-
O.add(e),e())}
|
|
46
|
+
O.add(e),e())}N.length=0}while(A.length);for(;S.length;)S.pop()();P=!1,O.clear(),_(t)}function x(t){if(null!==t.fragment){t.update(),n(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(I)}}
|
|
47
47
|
/**
|
|
48
48
|
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
49
|
-
*/const M=new Set;function R(t,e){const r=t.$$;null!==r.fragment&&(!function(t){const e=[],r=[];
|
|
49
|
+
*/const M=new Set;function R(t,e){const r=t.$$;null!==r.fragment&&(!function(t){const e=[],r=[];N.forEach((n=>-1===t.indexOf(n)?e.push(n):r.push(n))),r.forEach((t=>t())),N=e}(r.after_update),n(r.on_destroy),r.fragment&&r.fragment.d(e),
|
|
50
50
|
// TODO null out other refs, including component.$$ (but need to
|
|
51
51
|
// preserve final state?)
|
|
52
|
-
r.on_destroy=r.fragment=null,r.ctx=[])}function U(t,e){-1===t.$$.dirty[0]&&(A.push(t),P||(P=!0,
|
|
52
|
+
r.on_destroy=r.fragment=null,r.ctx=[])}function U(t,e){-1===t.$$.dirty[0]&&(A.push(t),P||(P=!0,H.then(C)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function D(o,a,c,l,u,h,p,d=[-1]){const m=s;_(o);const g=o.$$={fragment:null,ctx:[],
|
|
53
53
|
// state
|
|
54
54
|
props:h,update:t,not_equal:u,bound:r(),
|
|
55
55
|
// lifecycle
|
|
@@ -79,7 +79,7 @@ this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}d
|
|
|
79
79
|
if(!i(r))return t;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(r),()=>{const t=n.indexOf(r);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}})
|
|
80
80
|
/* eslint-disable no-prototype-builtins */;var G="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||
|
|
81
81
|
// eslint-disable-next-line no-undef
|
|
82
|
-
"undefined"!=typeof global&&global||{},k="URLSearchParams"in G,$="Symbol"in G&&"iterator"in Symbol,j="FileReader"in G&&"Blob"in G&&function(){try{return new Blob,!0}catch(t){return!1}}(),V="FormData"in G,
|
|
82
|
+
"undefined"!=typeof global&&global||{},k="URLSearchParams"in G,$="Symbol"in G&&"iterator"in Symbol,j="FileReader"in G&&"Blob"in G&&function(){try{return new Blob,!0}catch(t){return!1}}(),V="FormData"in G,W="ArrayBuffer"in G;if(W)var X=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],z=ArrayBuffer.isView||function(t){return t&&X.indexOf(Object.prototype.toString.call(t))>-1};function K(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function Y(t){return"string"!=typeof t&&(t=String(t)),t}
|
|
83
83
|
// Build a destructive iterator for the value list
|
|
84
84
|
function Z(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return $&&(e[Symbol.iterator]=function(){return e}),e}function q(t){this.map={},t instanceof q?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function J(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function Q(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function tt(t){var e=new FileReader,r=Q(e);return e.readAsArrayBuffer(t),r}function et(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function rt(){return this.bodyUsed=!1,this._initBody=function(t){var e;
|
|
85
85
|
/*
|
|
@@ -93,9 +93,9 @@ function Z(t){var e={next:function(){var e=t.shift();return{done:void 0===e,valu
|
|
|
93
93
|
_initBody is called.
|
|
94
94
|
*/
|
|
95
95
|
// eslint-disable-next-line no-self-assign
|
|
96
|
-
this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:j&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:V&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:k&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():
|
|
96
|
+
this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:j&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:V&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:k&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():W&&j&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=et(t.buffer),
|
|
97
97
|
// IE 10-11 can't handle a DataView body.
|
|
98
|
-
this._bodyInit=new Blob([this._bodyArrayBuffer])):
|
|
98
|
+
this._bodyInit=new Blob([this._bodyArrayBuffer])):W&&(ArrayBuffer.prototype.isPrototypeOf(t)||z(t))?this._bodyArrayBuffer=et(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):k&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},j&&(this.blob=function(){var t=J(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=J(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(j)return this.blob().then(tt);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,n,i,o=J(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=Q(e),n=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=n?n[1]:"utf-8",e.readAsText(t,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},V&&(this.formData=function(){return this.text().then(ot)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
|
99
99
|
// HTTP methods whose capitalization should be normalized
|
|
100
100
|
q.prototype.append=function(t,e){t=K(t),e=Y(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},q.prototype.delete=function(t){delete this.map[K(t)]},q.prototype.get=function(t){return t=K(t),this.has(t)?this.map[t]:null},q.prototype.has=function(t){return this.map.hasOwnProperty(K(t))},q.prototype.set=function(t,e){this.map[K(t)]=Y(e)},q.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},q.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),Z(t)},q.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),Z(t)},q.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),Z(t)},$&&(q.prototype[Symbol.iterator]=q.prototype.entries);var nt=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function it(t,e){if(!(this instanceof it))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,i=(e=e||{}).body;if(t instanceof it){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new q(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new q(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),nt.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in G)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){
|
|
101
101
|
// Search for a '_' parameter in the query string
|
|
@@ -108,7 +108,7 @@ this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.te
|
|
|
108
108
|
t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{e.append(n,i)}catch(t){console.warn("Response "+t.message)}}})),e)};
|
|
109
109
|
// This check if specifically for when a user fetches a file locally from the file system
|
|
110
110
|
// Only if the status is out of a normal range
|
|
111
|
-
i.url.startsWith("file://")&&(o.status<200||o.status>599)?n.status=200:n.status=o.status,n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var a="response"in o?o.response:o.responseText;setTimeout((function(){r(new at(a,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request timed out"))}),0)},o.onabort=function(){setTimeout((function(){n(new ct("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&G.location.href?G.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(j?o.responseType="blob":
|
|
111
|
+
i.url.startsWith("file://")&&(o.status<200||o.status>599)?n.status=200:n.status=o.status,n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var a="response"in o?o.response:o.responseText;setTimeout((function(){r(new at(a,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request timed out"))}),0)},o.onabort=function(){setTimeout((function(){n(new ct("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&G.location.href?G.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(j?o.responseType="blob":W&&(o.responseType="arraybuffer")),e&&"object"==typeof e.headers&&!(e.headers instanceof q||G.Headers&&e.headers instanceof G.Headers)){var s=[];Object.getOwnPropertyNames(e.headers).forEach((function(t){s.push(K(t)),o.setRequestHeader(t,Y(e.headers[t]))})),i.headers.forEach((function(t,e){-1===s.indexOf(e)&&o.setRequestHeader(e,t)}))}else i.headers.forEach((function(t,e){o.setRequestHeader(e,t)}));i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){
|
|
112
112
|
// DONE (success or failure)
|
|
113
113
|
4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}lt.polyfill=!0,G.fetch||(G.fetch=lt,G.Headers=q,G.Request=it,G.Response=at),
|
|
114
114
|
// the whatwg-fetch polyfill installs the fetch() function
|
|
@@ -130,7 +130,7 @@ self.fetch.bind(self);
|
|
|
130
130
|
PERFORMANCE OF THIS SOFTWARE.
|
|
131
131
|
***************************************************************************** */
|
|
132
132
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
133
|
-
var ut=function(t,e){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},ut(t,e)};function ht(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}ut(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function ft(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pt(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function dt(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function mt(t){return"function"==typeof t}function gt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}"function"==typeof SuppressedError&&SuppressedError;var yt=gt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function bt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var vt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ft(o),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(mt(c))try{c()}catch(t){i=t instanceof yt?t.errors:[t]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ft(l),h=u.next();!h.done;h=u.next()){var f=h.value;try{_t(f)}catch(t){i=null!=i?i:[],t instanceof yt?i=dt(dt([],pt(i)),pt(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}if(i)throw new yt(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)_t(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&bt(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&bt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Et=vt.EMPTY;function wt(t){return t instanceof vt||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function _t(t){mt(t)?t():t.unsubscribe()}var Tt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},At={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=At.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,dt([t,e],pt(r))):setTimeout.apply(void 0,dt([t,e],pt(r)))},clearTimeout:function(t){var e=At.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Bt(){}var St=null;function Ht(t){if(Tt.useDeprecatedSynchronousErrorHandling){var e=!St;if(e&&(St={errorThrown:!1,error:null}),t(),e){var r=St,n=r.errorThrown,i=r.error;if(St=null,n)throw i}}else t()}var Nt=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,wt(e)&&e.add(r)):r.destination=xt,r}return ht(e,t),e.create=function(t,e,r){return new Lt(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(vt),Pt=Function.prototype.bind;function It(t,e){return Pt.call(t,e)}var Ot=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Ct(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ct(t)}else Ct(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ct(t)}},t}(),Lt=function(t){function e(e,r,n){var i,o,a=t.call(this)||this;mt(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:a&&Tt.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},i={next:e.next&&It(e.next,o),error:e.error&&It(e.error,o),complete:e.complete&&It(e.complete,o)}):i=e;return a.destination=new Ot(i),a}return ht(e,t),e}(Nt);function Ct(t){var e;e=t,At.setTimeout((function(){throw e}))}var xt={closed:!0,next:Bt,error:function(t){throw t},complete:Bt},Mt="function"==typeof Symbol&&Symbol.observable||"@@observable";function Rt(t){return t}var Ut=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof Nt||function(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}(n)&&wt(n)?t:new Lt(t,e,r);return Ht((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=Dt(e))((function(e,n){var i=new Lt({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Mt]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?Rt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Dt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function Dt(t){var e;return null!==(e=null!=t?t:Tt.Promise)&&void 0!==e?e:Promise}var Ft=gt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Gt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return ht(e,t),e.prototype.lift=function(t){var e=new kt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Ft},e.prototype.next=function(t){var e=this;Ht((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=ft(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;Ht((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Ht((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?Et:(this.currentObservers=null,o.push(t),new vt((function(){e.currentObservers=null,bt(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new Ut;return t.source=this,t},e.create=function(t,e){return new kt(t,e)},e}(Ut),kt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return ht(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:Et},e}(Gt),$t={now:function(){return($t.delegate||Date).now()},delegate:void 0},jt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=$t);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return ht(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;n||(i.push(e),!o&&i.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var a=r.now(),s=0,c=1;c<n.length&&n[c]<=a;c+=2)s=c;s&&n.splice(0,s+1)}},e}(Gt);let Vt=[],Xt={};
|
|
133
|
+
var ut=function(t,e){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},ut(t,e)};function ht(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}ut(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function ft(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pt(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function dt(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function mt(t){return"function"==typeof t}function gt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}"function"==typeof SuppressedError&&SuppressedError;var yt=gt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function bt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var vt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=ft(o),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(mt(c))try{c()}catch(t){i=t instanceof yt?t.errors:[t]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ft(l),h=u.next();!h.done;h=u.next()){var f=h.value;try{_t(f)}catch(t){i=null!=i?i:[],t instanceof yt?i=dt(dt([],pt(i)),pt(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}if(i)throw new yt(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)_t(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&bt(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&bt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Et=vt.EMPTY;function wt(t){return t instanceof vt||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function _t(t){mt(t)?t():t.unsubscribe()}var Tt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},At={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=At.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,dt([t,e],pt(r))):setTimeout.apply(void 0,dt([t,e],pt(r)))},clearTimeout:function(t){var e=At.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Bt(){}var Nt=null;function St(t){if(Tt.useDeprecatedSynchronousErrorHandling){var e=!Nt;if(e&&(Nt={errorThrown:!1,error:null}),t(),e){var r=Nt,n=r.errorThrown,i=r.error;if(Nt=null,n)throw i}}else t()}var Ht=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,wt(e)&&e.add(r)):r.destination=xt,r}return ht(e,t),e.create=function(t,e,r){return new Lt(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(vt),Pt=Function.prototype.bind;function It(t,e){return Pt.call(t,e)}var Ot=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Ct(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ct(t)}else Ct(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ct(t)}},t}(),Lt=function(t){function e(e,r,n){var i,o,a=t.call(this)||this;mt(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:a&&Tt.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},i={next:e.next&&It(e.next,o),error:e.error&&It(e.error,o),complete:e.complete&&It(e.complete,o)}):i=e;return a.destination=new Ot(i),a}return ht(e,t),e}(Ht);function Ct(t){var e;e=t,At.setTimeout((function(){throw e}))}var xt={closed:!0,next:Bt,error:function(t){throw t},complete:Bt},Mt="function"==typeof Symbol&&Symbol.observable||"@@observable";function Rt(t){return t}var Ut=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof Ht||function(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}(n)&&wt(n)?t:new Lt(t,e,r);return St((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=Dt(e))((function(e,n){var i=new Lt({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Mt]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?Rt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Dt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function Dt(t){var e;return null!==(e=null!=t?t:Tt.Promise)&&void 0!==e?e:Promise}var Ft=gt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Gt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return ht(e,t),e.prototype.lift=function(t){var e=new kt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Ft},e.prototype.next=function(t){var e=this;St((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=ft(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;St((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;St((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?Et:(this.currentObservers=null,o.push(t),new vt((function(){e.currentObservers=null,bt(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new Ut;return t.source=this,t},e.create=function(t,e){return new kt(t,e)},e}(Ut),kt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return ht(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:Et},e}(Gt),$t={now:function(){return($t.delegate||Date).now()},delegate:void 0},jt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=$t);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return ht(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;n||(i.push(e),!o&&i.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var a=r.now(),s=0,c=1;c<n.length&&n[c]<=a;c+=2)s=c;s&&n.splice(0,s+1)}},e}(Gt);let Vt=[],Wt={};
|
|
134
134
|
/**
|
|
135
135
|
* @name topic
|
|
136
136
|
* @description A small wrapper over the rxjs to offer the topic method on top of it
|
|
@@ -138,14 +138,14 @@ var ut=function(t,e){return ut=Object.setPrototypeOf||{__proto__:[]}instanceof A
|
|
|
138
138
|
* @param step [String] How many values to be buffed for new subscribers - default 0
|
|
139
139
|
* @returns ReplaySubject
|
|
140
140
|
*/
|
|
141
|
-
const
|
|
141
|
+
const Xt=[];
|
|
142
142
|
/**
|
|
143
143
|
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
144
144
|
* @param {*=}value initial value
|
|
145
145
|
* @param {StartStopNotifier=} start
|
|
146
146
|
*/
|
|
147
147
|
function zt(e,r=t){let n;const i=new Set;function a(t){if(o(e,t)&&(e=t,n)){// store is ready
|
|
148
|
-
const t=!
|
|
148
|
+
const t=!Xt.length;for(const t of i)t[1](),Xt.push(t,e);if(t){for(let t=0;t<Xt.length;t+=2)Xt[t][0](Xt[t+1]);Xt.length=0}}}return{set:a,update:function(t){a(t(e))},subscribe:function(o,s=t){const c=[o,s];return i.add(c),1===i.size&&(n=r(a)||t),o(e),()=>{i.delete(c),0===i.size&&n&&(n(),n=null)}}}}function Kt(e,r,o){const a=!Array.isArray(e),s=a?[e]:e,c=r.length<2;return u=e=>{let o=!1;const u=[];let h=0,f=t;const p=()=>{if(h)return;f();const n=r(a?u[0]:u,e);c?e(n):f=i(n)?n:t},d=s.map(((t,e)=>l(t,(t=>{u[e]=t,h&=~(1<<e),o&&p()}),(()=>{h|=1<<e}))));return o=!0,p(),function(){n(d),f(),
|
|
149
149
|
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
150
150
|
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
151
151
|
// invoke this derived store.
|
|
@@ -312,7 +312,7 @@ case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
|
312
312
|
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
313
313
|
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}
|
|
314
314
|
// @generated from regex-gen.ts
|
|
315
|
-
var Be=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var
|
|
315
|
+
var Be=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Ne=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Se=/^(@+)?(\+|#+)?[rs]?$/g,He=/(\*)(0+)|(#+)(0+)|(0+)/g,Pe=/^(0+)$/;function Ie(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(Se,(function(t,r,n){
|
|
316
316
|
// @@@ case
|
|
317
317
|
return"string"!=typeof n?(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length):"+"===n?e.minimumSignificantDigits=r.length:"#"===r[0]?e.maximumSignificantDigits=r.length:(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),e}function Oe(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Le(t){
|
|
318
318
|
// Engineering
|
|
@@ -323,19 +323,19 @@ var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===
|
|
|
323
323
|
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
324
324
|
case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;
|
|
325
325
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
326
|
-
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(
|
|
326
|
+
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(He,(function(t,r,n,i,o,a){if(r)e.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}
|
|
327
327
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
328
|
-
if(Pe.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(
|
|
328
|
+
if(Pe.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(Ne.test(i.stem)){
|
|
329
329
|
// Precision
|
|
330
330
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
331
331
|
// precision-integer case
|
|
332
|
-
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(
|
|
332
|
+
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ne,(function(t,r,n,i,o,a){
|
|
333
333
|
// .000* case (before ICU67 it was .000+)
|
|
334
334
|
return"*"===n?e.minimumFractionDigits=r.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:o&&a?(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length+a.length):(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length),""}));var o=i.options[0];
|
|
335
335
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
336
336
|
"w"===o?e=le(le({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=le(le({},e),Ie(o)))}
|
|
337
337
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
338
|
-
else if(
|
|
338
|
+
else if(Se.test(i.stem))e=le(le({},e),Ie(i.stem));else{var a=Oe(i.stem);a&&(e=le(le({},e),a));var s=Le(i.stem);s&&(e=le(le({},e),s))}}return e}
|
|
339
339
|
// @generated from time-data-gen.ts
|
|
340
340
|
// prettier-ignore
|
|
341
341
|
var Me,Re={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
|
|
@@ -362,7 +362,7 @@ e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12"
|
|
|
362
362
|
var r,n=t.language;return"root"!==n&&(r=t.maximize().region),(Re[r||""]||Re[n||""]||Re["".concat(n,"-001")]||Re["001"])[0]}var De=new RegExp("^".concat(_e.source,"*")),Fe=new RegExp("".concat(_e.source,"*$"));function Ge(t,e){return{start:t,end:e}}
|
|
363
363
|
// #region Ponyfills
|
|
364
364
|
// Consolidate these variables up top for easier toggling during debugging
|
|
365
|
-
var ke=!!String.prototype.startsWith,$e=!!String.fromCodePoint,je=!!Object.fromEntries,Ve=!!String.prototype.codePointAt,
|
|
365
|
+
var ke=!!String.prototype.startsWith,$e=!!String.fromCodePoint,je=!!Object.fromEntries,Ve=!!String.prototype.codePointAt,We=!!String.prototype.trimStart,Xe=!!String.prototype.trimEnd,ze=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Ke=!0;try{
|
|
366
366
|
/**
|
|
367
367
|
* legacy Edge or Xbox One browser
|
|
368
368
|
* Unicode flag support: supported
|
|
@@ -377,9 +377,9 @@ function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n
|
|
|
377
377
|
je?Object.fromEntries:// Ponyfill
|
|
378
378
|
function(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r],o=i[0],a=i[1];e[o]=a}return e},Qe=Ve?// Native
|
|
379
379
|
function(t,e){return t.codePointAt(e)}:// IE 11
|
|
380
|
-
function(t,e){var r=t.length;if(!(e<0||e>=r)){var n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===r||(n=t.charCodeAt(e+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},tr=
|
|
380
|
+
function(t,e){var r=t.length;if(!(e<0||e>=r)){var n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===r||(n=t.charCodeAt(e+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},tr=We?// Native
|
|
381
381
|
function(t){return t.trimStart()}:// Ponyfill
|
|
382
|
-
function(t){return t.replace(De,"")},er=
|
|
382
|
+
function(t){return t.replace(De,"")},er=Xe?// Native
|
|
383
383
|
function(t){return t.trimEnd()}:// Ponyfill
|
|
384
384
|
function(t){return t.replace(Fe,"")};
|
|
385
385
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
@@ -604,7 +604,7 @@ t.INVALID_VALUE="INVALID_VALUE",
|
|
|
604
604
|
// When we need specific Intl API but it's not available
|
|
605
605
|
t.MISSING_INTL_API="MISSING_INTL_API"}(yr||(yr={}));var Er,wr=/** @class */function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.code=r,i.originalMessage=n,i}return oe(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),_r=/** @class */function(t){function e(e,r,n,i){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),yr.INVALID_VALUE,i)||this}return oe(e,t),e}(wr),Tr=/** @class */function(t){function e(e,r,n){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(r),yr.INVALID_VALUE,n)||this}return oe(e,t),e}(wr),Ar=/** @class */function(t){function e(e,r){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(r,'"'),yr.MISSING_VALUE,r)||this}return oe(e,t),e}(wr);function Br(t){return"function"==typeof t}
|
|
606
606
|
// TODO(skeleton): add skeleton support
|
|
607
|
-
function
|
|
607
|
+
function Nr(t,e,r,n,i,o,
|
|
608
608
|
// For debugging
|
|
609
609
|
a){
|
|
610
610
|
// Hot path for straight simple msg translations
|
|
@@ -619,72 +619,72 @@ if(!i||!(h in i))throw new Ar(h,a);var f=i[h];if(fe(u))f&&"string"!=typeof f&&"n
|
|
|
619
619
|
// Recursively format plural and select parts' option — which can be a
|
|
620
620
|
// nested pattern structure. The choosing of the option to use is
|
|
621
621
|
// abstracted-by and delegated-to the part helper object.
|
|
622
|
-
if(de(u)){var p="string"==typeof u.style?n.date[u.style]:we(u.style)?u.style.parsedOptions:void 0;s.push({type:Er.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(me(u)){p="string"==typeof u.style?n.time[u.style]:we(u.style)?u.style.parsedOptions:n.time.medium;s.push({type:Er.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(pe(u)){(p="string"==typeof u.style?n.number[u.style]:Ee(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),s.push({type:Er.literal,value:r.getNumberFormat(e,p).format(f)})}else{if(ve(u)){var d=u.children,m=u.value,g=i[m];if(!Br(g))throw new Tr(m,"function",a);var y=g(
|
|
622
|
+
if(de(u)){var p="string"==typeof u.style?n.date[u.style]:we(u.style)?u.style.parsedOptions:void 0;s.push({type:Er.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(me(u)){p="string"==typeof u.style?n.time[u.style]:we(u.style)?u.style.parsedOptions:n.time.medium;s.push({type:Er.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(pe(u)){(p="string"==typeof u.style?n.number[u.style]:Ee(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),s.push({type:Er.literal,value:r.getNumberFormat(e,p).format(f)})}else{if(ve(u)){var d=u.children,m=u.value,g=i[m];if(!Br(g))throw new Tr(m,"function",a);var y=g(Nr(d,e,r,n,i,o).map((function(t){return t.value})));Array.isArray(y)||(y=[y]),s.push.apply(s,y.map((function(t){return{type:"string"==typeof t?Er.literal:Er.object,value:t}})))}if(ge(u)){if(!(b=u.options[f]||u.options.other))throw new _r(u.value,f,Object.keys(u.options),a);s.push.apply(s,Nr(b.value,e,r,n,i))}else if(ye(u)){var b;if(!(b=u.options["=".concat(f)])){if(!Intl.PluralRules)throw new wr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',yr.MISSING_INTL_API,a);var v=r.getPluralRules(e,{type:u.pluralType}).select(f-(u.offset||0));b=u.options[v]||u.options.other}if(!b)throw new _r(u.value,f,Object.keys(u.options),a);s.push.apply(s,Nr(b.value,e,r,n,i,f-(u.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var r=t[t.length-1];return r&&r.type===Er.literal&&e.type===Er.literal?r.value+=e.value:t.push(e),t}),[])}(s)}
|
|
623
623
|
/*
|
|
624
624
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
625
625
|
Copyrights licensed under the New BSD License.
|
|
626
626
|
See the accompanying LICENSE file for terms.
|
|
627
627
|
*/
|
|
628
628
|
// -- MessageFormat --------------------------------------------------------
|
|
629
|
-
function
|
|
629
|
+
function Sr(t,e){return e?Object.keys(t).reduce((function(r,n){var i,o;return r[n]=(i=t[n],(o=e[n])?le(le(le({},i||{}),o||{}),Object.keys(i).reduce((function(t,e){return t[e]=le(le({},i[e]),o[e]||{}),t}),{})):i),r}),le({},t)):t}function Hr(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}}}!function(t){t[t.literal=0]="literal",t[t.object=1]="object"}(Er||(Er={}));var Pr=/** @class */function(){function t(e,r,n,i){var o,a=this;if(void 0===r&&(r=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=a.formatToParts(t);
|
|
630
630
|
// Hot path for straight simple msg translations
|
|
631
|
-
if(1===e.length)return e[0].value;var r=e.reduce((function(t,e){return t.length&&e.type===Er.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(t){return
|
|
631
|
+
if(1===e.length)return e[0].value;var r=e.reduce((function(t,e){return t.length&&e.type===Er.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(t){return Nr(a.ast,a.locales,a.formatters,a.formats,t,void 0,a.message)},this.resolvedOptions=function(){return{locale:a.resolvedLocale.toString()}},this.getAst=function(){return a.ast},
|
|
632
632
|
// Defined first because it's used to build the format pattern.
|
|
633
633
|
this.locales=r,this.resolvedLocale=t.resolveLocale(r),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
634
634
|
// Parse string messages into an AST.
|
|
635
635
|
this.ast=t.__parse(e,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
636
636
|
// Creates a new object with the specified `formats` merged with the default
|
|
637
637
|
// formats.
|
|
638
|
-
this.formats=
|
|
638
|
+
this.formats=Sr(t.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ur((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ue([void 0],e,!1)))}),{cache:Hr(o.number),strategy:vr.variadic}),getDateTimeFormat:ur((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ue([void 0],e,!1)))}),{cache:Hr(o.dateTime),strategy:vr.variadic}),getPluralRules:ur((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ue([void 0],e,!1)))}),{cache:Hr(o.pluralRules),strategy:vr.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},t.__parse=lr,
|
|
639
639
|
// Default format options used as the prototype of the `formats` provided to the
|
|
640
640
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
641
641
|
// and Intl.DateTimeFormat instances.
|
|
642
|
-
t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}();const Ir={},Or=(t,e,r)=>r?(e in Ir||(Ir[e]={}),t in Ir[e]||(Ir[e][t]=r),r):r,Lr=(t,e)=>{if(null==e)return;if(e in Ir&&t in Ir[e])return Ir[e][t];const r=nn(e);for(let n=0;n<r.length;n++){const i=Rr(r[n],t);if(i)return Or(t,e,i)}};let Cr;const xr=zt({});function Mr(t){return t in Cr}function Rr(t,e){if(!Mr(t))return null;const r=function(t){return Cr[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(t>0){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(r,e)}function Ur(t,...e){delete Ir[t],xr.update((r=>(r[t]=ne.all([r[t]||{},...e]),r)))}Kt([xr],(([t])=>Object.keys(t))),xr.subscribe((t=>Cr=t));const Dr={};function Fr(t){return Dr[t]}function Gr(t){return null!=t&&nn(t).some((t=>{var e;return null==(e=Fr(t))?void 0:e.size}))}function kr(t,e){const r=Promise.all(e.map((e=>(function(t,e){Dr[t].delete(e),0===Dr[t].size&&delete Dr[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>Ur(t,...e)))}const $r={};function jr(t){if(!Gr(t))return t in $r?$r[t]:Promise.resolve();const e=function(t){return nn(t).map((t=>{const e=Fr(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return $r[t]=Promise.all(e.map((([t,e])=>kr(t,e)))).then((()=>{if(Gr(t))return jr(t);delete $r[t]})),$r[t]}const Vr={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function
|
|
642
|
+
t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}();const Ir={},Or=(t,e,r)=>r?(e in Ir||(Ir[e]={}),t in Ir[e]||(Ir[e][t]=r),r):r,Lr=(t,e)=>{if(null==e)return;if(e in Ir&&t in Ir[e])return Ir[e][t];const r=nn(e);for(let n=0;n<r.length;n++){const i=Rr(r[n],t);if(i)return Or(t,e,i)}};let Cr;const xr=zt({});function Mr(t){return t in Cr}function Rr(t,e){if(!Mr(t))return null;const r=function(t){return Cr[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(t>0){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(r,e)}function Ur(t,...e){delete Ir[t],xr.update((r=>(r[t]=ne.all([r[t]||{},...e]),r)))}Kt([xr],(([t])=>Object.keys(t))),xr.subscribe((t=>Cr=t));const Dr={};function Fr(t){return Dr[t]}function Gr(t){return null!=t&&nn(t).some((t=>{var e;return null==(e=Fr(t))?void 0:e.size}))}function kr(t,e){const r=Promise.all(e.map((e=>(function(t,e){Dr[t].delete(e),0===Dr[t].size&&delete Dr[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>Ur(t,...e)))}const $r={};function jr(t){if(!Gr(t))return t in $r?$r[t]:Promise.resolve();const e=function(t){return nn(t).map((t=>{const e=Fr(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return $r[t]=Promise.all(e.map((([t,e])=>kr(t,e)))).then((()=>{if(Gr(t))return jr(t);delete $r[t]})),$r[t]}const Vr={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Wr(){return Vr}const Xr=zt(!1);var zr=Object.defineProperty,Kr=Object.defineProperties,Yr=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,Qr=(t,e,r)=>e in t?zr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;let tn;const en=zt(null);function rn(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function nn(t,e=Wr().fallbackLocale){const r=rn(t);return e?[...new Set([...r,...rn(e)])]:r}function on(){return null!=tn?tn:void 0}en.subscribe((t=>{tn=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const an=(sn=((t,e)=>{for(var r in e||(e={}))qr.call(e,r)&&Qr(t,r,e[r]);if(Zr)for(var r of Zr(e))Jr.call(e,r)&&Qr(t,r,e[r]);return t})({},en),Kr(sn,Yr({set:t=>{if(t&&function(t){if(null==t)return;const e=nn(t);for(let t=0;t<e.length;t++){const r=e[t];if(Mr(r))return r}}(t)&&Gr(t)){const{loadingDelay:e}=Wr();let r;return"undefined"!=typeof window&&null!=on()&&e?r=window.setTimeout((()=>Xr.set(!0)),e):Xr.set(!0),jr(t).then((()=>{en.set(t)})).finally((()=>{clearTimeout(r),Xr.set(!1)}))}return en.set(t)}})));var sn;const cn=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}};var ln=Object.defineProperty,un=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,pn=(t,e,r)=>e in t?ln(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dn=(t,e)=>{for(var r in e||(e={}))hn.call(e,r)&&pn(t,r,e[r]);if(un)for(var r of un(e))fn.call(e,r)&&pn(t,r,e[r]);return t},mn=(t,e)=>{var r={};for(var n in t)hn.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&un)for(var n of un(t))e.indexOf(n)<0&&fn.call(t,n)&&(r[n]=t[n]);return r};const gn=(t,e)=>{const{formats:r}=Wr();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},yn=cn((t=>{var e=t,{locale:r,format:n}=e,i=mn(e,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=gn("number",n)),new Intl.NumberFormat(r,i)})),bn=cn((t=>{var e=t,{locale:r,format:n}=e,i=mn(e,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=gn("date",n):0===Object.keys(i).length&&(i=gn("date","short")),new Intl.DateTimeFormat(r,i)})),vn=cn((t=>{var e=t,{locale:r,format:n}=e,i=mn(e,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=gn("time",n):0===Object.keys(i).length&&(i=gn("time","short")),new Intl.DateTimeFormat(r,i)})),En=cn((
|
|
643
643
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
644
|
-
(t,e=on())=>new Pr(t,e,
|
|
644
|
+
(t,e=on())=>new Pr(t,e,Wr().formats,{ignoreTag:Wr().ignoreTag}))),wn=(t,e={})=>{var r,n,i,o;let a=e;"object"==typeof t&&(a=t,t=a.id);const{values:s,locale:c=on(),default:l}=a;if(null==c)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=Lr(t,c);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(n=(r=Wr()).handleMissingMessage)?void 0:n.call(r,{locale:c,id:t,defaultValue:l}))?i:l)?o:t;if(!s)return u;let h=u;try{h=En(u,c).format(s)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return h},_n=(t,e)=>((t={})=>{var e=t,{locale:r=on()}=e,n=mn(e,["locale"]);return vn(dn({locale:r},n))})(e).format(t),Tn=(t,e)=>((t={})=>{var e=t,{locale:r=on()}=e,n=mn(e,["locale"]);return bn(dn({locale:r},n))})(e).format(t),An=(t,e)=>((t={})=>{var e=t,{locale:r=on()}=e,n=mn(e,["locale"]);return yn(dn({locale:r},n))})(e).format(t),Bn=(t,e=on())=>Lr(t,e),Nn=Kt([an,xr],(()=>wn));Kt([an],(()=>_n)),Kt([an],(()=>Tn)),Kt([an],(()=>An)),Kt([an,xr],(()=>Bn)),window.emWidgets={topic:(t,e=0)=>{if(-1==Vt.indexOf(t)){let r=new jt(e);Wt[t]=r,Vt.push(t)}return Wt[t]}};
|
|
645
645
|
/**
|
|
646
646
|
* @name getDevice
|
|
647
647
|
* @description A method that returns the type of the device
|
|
648
648
|
* @param {String} userAgent window.navigator.userAgent
|
|
649
649
|
* @returns {String} Android/iPhone/iPad/PC
|
|
650
650
|
*/
|
|
651
|
-
const
|
|
652
|
-
/* src/GeneralNavigationBar.svelte generated by Svelte v3.59.2 */function In(t,e,r){const n=t.slice();return n[
|
|
653
|
-
// (
|
|
654
|
-
function Ln(t){let e,r,n,i,o,a,s,c=!/*navigationBarSimple*/t[6]&&Cn(t),
|
|
655
|
-
/*div2_binding*/,t[
|
|
656
|
-
/*div2_binding*/,t[
|
|
657
|
-
// (
|
|
658
|
-
function Cn(t){let e,r,n,i,o,a,s,c,l,m,w=/*secondarymenutitle*/(t[0]||/*$_*/t[
|
|
659
|
-
// (
|
|
660
|
-
function xn(t){let e,r,n,i;return{c(){e=d("div"),r=d("img"),v(r,"class","NavigationSecondaryItemImg"),v(r,"part","NavigationSecondaryItemImg"),c(r.src,n=/*item*/t[
|
|
661
|
-
// (
|
|
662
|
-
function Mn(t){let e,r,n,i,o,a,s,c,l=/*item*/t[
|
|
663
|
-
return t[
|
|
664
|
-
// (
|
|
665
|
-
function Rn(t){let e,r,n,i;return{c(){e=d("div"),r=d("img"),v(r,"class","NavigationPrimaryItemImg"),c(r.src,n=/*item*/t[
|
|
666
|
-
// (
|
|
667
|
-
function Un(t){let e,r,n,i,o,a,s,c=/*item*/t[
|
|
668
|
-
return t[
|
|
669
|
-
// (
|
|
651
|
+
const Sn=t=>t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC";function Hn(t,e){Ur(t,e)}const Pn={en:{secondaryMenuTitle:"Categories"},"zh-hk":{secondaryMenuTitle:"類別"},fr:{secondaryMenuTitle:"Catégories"},ro:{secondaryMenuTitle:"Categorii"},es:{secondaryMenuTitle:"Categorias"},pt:{secondaryMenuTitle:"Categorias"}};
|
|
652
|
+
/* src/GeneralNavigationBar.svelte generated by Svelte v3.59.2 */function In(t,e,r){const n=t.slice();return n[37]=e[r],n[39]=r,n}function On(t,e,r){const n=t.slice();return n[37]=e[r],n}
|
|
653
|
+
// (176:0) {#if !isLoading && isMobile && showNavigation}
|
|
654
|
+
function Ln(t){let e,r,n,i,o,a,s,c,l=!/*navigationBarSimple*/t[6]&&Cn(t),m=/*primaryMenuSpliced*/t[7],g=[];for(let e=0;e<m.length;e+=1)g[e]=Un(In(t,m,e));let b=!/*navigationBarSimple*/t[6]&&Dn(t);return{c(){e=d("div"),r=d("div"),l&&l.c(),n=y(),i=d("div");for(let t=0;t<g.length;t+=1)g[t].c();o=y(),b&&b.c(),v(i,"class",a="NavigationBar "+(/*navigationWindowOpened*/t[4]?"NavigationBarOpened":"")+" "+(/*navigationBarSimple*/t[6]?"NavigationBarSimple":"")),v(i,"part",s="NavigationBar "+(/*navigationWindowOpened*/t[4]?"NavigationBarOpened":"")+" "+(/*navigationBarSimple*/t[6]?"NavigationBarSimple":"")),v(r,"class","NavigationPanel"),v(e,"class",c="NavigationWrapper "+(/*mobileLandscapeView*/t[10]?"":"NavigationWrapperLandScape"))},m(a,s){h(a,e,s),u(e,r),l&&l.m(r,null),u(r,n),u(r,i);for(let t=0;t<g.length;t+=1)g[t]&&g[t].m(i,null);u(i,o),b&&b.m(i,null)
|
|
655
|
+
/*div2_binding*/,t[25](e)},p(t,u){if(/*navigationBarSimple*/t[6]?l&&(l.d(1),l=null):l?l.p(t,u):(l=Cn(t),l.c(),l.m(r,n)),/*activeMenuItemId, primaryMenuSpliced, triggerNavigation*/16544&u[0]){let e;for(m=/*primaryMenuSpliced*/t[7],e=0;e<m.length;e+=1){const r=In(t,m,e);g[e]?g[e].p(r,u):(g[e]=Un(r),g[e].c(),g[e].m(i,o))}for(;e<g.length;e+=1)g[e].d(1);g.length=m.length}/*navigationBarSimple*/t[6]?b&&(b.d(1),b=null):b?b.p(t,u):(b=Dn(t),b.c(),b.m(i,null)),/*navigationWindowOpened, navigationBarSimple*/80&u[0]&&a!==(a="NavigationBar "+(/*navigationWindowOpened*/t[4]?"NavigationBarOpened":"")+" "+(/*navigationBarSimple*/t[6]?"NavigationBarSimple":""))&&v(i,"class",a),/*navigationWindowOpened, navigationBarSimple*/80&u[0]&&s!==(s="NavigationBar "+(/*navigationWindowOpened*/t[4]?"NavigationBarOpened":"")+" "+(/*navigationBarSimple*/t[6]?"NavigationBarSimple":""))&&v(i,"part",s),/*mobileLandscapeView*/1024&u[0]&&c!==(c="NavigationWrapper "+(/*mobileLandscapeView*/t[10]?"":"NavigationWrapperLandScape"))&&v(e,"class",c)},d(r){r&&f(e),l&&l.d(),p(g,r),b&&b.d()
|
|
656
|
+
/*div2_binding*/,t[25](null)}}}
|
|
657
|
+
// (179:6) {#if !navigationBarSimple}
|
|
658
|
+
function Cn(t){let e,r,n,i,o,a,s,c,l,m,w=/*secondarymenutitle*/(t[0]||/*$_*/t[11]("secondaryMenuTitle"))+"",_=/*secondaryMenu*/t[8],T=[];for(let e=0;e<_.length;e+=1)T[e]=Mn(On(t,_,e));return{c(){e=d("div"),r=d("span"),r.innerHTML='<slot name="close"><svg class="w-6 h-6" part="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path part="ModalCloseBtnPath" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></slot>',n=y(),i=d("h3"),o=g(w),a=y(),s=d("div");for(let t=0;t<T.length;t+=1)T[t].c();v(r,"class","ModalCloseBtn"),v(r,"part","ModalCloseBtn"),v(r,"role","button"),v(i,"class","NavigationWindowTitle"),v(s,"class","NavigationSecondaryWrapper"),v(e,"class",c="NavigationWindow "+(/*navigationWindowOpened*/t[4]?"NavigationWindowOpened":""))},m(c,f){h(c,e,f),u(e,r),u(e,n),u(e,i),u(i,o),u(e,a),u(e,s);for(let t=0;t<T.length;t+=1)T[t]&&T[t].m(s,null);l||(m=b(r,"click",/*navigationWindowToggle*/t[13]),l=!0)},p(t,r){if(/*secondarymenutitle, $_*/2049&r[0]&&w!==(w=/*secondarymenutitle*/(t[0]||/*$_*/t[11]("secondaryMenuTitle"))+"")&&E(o,w),/*activeMenuItemId, secondaryMenu, triggerNavigation*/16672&r[0]){let e;for(_=/*secondaryMenu*/t[8],e=0;e<_.length;e+=1){const n=On(t,_,e);T[e]?T[e].p(n,r):(T[e]=Mn(n),T[e].c(),T[e].m(s,null))}for(;e<T.length;e+=1)T[e].d(1);T.length=_.length}/*navigationWindowOpened*/16&r[0]&&c!==(c="NavigationWindow "+(/*navigationWindowOpened*/t[4]?"NavigationWindowOpened":""))&&v(e,"class",c)},d(t){t&&f(e),p(T,t),l=!1,m()}}}
|
|
659
|
+
// (190:16) {#if item.img}
|
|
660
|
+
function xn(t){let e,r,n,i;return{c(){e=d("div"),r=d("img"),v(r,"class","NavigationSecondaryItemImg"),v(r,"part","NavigationSecondaryItemImg"),c(r.src,n=/*item*/t[37].img)||v(r,"src",n),v(r,"alt",i=/*item*/t[37].label),v(e,"class","NavigationSecondaryItemImgWrapper"),v(e,"part","NavigationSecondaryItemImgWrapper")},m(t,n){h(t,e,n),u(e,r)},p(t,e){/*secondaryMenu*/256&e[0]&&!c(r.src,n=/*item*/t[37].img)&&v(r,"src",n),/*secondaryMenu*/256&e[0]&&i!==(i=/*item*/t[37].label)&&v(r,"alt",i)},d(t){t&&f(e)}}}
|
|
661
|
+
// (188:12) {#each secondaryMenu as item}
|
|
662
|
+
function Mn(t){let e,r,n,i,o,a,s,c,l=/*item*/t[37].label+"",p=/*item*/t[37].img&&xn(t);function m(){/*click_handler*/
|
|
663
|
+
return t[23](/*item*/t[37])}return{c(){e=d("div"),p&&p.c(),r=y(),n=d("p"),i=g(l),o=y(),v(n,"class","NavigationSecondaryItemLabel"),v(n,"part","NavigationSecondaryItemLabel"),v(e,"class",a="NavigationSecondaryItemAnchor "+(/*activeMenuItemId*/t[5]===/*item*/t[37].id?"ActiveItem":""))},m(t,a){h(t,e,a),p&&p.m(e,null),u(e,r),u(e,n),u(n,i),u(e,o),s||(c=b(e,"click",m),s=!0)},p(n,o){/*item*/(t=n)[37].img?p?p.p(t,o):(p=xn(t),p.c(),p.m(e,r)):p&&(p.d(1),p=null),/*secondaryMenu*/256&o[0]&&l!==(l=/*item*/t[37].label+"")&&E(i,l),/*activeMenuItemId, secondaryMenu*/288&o[0]&&a!==(a="NavigationSecondaryItemAnchor "+(/*activeMenuItemId*/t[5]===/*item*/t[37].id?"ActiveItem":""))&&v(e,"class",a)},d(t){t&&f(e),p&&p.d(),s=!1,c()}}}
|
|
664
|
+
// (205:12) {#if item.img}
|
|
665
|
+
function Rn(t){let e,r,n,i;return{c(){e=d("div"),r=d("img"),v(r,"class","NavigationPrimaryItemImg"),c(r.src,n=/*item*/t[37].img)||v(r,"src",n),v(r,"alt",i=/*item*/t[37].label),v(e,"class","NavigationPrimaryItemImgWrapper")},m(t,n){h(t,e,n),u(e,r)},p(t,e){/*primaryMenuSpliced*/128&e[0]&&!c(r.src,n=/*item*/t[37].img)&&v(r,"src",n),/*primaryMenuSpliced*/128&e[0]&&i!==(i=/*item*/t[37].label)&&v(r,"alt",i)},d(t){t&&f(e)}}}
|
|
666
|
+
// (203:8) {#each primaryMenuSpliced as item, i}
|
|
667
|
+
function Un(t){let e,r,n,i,o,a,s,c=/*item*/t[37].label+"",l=/*item*/t[37].img&&Rn(t);function p(){/*click_handler_1*/
|
|
668
|
+
return t[24](/*item*/t[37])}return{c(){e=d("div"),l&&l.c(),r=y(),n=d("p"),i=g(c),v(n,"class","NavigationPrimaryItemLabel"),v(e,"class",o="NavigationPrimaryItemAnchor NavItem"+/*i*/t[39]+" "+(/*activeMenuItemId*/t[5]===/*item*/t[37].id?"ActiveItem":""))},m(t,o){h(t,e,o),l&&l.m(e,null),u(e,r),u(e,n),u(n,i),a||(s=b(e,"click",p),a=!0)},p(n,a){/*item*/(t=n)[37].img?l?l.p(t,a):(l=Rn(t),l.c(),l.m(e,r)):l&&(l.d(1),l=null),/*primaryMenuSpliced*/128&a[0]&&c!==(c=/*item*/t[37].label+"")&&E(i,c),/*activeMenuItemId, primaryMenuSpliced*/160&a[0]&&o!==(o="NavigationPrimaryItemAnchor NavItem"+/*i*/t[39]+" "+(/*activeMenuItemId*/t[5]===/*item*/t[37].id?"ActiveItem":""))&&v(e,"class",o)},d(t){t&&f(e),l&&l.d(),a=!1,s()}}}
|
|
669
|
+
// (213:8) {#if !navigationBarSimple}
|
|
670
670
|
function Dn(t){let e,r,n,i,o;function a(t,e){/*imageIconUrl*/
|
|
671
|
-
return t[9]?Gn:Fn}let s=a(t),c=s(t);return{c(){e=d("button"),r=d("span"),c.c(),v(r,"part","NavigationButtonSpan"),v(e,"class",n="NavigationButton "+(/*navigationWindowOpened*/t[4]?"NavigationButtonActive":""))},m(n,a){h(n,e,a),u(e,r),c.m(r,null),i||(o=b(e,"click",/*navigationWindowToggle*/t[
|
|
672
|
-
// (
|
|
671
|
+
return t[9]?Gn:Fn}let s=a(t),c=s(t);return{c(){e=d("button"),r=d("span"),c.c(),v(r,"part","NavigationButtonSpan"),v(e,"class",n="NavigationButton "+(/*navigationWindowOpened*/t[4]?"NavigationButtonActive":""))},m(n,a){h(n,e,a),u(e,r),c.m(r,null),i||(o=b(e,"click",/*navigationWindowToggle*/t[13]),i=!0)},p(t,i){s===(s=a(t))&&c?c.p(t,i):(c.d(1),c=s(t),c&&(c.c(),c.m(r,null))),/*navigationWindowOpened*/16&i[0]&&n!==(n="NavigationButton "+(/*navigationWindowOpened*/t[4]?"NavigationButtonActive":""))&&v(e,"class",n)},d(t){t&&f(e),c.d(),i=!1,o()}}}
|
|
672
|
+
// (218:14) {:else}
|
|
673
673
|
function Fn(e){let r,n,i,o,a,s,c,l,p,d,y,b,E,w,_,T,A;return{c(){r=m("svg"),n=m("defs"),i=m("style"),o=g(".a{fill:var(--emfe-w-color-white, #FFFFFF);stroke:var(--emfe-w-color-primary, #D0046C);stroke-linecap:round;stroke-linejoin:round;}.b{stroke:none;}.c{fill:none;}"),a=m("g"),s=m("g"),c=m("rect"),l=m("rect"),p=m("g"),d=m("rect"),y=m("rect"),b=m("g"),E=m("rect"),w=m("rect"),_=m("g"),T=m("rect"),A=m("rect"),v(c,"class","b"),v(c,"part","b"),v(c,"width","10"),v(c,"height","10"),v(c,"rx","2"),v(l,"class","c"),v(l,"part","c"),v(l,"x","0.5"),v(l,"y","0.5"),v(l,"width","9"),v(l,"height","9"),v(l,"rx","1.5"),v(s,"class","a"),v(s,"part","a"),v(s,"transform","translate(150 514)"),v(d,"class","b"),v(d,"part","b"),v(d,"width","10"),v(d,"height","10"),v(d,"rx","2"),v(y,"class","c"),v(y,"part","c"),v(y,"x","0.5"),v(y,"y","0.5"),v(y,"width","9"),v(y,"height","9"),v(y,"rx","1.5"),v(p,"class","a"),v(p,"part","a"),v(p,"transform","translate(161 514)"),v(E,"class","b"),v(E,"part","b"),v(E,"width","10"),v(E,"height","10"),v(E,"rx","2"),v(w,"class","c"),v(w,"part","c"),v(w,"x","0.5"),v(w,"y","0.5"),v(w,"width","9"),v(w,"height","9"),v(w,"rx","1.5"),v(b,"class","a"),v(b,"part","a"),v(b,"transform","translate(161 525)"),v(T,"class","b"),v(T,"part","b"),v(T,"width","10"),v(T,"height","10"),v(T,"rx","2"),v(A,"class","c"),v(A,"part","c"),v(A,"x","0.5"),v(A,"y","0.5"),v(A,"width","9"),v(A,"height","9"),v(A,"rx","1.5"),v(_,"class","a"),v(_,"part","a"),v(_,"transform","translate(150 525)"),v(a,"transform","translate(-150 -514)"),v(r,"class","middleIcon"),v(r,"xmlns","http://www.w3.org/2000/svg"),v(r,"width","21"),v(r,"height","21"),v(r,"viewBox","0 0 21 21")},m(t,e){h(t,r,e),u(r,n),u(n,i),u(i,o),u(r,a),u(a,s),u(s,c),u(s,l),u(a,p),u(p,d),u(p,y),u(a,b),u(b,E),u(b,w),u(a,_),u(_,T),u(_,A)},p:t,d(t){t&&f(r)}}}
|
|
674
|
-
// (
|
|
675
|
-
function Gn(t){let e,r;return{c(){e=d("img"),c(e.src,r=/*imageIconUrl*/t[9])||v(e,"src",r),v(e,"class","middleIcon"),v(e,"alt",/*imageIconUrl*/t[9])},m(t,r){h(t,e,r)},p(t,n){/*imageIconUrl*/512&n[0]&&!c(e.src,r=/*imageIconUrl*/t[9])&&v(e,"src",r),/*imageIconUrl*/512&n[0]&&v(e,"alt",/*imageIconUrl*/t[9])},d(t){t&&f(e)}}}function kn(e){let r,n=!/*isLoading*/e[1]&&/*isMobile*/e[
|
|
674
|
+
// (216:14) {#if imageIconUrl}
|
|
675
|
+
function Gn(t){let e,r;return{c(){e=d("img"),c(e.src,r=/*imageIconUrl*/t[9])||v(e,"src",r),v(e,"class","middleIcon"),v(e,"alt",/*imageIconUrl*/t[9])},m(t,r){h(t,e,r)},p(t,n){/*imageIconUrl*/512&n[0]&&!c(e.src,r=/*imageIconUrl*/t[9])&&v(e,"src",r),/*imageIconUrl*/512&n[0]&&v(e,"alt",/*imageIconUrl*/t[9])},d(t){t&&f(e)}}}function kn(e){let r,n=!/*isLoading*/e[1]&&/*isMobile*/e[12]&&/*showNavigation*/e[3]&&Ln(e);return{c(){n&&n.c(),r=g(""),this.c=t},m(t,e){n&&n.m(t,e),h(t,r,e)},p(t,e){!/*isLoading*/t[1]&&/*isMobile*/t[12]&&/*showNavigation*/t[3]?n?n.p(t,e):(n=Ln(t),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:t,o:t,d(t){n&&n.d(t),t&&f(r)}}}function $n(t,e,r){let n;var i,o;i=Nn,o=t=>r(11,n=t),t.$$.on_destroy.push(l(i,o));let a,s,{cmsendpoint:c=""}=e,{lang:u=""}=e,{env:h=""}=e,{secondarymenutitle:f=""}=e,{userroles:p=""}=e,{clientstyling:d=""}=e,{clientstylingurl:m=""}=e,{translationurl:g=""}=e,{activecategory:y=""}=e,b=window.navigator.userAgent,v="PC"!==Sn(b),E=!0,w=!1,_=!1,A="",N=!1,S=[],H=[],P=[],I="",O={};Object.keys(Pn).forEach((t=>{Hn(t,Pn[t])}));const L=t=>{if(t.data)switch(t.data.type){case"PlayerAccountMenuActive":case"OpenLoginRegisterModal":case"GoToHomepage":r(4,_=!1)}},C=()=>{r(10,s=v&&window.innerHeight/window.innerWidth>1),r(1,E=!0);let t=Sn(b),e=new URL(`${c}/${u}/bottom-mobile-menu?env=${h}`);e.searchParams.append("userRoles",p),t&&e.searchParams.append("device","mtWeb"),fetch(e.href).then((t=>t.json())).then((t=>{
|
|
676
676
|
// Reset arrays
|
|
677
|
-
S=[],r(8,
|
|
677
|
+
S=[],r(8,P=[]),
|
|
678
678
|
// Show navigation only if there are items coming from CMS
|
|
679
|
-
r(3,
|
|
679
|
+
r(3,w=t.length>0),
|
|
680
680
|
// Get items
|
|
681
681
|
t.forEach((t=>{
|
|
682
682
|
//check if the operator wants an event interpreted
|
|
683
|
-
|
|
683
|
+
O[t.label]=t.eventTrigger?t.path:null,"/menu-item"==t.path?(r(9,I=null==t?void 0:t.img),r(8,P=t.children)):S.push(t)})),
|
|
684
684
|
// Hide secondary menu if there are no items configured in CMS
|
|
685
|
-
r(6,
|
|
685
|
+
r(6,N=0==P.length),(t=>{r(7,H=[]),r(7,H=N?t.splice(0,5):t.splice(0,4)),y&&x()})(S),r(1,E=!1)})).then((()=>{
|
|
686
686
|
// html menu item is generated after fetching data. after this, set custom styling
|
|
687
|
-
|
|
687
|
+
d&&R(),m&&U()})).catch((t=>{r(1,E=!1),console.error(t)}))},x=()=>{const t=H.concat(P).find((t=>t.path.includes(y)));t&&r(5,A=t.id)},M=(t,e,r,n)=>{O[n]?window.postMessage({type:"MobileBottomNavigationEvent",event:O[n]},window.location.href):window.postMessage({type:"NavigateTo",url:t,target:e,externalLink:r},window.location.href),
|
|
688
688
|
//Analytics event
|
|
689
|
-
"function"==typeof gtag&>ag("event","ChangeMenu",{context:"MobileBottomNavigation",menuItem:`${t}`})},
|
|
689
|
+
"function"==typeof gtag&>ag("event","ChangeMenu",{context:"MobileBottomNavigation",menuItem:`${t}`})},R=()=>{let t=document.createElement("style");d&&a&&(t.innerHTML=d,a.appendChild(t))},U=()=>{let t=new URL(m),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{a.appendChild(e)}),1)}))},D=()=>{var t;t=u,an.set(t)};T((()=>(window.addEventListener("message",L,!1),()=>{window.removeEventListener("message",L)})));return t.$$set=t=>{"cmsendpoint"in t&&r(15,c=t.cmsendpoint),"lang"in t&&r(16,u=t.lang),"env"in t&&r(17,h=t.env),"secondarymenutitle"in t&&r(0,f=t.secondarymenutitle),"userroles"in t&&r(18,p=t.userroles),"clientstyling"in t&&r(19,d=t.clientstyling),"clientstylingurl"in t&&r(20,m=t.clientstylingurl),"translationurl"in t&&r(21,g=t.translationurl),"activecategory"in t&&r(22,y=t.activecategory)},t.$$.update=()=>{/*activecategory, isLoading*/4194306&t.$$.dirty[0]&&y&&!E&&x(),/*lang*/65536&t.$$.dirty[0]&&u&&D(),/*cmsendpoint, lang, env, userroles*/491520&t.$$.dirty[0]&&c&&u&&h&&p&&C(),/*clientstyling, customStylingContainer*/524292&t.$$.dirty[0]&&d&&a&&R(),/*clientstylingurl, customStylingContainer*/1048580&t.$$.dirty[0]&&m&&a&&U(),/*translationurl*/2097152&t.$$.dirty[0]&&g&&fetch(g).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Hn(e,t[e])}))})).catch((t=>{console.log(t)}))},[f,E,a,w,_,A,N,H,P,I,s,n,v,()=>{r(4,_=!_),window.postMessage({type:"MobileBottomNav",navigationWindowOpened:_},window.location.href)},M,c,u,h,p,d,m,g,y,t=>{t.attrs?.target?M(t.path,t.attrs?.target,t?.externalLink,t.label):M(t.path,null,t?.externalLink,t.label)},t=>{t.attrs?.target?M(t.path,t.attrs?.target,t?.externalLink,t.label):M(t.path,null,t?.externalLink,t.label)},function(t){B[t?"unshift":"push"]((()=>{a=t,r(2,a)}))}]}class jn extends F{constructor(t){super();const e=document.createElement("style");e.textContent='.NavigationWrapper{background:var(--emfe-w-color-gray-50, #F9F8F8);width:100%;height:100px}.NavigationPanel{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);width:calc(100% - 30px);max-width:450px;height:70px;z-index:30}.NavigationWindow{display:flex;flex-direction:column;background:var(--emfe-w-color-white, #FFFFFF);position:absolute;bottom:30px;left:0;opacity:0;transform:translateY(100%);border-radius:5px 5px 0 0;transition:0.25s ease;width:100%;max-height:40vh}.NavigationWindow.NavigationWindowOpened{opacity:1;padding-bottom:60px;transform:translateY(5px)}.NavigationWindow .ModalCloseBtn{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:100%;color:var(--emfe-w-color-secondary, var(--emfe-w-color-orange-500, #FD2839));background:rgba(255, 255, 255, 0.1);cursor:pointer;transition:all 150ms ease-in-out;z-index:1}.NavigationWindow .ModalCloseBtn svg{width:24px;height:24px;margin:50%;transform:translate(-50%, -50%)}.NavigationWindow .ModalCloseBtn:hover{background:rgba(255, 255, 255, 0.2)}.NavigationWindow .NavigationWindowTitle{padding:16px 10px;margin:0;color:var(--emfe-w-color-black, #000000);font-size:12px;flex-grow:0}.NavigationWindow .NavigationSecondaryWrapper{display:flex;flex-wrap:wrap;padding:0 10px;flex-grow:1;overflow-y:auto;-webkit-overflow-scrolling:touch}.NavigationPrimaryItemAnchor.NavItem0{grid-area:item0}.NavigationPrimaryItemAnchor.NavItem1{grid-area:item1}.NavigationPrimaryItemAnchor.NavItem2{grid-area:item2}.NavigationPrimaryItemAnchor.NavItem3{grid-area:item3}.NavigationPrimaryItemAnchor.NavItem4{grid-area:item4}.NavigationBar{background:var(--emfe-w-color-white, #FFFFFF);display:grid;grid-auto-flow:column;grid-template-columns:1fr 1fr 20% 1fr 1fr;grid-template-areas:"item0 item1 . item2 item3";height:70px;border-radius:5px;position:relative}.NavigationBar.NavigationBarSimple{grid-template-columns:repeat(5, 20%);grid-template-areas:"item0 item1 item2 item3 item4"}.NavigationBar.NavigationBarOpened{box-shadow:0 0 11px rgba(0, 0, 0, 0.09)}.NavigationPrimaryItemAnchor,.NavigationSecondaryItemAnchor{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-decoration:none;color:var(--emfe-w-color-black, #000000);font-size:9px;overflow:hidden;white-space:nowrap;padding-bottom:12px}.NavigationPrimaryItemAnchor .NavigationPrimaryItemImg,.NavigationSecondaryItemAnchor .NavigationPrimaryItemImg,.NavigationSecondaryItemAnchor .NavigationSecondaryItemImg{width:20px}.NavigationPrimaryItemAnchor .NavigationPrimaryItemLabel,.NavigationSecondaryItemAnchor .NavigationPrimaryItemLabel,.NavigationSecondaryItemAnchor .NavigationSecondaryItemLabel{margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;text-align:center}.NavigationSecondaryItemAnchor{width:25%;padding:10px 0}.ActiveItem{background-color:var(--emfe-w-color-primary-50, var(--emfe-w-color-pink-20, #FBECF4))}.NavigationButton{background:var(--emfe-w-color-white, #FFFFFF);border:none;width:20%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);padding:0;padding-bottom:12px}.NavigationButton .middleIcon{width:32px;height:32px}.NavigationButton:before{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid var(--emfe-w-color-gray-50, #F9F8F8);content:"";height:0;left:50%;opacity:0;position:absolute;top:0;transform:translateX(-50%);width:0}.NavigationButton.NavigationButtonActive:before{opacity:1;transition:0.7s ease}',this.shadowRoot.appendChild(e),D(this,{target:this.shadowRoot,props:w(this.attributes),customElement:!0},$n,kn,o,{cmsendpoint:15,lang:16,env:17,secondarymenutitle:0,userroles:18,clientstyling:19,clientstylingurl:20,translationurl:21,activecategory:22},null,[-1,-1]),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),C()))}static get observedAttributes(){return["cmsendpoint","lang","env","secondarymenutitle","userroles","clientstyling","clientstylingurl","translationurl","activecategory"]}get cmsendpoint(){return this.$$.ctx[15]}set cmsendpoint(t){this.$$set({cmsendpoint:t}),C()}get lang(){return this.$$.ctx[16]}set lang(t){this.$$set({lang:t}),C()}get env(){return this.$$.ctx[17]}set env(t){this.$$set({env:t}),C()}get secondarymenutitle(){return this.$$.ctx[0]}set secondarymenutitle(t){this.$$set({secondarymenutitle:t}),C()}get userroles(){return this.$$.ctx[18]}set userroles(t){this.$$set({userroles:t}),C()}get clientstyling(){return this.$$.ctx[19]}set clientstyling(t){this.$$set({clientstyling:t}),C()}get clientstylingurl(){return this.$$.ctx[20]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),C()}get translationurl(){return this.$$.ctx[21]}set translationurl(t){this.$$set({translationurl:t}),C()}get activecategory(){return this.$$.ctx[22]}set activecategory(t){this.$$set({activecategory:t}),C()}}return!customElements.get("general-navigation-bar")&&customElements.define("general-navigation-bar",jn),jn}));
|
|
690
690
|
//# sourceMappingURL=general-navigation-bar.js.map
|