@micro-lc/preview 0.5.0-rc9 → 0.5.1-rc1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +20 -0
- package/dist/index.d.ts +1 -1
- package/package.json +10 -10
- package/website/assets/{index-11acce20.js → index-c372c995.js} +1 -1
- package/website/development/assets/{index-49595118.js → index-ea7e80d3.js} +11 -3
- package/website/development/index.html +1 -1
- package/website/development/manifest.json +1 -1
- package/website/development/service-worker.js +0 -1
- package/website/index.html +1 -1
- package/website/manifest.json +1 -1
- package/website/service-worker.js +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
### Versioning
|
4
|
+
|
5
|
+
- Dev dependencies updated
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- empty tag info list is emitted on bootstrap errors
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
- preview provides the upward communication channel to webcomponents
|
14
|
+
|
15
|
+
## [0.5.0] - 2023-06-19
|
16
|
+
|
3
17
|
### Added
|
4
18
|
|
5
19
|
- standalone service-worker that might act as a reverse proxy when employed
|
@@ -10,6 +24,12 @@
|
|
10
24
|
- `rxjs` bumped to version `v7.8.1`
|
11
25
|
- development dependencies bumped
|
12
26
|
|
27
|
+
## [0.4.2] - 2023-05-09
|
28
|
+
|
29
|
+
### Added
|
30
|
+
|
31
|
+
- added support for `zone.js`
|
32
|
+
|
13
33
|
## [0.4.1] - 2023-04-07
|
14
34
|
|
15
35
|
### Versioning
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Manifest } from '@micro-lc/
|
1
|
+
import type { Manifest } from '@micro-lc/compose-toolkit';
|
2
2
|
import type { Component, PluginConfiguration } from '@micro-lc/interfaces/schemas/v2';
|
3
3
|
interface UrlMatchPair {
|
4
4
|
headers?: Record<string, string>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@micro-lc/preview",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.1-rc1",
|
4
4
|
"module": "./dist/index.js",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"files": [
|
@@ -23,21 +23,21 @@
|
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
25
|
"@micro-lc/composer": "^2.0.3",
|
26
|
-
"@micro-lc/post-channel": "0.
|
26
|
+
"@micro-lc/post-channel": "0.1.0",
|
27
27
|
"es-module-shims": "^1.7.3",
|
28
28
|
"rxjs": "^7.8.1"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
|
-
"@micro-lc/
|
32
|
-
"@micro-lc/interfaces": "^1.0
|
33
|
-
"@playwright/test": "^1.
|
34
|
-
"@types/node": "^20.2
|
35
|
-
"typescript": "^5.
|
31
|
+
"@micro-lc/compose-toolkit": "^0.1.1",
|
32
|
+
"@micro-lc/interfaces": "^1.1.0",
|
33
|
+
"@playwright/test": "^1.35.1",
|
34
|
+
"@types/node": "^20.3.2",
|
35
|
+
"typescript": "^5.1.5",
|
36
36
|
"vite": "^4.3.9",
|
37
|
-
"vite-plugin-mkcert": "^1.
|
37
|
+
"vite-plugin-mkcert": "^1.16.0"
|
38
38
|
},
|
39
39
|
"engines": {
|
40
|
-
"node": ">=v16.20.
|
40
|
+
"node": ">=v16.20.1"
|
41
41
|
},
|
42
|
-
"stableVersion": "0.
|
42
|
+
"stableVersion": "0.5.0"
|
43
43
|
}
|
@@ -12,4 +12,4 @@ var ss=Object.defineProperty;var os=(t,e,n)=>e in t?ss(t,e,{enumerable:!0,config
|
|
12
12
|
`+n.map(function(r,s){return s+1+") "+r.toString()}).join(`
|
13
13
|
`):"",this.name="UnsubscriptionError",this.errors=n}});function it(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var ce=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=Pe(c),h=f.next();!h.done;h=f.next()){var d=h.value;d.remove(this)}}catch(C){e={error:C}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}else c.remove(this);var _=this.initialTeardown;if(N(_))try{_()}catch(C){o=C instanceof tn?C.errors:[C]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var S=Pe(g),x=S.next();!x.done;x=S.next()){var P=x.value;try{sr(P)}catch(C){o=o??[],C instanceof tn?o=fe(fe([],ae(o)),ae(C.errors)):o.push(C)}}}catch(C){r={error:C}}finally{try{x&&!x.done&&(s=S.return)&&s.call(S)}finally{if(r)throw r.error}}}if(o)throw new tn(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)sr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&it(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&it(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Tr=ce.EMPTY;function Pr(t){return t instanceof ce||t&&"closed"in t&&N(t.remove)&&N(t.add)&&N(t.unsubscribe)}function sr(t){N(t)?t():t.unsubscribe()}var Mr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},fn={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=fn.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,fe([t,e],ae(n))):setTimeout.apply(void 0,fe([t,e],ae(n)))},clearTimeout:function(t){var e=fn.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Rr(t){fn.setTimeout(function(){throw t})}function or(){}function St(t){t()}var yn=function(t){de(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Pr(n)&&n.add(r)):r.destination=ps,r}return e.create=function(n,r,s){return new Et(n,r,s)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},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(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(ce),fs=Function.prototype.bind;function nn(t,e){return fs.call(t,e)}var hs=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){$t(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){$t(r)}else $t(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){$t(n)}},t}(),Et=function(t){de(e,t);function e(n,r,s){var o=t.call(this)||this,c;if(N(n)||!n)c={next:n??void 0,error:r??void 0,complete:s??void 0};else{var f;o&&Mr.useDeprecatedNextContext?(f=Object.create(n),f.unsubscribe=function(){return o.unsubscribe()},c={next:n.next&&nn(n.next,f),error:n.error&&nn(n.error,f),complete:n.complete&&nn(n.complete,f)}):c=n}return o.destination=new hs(c),o}return e}(yn);function $t(t){Rr(t)}function ds(t){throw t}var ps={closed:!0,next:or,error:ds,complete:or},_n=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function gn(t){return t}function ms(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return jr(t)}function jr(t){return t.length===0?gn:t.length===1?t[0]:function(n){return t.reduce(function(r,s){return s(r)},n)}}var ee=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var s=this,o=bs(e)?e:new Et(e,n,r);return St(function(){var c=s,f=c.operator,h=c.source;o.add(f?f.call(o,h):h?s._subscribe(o):s._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=ar(n),new n(function(s,o){var c=new Et({next:function(f){try{e(f)}catch(h){o(h),c.unsubscribe()}},error:o,complete:s});r.subscribe(c)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[_n]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return jr(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ar(e),new e(function(r,s){var o;n.subscribe(function(c){return o=c},function(c){return s(c)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function ar(t){var e;return(e=t??Mr.Promise)!==null&&e!==void 0?e:Promise}function vs(t){return t&&N(t.next)&&N(t.error)&&N(t.complete)}function bs(t){return t&&t instanceof yn||vs(t)&&Pr(t)}function ys(t){return N(t==null?void 0:t.lift)}function pe(t){return function(e){if(ys(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function he(t,e,n,r,s){return new _s(t,e,n,r,s)}var _s=function(t){de(e,t);function e(n,r,s,o,c,f){var h=t.call(this,n)||this;return h.onFinalize=c,h.shouldUnsubscribe=f,h._next=r?function(d){try{r(d)}catch(_){n.error(_)}}:t.prototype._next,h._error=o?function(d){try{o(d)}catch(_){n.error(_)}finally{this.unsubscribe()}}:t.prototype._error,h._complete=s?function(){try{s()}catch(d){n.error(d)}finally{this.unsubscribe()}}:t.prototype._complete,h}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(yn),gs=bn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),It=function(t){de(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new cr(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new gs},e.prototype.next=function(n){var r=this;St(function(){var s,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var c=Pe(r.currentObservers),f=c.next();!f.done;f=c.next()){var h=f.value;h.next(n)}}catch(d){s={error:d}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}}})},e.prototype.error=function(n){var r=this;St(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var s=r.observers;s.length;)s.shift().error(n)}})},e.prototype.complete=function(){var n=this;St(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,s=this,o=s.hasError,c=s.isStopped,f=s.observers;return o||c?Tr:(this.currentObservers=null,f.push(n),new ce(function(){r.currentObservers=null,it(f,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,s=r.hasError,o=r.thrownError,c=r.isStopped;s?n.error(o):c&&n.complete()},e.prototype.asObservable=function(){var n=new ee;return n.source=this,n},e.create=function(n,r){return new cr(n,r)},e}(ee),cr=function(t){de(e,t);function e(n,r){var s=t.call(this)||this;return s.destination=n,s.source=r,s}return e.prototype.next=function(n){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,n)},e.prototype.error=function(n){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&s!==void 0?s:Tr},e}(It),ur=function(t){de(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,s=n.thrownError,o=n._value;if(r)throw s;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(It),wn={now:function(){return(wn.delegate||Date).now()},delegate:void 0},ye=function(t){de(e,t);function e(n,r,s){n===void 0&&(n=1/0),r===void 0&&(r=1/0),s===void 0&&(s=wn);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=s,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,s=r.isStopped,o=r._buffer,c=r._infiniteTimeWindow,f=r._timestampProvider,h=r._windowTime;s||(o.push(n),!c&&o.push(f.now()+h)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),s=this,o=s._infiniteTimeWindow,c=s._buffer,f=c.slice(),h=0;h<f.length&&!n.closed;h+=o?1:2)n.next(f[h]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,s=n._timestampProvider,o=n._buffer,c=n._infiniteTimeWindow,f=(c?1:2)*r;if(r<1/0&&f<o.length&&o.splice(0,o.length-f),!c){for(var h=s.now(),d=0,_=1;_<o.length&&o[_]<=h;_+=2)d=_;d&&o.splice(0,d+1)}},e}(It),ws=function(t){de(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(ce),xt={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=xt.delegate;return s!=null&&s.setInterval?s.setInterval.apply(s,fe([t,e],ae(n))):setInterval.apply(void 0,fe([t,e],ae(n)))},clearInterval:function(t){var e=xt.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},ks=function(t){de(e,t);function e(n,r){var s=t.call(this,n,r)||this;return s.scheduler=n,s.work=r,s.pending=!1,s}return e.prototype.schedule=function(n,r){var s;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,c=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(c,o,r)),this.pending=!0,this.delay=r,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(c,this.id,r),this},e.prototype.requestAsyncId=function(n,r,s){return s===void 0&&(s=0),xt.setInterval(n.flush.bind(n,this),s)},e.prototype.recycleAsyncId=function(n,r,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return r;r!=null&&xt.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(n,r);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var s=!1,o;try{this.work(n)}catch(c){s=!0,o=c||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,s=n.scheduler,o=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,it(o,this),r!=null&&(this.id=this.recycleAsyncId(s,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(ws),lr=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=wn.now,t}(),$s=function(t){de(e,t);function e(n,r){r===void 0&&(r=lr.now);var s=t.call(this,n,r)||this;return s.actions=[],s._active=!1,s}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var s;this._active=!0;do if(s=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,s){for(;n=r.shift();)n.unsubscribe();throw s}},e}(lr),kn=new $s(ks),As=kn,Ss=new ee(function(t){return t.complete()});function Nr(t){return t&&N(t.schedule)}function Fr(t){return t[t.length-1]}function Es(t){return N(Fr(t))?t.pop():void 0}function Hr(t){return Nr(Fr(t))?t.pop():void 0}var $n=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Ur(t){return N(t==null?void 0:t.then)}function Wr(t){return N(t[_n])}function Br(t){return Symbol.asyncIterator&&N(t==null?void 0:t[Symbol.asyncIterator])}function Dr(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function xs(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vr=xs();function qr(t){return N(t==null?void 0:t[Vr])}function Gr(t){return us(this,arguments,function(){var n,r,s,o;return Lr(this,function(c){switch(c.label){case 0:n=t.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,He(n.read())];case 3:return r=c.sent(),s=r.value,o=r.done,o?[4,He(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,He(s)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Yr(t){return N(t==null?void 0:t.getReader)}function De(t){if(t instanceof ee)return t;if(t!=null){if(Wr(t))return Os(t);if($n(t))return Is(t);if(Ur(t))return Cs(t);if(Br(t))return zr(t);if(qr(t))return Ls(t);if(Yr(t))return Ts(t)}throw Dr(t)}function Os(t){return new ee(function(e){var n=t[_n]();if(N(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Is(t){return new ee(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Cs(t){return new ee(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Rr)})}function Ls(t){return new ee(function(e){var n,r;try{for(var s=Pe(t),o=s.next();!o.done;o=s.next()){var c=o.value;if(e.next(c),e.closed)return}}catch(f){n={error:f}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.complete()})}function zr(t){return new ee(function(e){Ps(t,e).catch(function(n){return e.error(n)})})}function Ts(t){return zr(Gr(t))}function Ps(t,e){var n,r,s,o;return cs(this,void 0,void 0,function(){var c,f;return Lr(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),n=ls(t),h.label=1;case 1:return[4,n.next()];case 2:if(r=h.sent(),!!r.done)return[3,4];if(c=r.value,e.next(c),e.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=h.sent(),s={error:f},[3,11];case 6:return h.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function oe(t,e,n,r,s){r===void 0&&(r=0),s===void 0&&(s=!1);var o=e.schedule(function(){n(),s?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!s)return o}function Jr(t,e){return e===void 0&&(e=0),pe(function(n,r){n.subscribe(he(r,function(s){return oe(r,t,function(){return r.next(s)},e)},function(){return oe(r,t,function(){return r.complete()},e)},function(s){return oe(r,t,function(){return r.error(s)},e)}))})}function Kr(t,e){return e===void 0&&(e=0),pe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Ms(t,e){return De(t).pipe(Kr(e),Jr(e))}function Rs(t,e){return De(t).pipe(Kr(e),Jr(e))}function js(t,e){return new ee(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Ns(t,e){return new ee(function(n){var r;return oe(n,e,function(){r=t[Vr](),oe(n,e,function(){var s,o,c;try{s=r.next(),o=s.value,c=s.done}catch(f){n.error(f);return}c?n.complete():n.next(o)},0,!0)}),function(){return N(r==null?void 0:r.return)&&r.return()}})}function Qr(t,e){if(!t)throw new Error("Iterable cannot be null");return new ee(function(n){oe(n,e,function(){var r=t[Symbol.asyncIterator]();oe(n,e,function(){r.next().then(function(s){s.done?n.complete():n.next(s.value)})},0,!0)})})}function Fs(t,e){return Qr(Gr(t),e)}function Hs(t,e){if(t!=null){if(Wr(t))return Ms(t,e);if($n(t))return js(t,e);if(Ur(t))return Rs(t,e);if(Br(t))return Qr(t,e);if(qr(t))return Ns(t,e);if(Yr(t))return Fs(t,e)}throw Dr(t)}function ut(t,e){return e?Hs(t,e):De(t)}function Us(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Hr(t);return ut(t,n)}var Xr=bn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function At(t,e){var n=typeof e=="object";return new Promise(function(r,s){var o=!1,c;t.subscribe({next:function(f){c=f,o=!0},error:s,complete:function(){o?r(c):n?r(e.defaultValue):s(new Xr)}})})}function Ws(t,e){var n=typeof e=="object";return new Promise(function(r,s){var o=new Et({next:function(c){r(c),o.unsubscribe()},error:s,complete:function(){n?r(e.defaultValue):s(new Xr)}});t.subscribe(o)})}function Bs(t){return t instanceof Date&&!isNaN(t)}function le(t,e){return pe(function(n,r){var s=0;n.subscribe(he(r,function(o){r.next(t.call(e,o,s++))}))})}var Ds=Array.isArray;function Vs(t,e){return Ds(e)?t.apply(void 0,fe([],ae(e))):t(e)}function Zr(t){return le(function(e){return Vs(t,e)})}function qs(t,e,n){return n===void 0&&(n=gn),function(r){fr(e,function(){for(var s=t.length,o=new Array(s),c=s,f=s,h=function(_){fr(e,function(){var g=ut(t[_],e),S=!1;g.subscribe(he(r,function(x){o[_]=x,S||(S=!0,f--),f||r.next(n(o.slice()))},function(){--c||r.complete()}))},r)},d=0;d<s;d++)h(d)},r)}}function fr(t,e,n){t?oe(n,t,e):e()}function Gs(t,e,n,r,s,o,c,f){var h=[],d=0,_=0,g=!1,S=function(){g&&!h.length&&!d&&e.complete()},x=function(C){return d<r?P(C):h.push(C)},P=function(C){o&&e.next(C),d++;var q=!1;De(n(C,_++)).subscribe(he(e,function(F){s==null||s(F),o?x(F):e.next(F)},function(){q=!0},void 0,function(){if(q)try{d--;for(var F=function(){var R=h.shift();c?oe(e,c,function(){return P(R)}):P(R)};h.length&&d<r;)F();S()}catch(R){e.error(R)}}))};return t.subscribe(he(e,x,function(){g=!0,S()})),function(){f==null||f()}}function Me(t,e,n){return n===void 0&&(n=1/0),N(e)?Me(function(r,s){return le(function(o,c){return e(r,o,s,c)})(De(t(r,s)))},n):(typeof e=="number"&&(n=e),pe(function(r,s){return Gs(r,s,t,n)}))}var Ys=["addListener","removeListener"],zs=["addEventListener","removeEventListener"],Js=["on","off"];function hn(t,e,n,r){if(N(n)&&(r=n,n=void 0),r)return hn(t,e,n).pipe(Zr(r));var s=ae(Xs(t)?zs.map(function(f){return function(h){return t[f](e,h,n)}}):Ks(t)?Ys.map(hr(t,e)):Qs(t)?Js.map(hr(t,e)):[],2),o=s[0],c=s[1];if(!o&&$n(t))return Me(function(f){return hn(f,e,n)})(De(t));if(!o)throw new TypeError("Invalid event target");return new ee(function(f){var h=function(){for(var d=[],_=0;_<arguments.length;_++)d[_]=arguments[_];return f.next(1<d.length?d:d[0])};return o(h),function(){return c(h)}})}function hr(t,e){return function(n){return function(r){return t[n](e,r)}}}function Ks(t){return N(t.addListener)&&N(t.removeListener)}function Qs(t){return N(t.on)&&N(t.off)}function Xs(t){return N(t.addEventListener)&&N(t.removeEventListener)}function dn(t,e,n){t===void 0&&(t=0),n===void 0&&(n=As);var r=-1;return e!=null&&(Nr(e)?n=e:r=e),new ee(function(s){var o=Bs(t)?+t-n.now():t;o<0&&(o=0);var c=0;return n.schedule(function(){s.closed||(s.next(c++),0<=r?this.schedule(void 0,r):s.complete())},o)})}function Zs(t,e){return t===void 0&&(t=0),e===void 0&&(e=kn),t<0&&(t=0),dn(t,t,e)}var eo=Array.isArray;function to(t){return t.length===1&&eo(t[0])?t[0]:t}function X(t,e){return pe(function(n,r){var s=0;n.subscribe(he(r,function(o){return t.call(e,o,s++)&&r.next(o)}))})}function no(t){for(var e,n,r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var o=(e=Hr(r))!==null&&e!==void 0?e:kn,c=(n=r[0])!==null&&n!==void 0?n:null,f=r[1]||1/0;return pe(function(h,d){var _=[],g=!1,S=function(C){var q=C.buffer,F=C.subs;F.unsubscribe(),it(_,C),d.next(q),g&&x()},x=function(){if(_){var C=new ce;d.add(C);var q=[],F={buffer:q,subs:C};_.push(F),oe(C,o,function(){return S(F)},t)}};c!==null&&c>=0?oe(d,o,x,c,!0):g=!0,x();var P=he(d,function(C){var q,F,R=_.slice();try{for(var H=Pe(R),G=H.next();!G.done;G=H.next()){var ft=G.value,ue=ft.buffer;ue.push(C),f<=ue.length&&S(ft)}}catch(te){q={error:te}}finally{try{G&&!G.done&&(F=H.return)&&F.call(H)}finally{if(q)throw q.error}}},function(){for(;_!=null&&_.length;)d.next(_.shift().buffer);P==null||P.unsubscribe(),d.complete(),d.unsubscribe()},void 0,function(){return _=null});h.subscribe(P)})}function ei(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Es(t);return n?ms(ei.apply(void 0,fe([],ae(t))),Zr(n)):pe(function(r,s){qs(fe([r],ae(to(t))))(s)})}function ro(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ei.apply(void 0,fe([],ae(t)))}function io(t,e){return N(e)?Me(t,e,1):Me(t,1)}function Le(t){return t<=0?function(){return Ss}:pe(function(e,n){var r=0;e.subscribe(he(n,function(s){++r<=t&&(n.next(s),t<=r&&n.complete())}))})}function so(){return pe(function(t,e){var n,r=!1;t.subscribe(he(e,function(s){var o=n;n=s,r&&e.next([o,s]),r=!0}))})}function oo(t,e,n){var r=N(t)||e||n?{next:t,error:e,complete:n}:t;return r?pe(function(s,o){var c;(c=r.subscribe)===null||c===void 0||c.call(r);var f=!0;s.subscribe(he(o,function(h){var d;(d=r.next)===null||d===void 0||d.call(r,h),o.next(h)},function(){var h;f=!1,(h=r.complete)===null||h===void 0||h.call(r),o.complete()},function(h){var d;f=!1,(d=r.error)===null||d===void 0||d.call(r,h),o.error(h)},function(){var h,d;f&&((h=r.unsubscribe)===null||h===void 0||h.call(r)),(d=r.finalize)===null||d===void 0||d.call(r)}))}):gn}const ao="en",co=(t,e=ao)=>typeof t=="string"?t:t==null?void 0:t[e];function uo(t){return Object.entries(t).reduce((e,[n,r])=>(e[n]=co(r),e),{})}const Ue=(...t)=>{},ti=t=>Array.isArray(t)?t:[t],ni=({document:{baseURI:t},location:{href:e}})=>n=>new URL(n,new URL(t,e)),ri=(t,e)=>{let n=e;return e instanceof URL||(n=t(typeof e=="string"?e:e.url)),n},lo=(t,e)=>{const{href:n,origin:r}=e;return t===r?n.substring(t.length):n},fo=(t,e,n=0)=>{const{selectors:r}=e;return t.querySelector(r[n])};function ho(t){return document.querySelector(t)}const po=(t,e)=>{const n=e.get(t);if(n){const{css:r,rest:s,subscription:o}=n;s.forEach(c=>{var f;return(f=c.__unfocus_handler)==null?void 0:f.call(c)}),o.unsubscribe(),n.elementToFocus.forEach((c,f)=>{Object.assign(c.style,r[f])})}e.delete(t)},mo=t=>t!==void 0;function vo(t,e,n){const r=new Map,s=ho.bind(t),o=e.pipe(so(),oo(([c])=>{var f;if(c!==void 0){const h=fo(t,c);h!==null&&((f=h.__unfocus_handler)==null||f.call(h),po(h,r))}}),le(([,c])=>c),X(mo),le(c=>{const[f,...h]=c.selectors,d=h.reduce((_,g)=>{var S;const x=s(g);if(x){_.push(x);const P=(S=x.__focus_handler)==null?void 0:S.call(x);P&&"then"in P&&P.catch(Ue)}return _},[]);return{first:f,next:c,otherElements:d}}),le(c=>({...c,firstElement:s(c.first)})),X(c=>c.firstElement!==null),le(c=>{var f,h;return{...c,focus:(h=(f=c.firstElement).__focus_handler)==null?void 0:h.call(f)}}),io(({focus:c,...f})=>(c&&"then"in c?c:Promise.resolve(c??f.firstElement)).then(d=>({focus:d,...f})).catch(()=>({focus:void 0,...f})))).subscribe(({otherElements:c,next:f,firstElement:h,focus:d})=>{const _=Object.keys(f.style),g=new ce,S=ti(d??h).filter(Boolean),x={css:[],elementToFocus:S,rest:c,subscription:g},P=_.reduce((C,q)=>(S.forEach((F,R)=>{var H;C.css[R]=Object.assign((H=C.css[R])!=null?H:{},{[q]:F.style[q]})}),C),x);g.add(n.pipe(X(C=>C==="select"),Le(1)).subscribe(()=>{S.forEach(C=>{Object.assign(C.style,f.style)})})),r.set(h,P)});return()=>o.unsubscribe()}var bo=Object.defineProperty,yo=(t,e,n)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ae=(t,e,n)=>(yo(t,typeof e!="symbol"?e+"":e,n),n);let _o=class{constructor(e){Ae(this,"_input"),Ae(this,"_length"),Ae(this,"_idx",0),Ae(this,"_mode",0),Ae(this,"_literals",[]),Ae(this,"_variables",[]),Ae(this,"_braketCount",0),Ae(this,"_done",!1),this._input=e,this._length=e.length}concatToLastLiteral(e){this._literals.push(this._literals.pop().concat(e))}concatToLastVariable(e){this._variables.push(this._variables.pop().concat(e))}get(){const e=[...this._literals],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._variables}}run(){for(this._length===0&&this._literals.push("");this._idx<this._length;){const e=this._input.charAt(this._idx);switch(this._mode){case 0:{this._literals.length===0&&this._literals.push(""),e==="{"&&this._idx+1!==this._length&&this._input.charAt(this._idx+1)==="{"?(this._literals.push(""),this._variables.push(""),this._mode=1,this._idx+=1):this.concatToLastLiteral(e);break}case 1:e==="}"&&this._input.charAt(this._idx+1)==="}"?(this._mode=0,this._idx+=1):this.concatToLastVariable(e);break}this._idx+=1}this._mode===1&&(this._literals.pop(),this.concatToLastLiteral(`{{${this._variables.pop()}`)),this._done=!0}};const go=t=>{const e=t.trim();if(!(e.startsWith("[")&&e.endsWith("]")))return!1;const n=e.slice(1).slice(0,-1).trim();return Number.parseInt(n).toString(10)===n},wo=t=>Number.parseInt(t.trim().slice(1).slice(0,-1).trim());function ko(t,e,n){if(!e.trim())return n?`{{${e}}}`:"";const r=e.trim().split(".").reduce((s,o)=>{if(Array.isArray(s)&&go(o))return s[wo(o)];if(typeof s=="object"&&s!==null&&o in s)return s[o]},{...t});return typeof r=="string"?r:n?`{{${e}}}`:""}function $o(t,e,n=!1){const r=new _o(t);r.run();const s=r.get();let[o]=s.literals;for(let c=0;c<s.variables.length;c++)o=o.concat(ko(e,s.variables[c],n)).concat(s.literals[c+1]);return o}const Ao=(t,e)=>Object.fromEntries(Object.entries(t).map(([n,r])=>[n,$o(r,e)]));var ii=(t=>(t[t.Default=0]="Default",t[t.Skip=1]="Skip",t))(ii||{});const pn="__mia_preview_id",So=1e6,Eo={"click-element":0,"ctrl-space":0,"focus-element":0,mousedown:0,mousemove:1,"new-configuration":0,notification:0,options:0,"request-resource":0,"set-source-map":0,"tag-info":0,update:0,updated:0};var rn;const Ot=window,We=Ot.trustedTypes,dr=We?We.createPolicy("lit-html",{createHTML:t=>t}):void 0,mn="$lit$",Se=`lit$${(Math.random()+"").slice(9)}$`,si="?"+Se,xo=`<${si}>`,Re=document,st=()=>Re.createComment(""),ot=t=>t===null||typeof t!="object"&&typeof t!="function",oi=Array.isArray,Oo=t=>oi(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",sn=`[
|
14
14
|
\f\r]`,rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pr=/-->/g,mr=/>/g,Ce=RegExp(`>|${sn}(?:([^\\s"'>=/]+)(${sn}*=${sn}*(?:[^
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),vr=/'/g,br=/"/g,ai=/^(?:script|style|textarea|title)$/i,Io=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Co=Io(1),at=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),yr=new WeakMap,Te=Re.createTreeWalker(Re,129,null,!1),Lo=(t,e)=>{const n=t.length-1,r=[];let s,o=e===2?"<svg>":"",c=rt;for(let h=0;h<n;h++){const d=t[h];let _,g,S=-1,x=0;for(;x<d.length&&(c.lastIndex=x,g=c.exec(d),g!==null);)x=c.lastIndex,c===rt?g[1]==="!--"?c=pr:g[1]!==void 0?c=mr:g[2]!==void 0?(ai.test(g[2])&&(s=RegExp("</"+g[2],"g")),c=Ce):g[3]!==void 0&&(c=Ce):c===Ce?g[0]===">"?(c=s??rt,S=-1):g[1]===void 0?S=-2:(S=c.lastIndex-g[2].length,_=g[1],c=g[3]===void 0?Ce:g[3]==='"'?br:vr):c===br||c===vr?c=Ce:c===pr||c===mr?c=rt:(c=Ce,s=void 0);const P=c===Ce&&t[h+1].startsWith("/>")?" ":"";o+=c===rt?d+xo:S>=0?(r.push(_),d.slice(0,S)+mn+d.slice(S)+Se+P):d+Se+(S===-2?(r.push(void 0),h):P)}const f=o+(t[n]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[dr!==void 0?dr.createHTML(f):f,r]};class ct{constructor({strings:e,_$litType$:n},r){let s;this.parts=[];let o=0,c=0;const f=e.length-1,h=this.parts,[d,_]=Lo(e,n);if(this.el=ct.createElement(d,r),Te.currentNode=this.el.content,n===2){const g=this.el.content,S=g.firstChild;S.remove(),g.append(...S.childNodes)}for(;(s=Te.nextNode())!==null&&h.length<f;){if(s.nodeType===1){if(s.hasAttributes()){const g=[];for(const S of s.getAttributeNames())if(S.endsWith(mn)||S.startsWith(Se)){const x=_[c++];if(g.push(S),x!==void 0){const P=s.getAttribute(x.toLowerCase()+mn).split(Se),C=/([.?@])?(.*)/.exec(x);h.push({type:1,index:o,name:C[2],strings:P,ctor:C[1]==="."?Po:C[1]==="?"?Ro:C[1]==="@"?jo:Ct})}else h.push({type:6,index:o})}for(const S of g)s.removeAttribute(S)}if(ai.test(s.tagName)){const g=s.textContent.split(Se),S=g.length-1;if(S>0){s.textContent=We?We.emptyScript:"";for(let x=0;x<S;x++)s.append(g[x],st()),Te.nextNode(),h.push({type:2,index:++o});s.append(g[S],st())}}}else if(s.nodeType===8)if(s.data===si)h.push({type:2,index:o});else{let g=-1;for(;(g=s.data.indexOf(Se,g+1))!==-1;)h.push({type:7,index:o}),g+=Se.length-1}o++}}static createElement(e,n){const r=Re.createElement("template");return r.innerHTML=e,r}}function Be(t,e,n=t,r){var s,o,c,f;if(e===at)return e;let h=r!==void 0?(s=n._$Co)===null||s===void 0?void 0:s[r]:n._$Cl;const d=ot(e)?void 0:e._$litDirective$;return(h==null?void 0:h.constructor)!==d&&((o=h==null?void 0:h._$AO)===null||o===void 0||o.call(h,!1),d===void 0?h=void 0:(h=new d(t),h._$AT(t,n,r)),r!==void 0?((c=(f=n)._$Co)!==null&&c!==void 0?c:f._$Co=[])[r]=h:n._$Cl=h),h!==void 0&&(e=Be(t,h._$AS(t,e.values),h,r)),e}class To{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var n;const{el:{content:r},parts:s}=this._$AD,o=((n=e==null?void 0:e.creationScope)!==null&&n!==void 0?n:Re).importNode(r,!0);Te.currentNode=o;let c=Te.nextNode(),f=0,h=0,d=s[0];for(;d!==void 0;){if(f===d.index){let _;d.type===2?_=new lt(c,c.nextSibling,this,e):d.type===1?_=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(_=new No(c,this,e)),this._$AV.push(_),d=s[++h]}f!==(d==null?void 0:d.index)&&(c=Te.nextNode(),f++)}return Te.currentNode=Re,o}v(e){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class lt{constructor(e,n,r,s){var o;this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Be(this,e,n),ot(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==at&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Oo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==K&&ot(this._$AH)?this._$AA.nextSibling.data=e:this.$(Re.createTextNode(e)),this._$AH=e}g(e){var n;const{values:r,_$litType$:s}=e,o=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ct.createElement(s.h,this.options)),s);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===o)this._$AH.v(r);else{const c=new To(o,this),f=c.u(this.options);c.v(r),this.$(f),this._$AH=c}}_$AC(e){let n=yr.get(e.strings);return n===void 0&&yr.set(e.strings,n=new ct(e)),n}T(e){oi(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,s=0;for(const o of e)s===n.length?n.push(r=new lt(this.k(st()),this.k(st()),this,this.options)):r=n[s],r._$AI(o),s++;s<n.length&&(this._$AR(r&&r._$AB.nextSibling,s),n.length=s)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class Ct{constructor(e,n,r,s,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=n,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=K}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,r,s){const o=this.strings;let c=!1;if(o===void 0)e=Be(this,e,n,0),c=!ot(e)||e!==this._$AH&&e!==at,c&&(this._$AH=e);else{const f=e;let h,d;for(e=o[0],h=0;h<o.length-1;h++)d=Be(this,f[r+h],n,h),d===at&&(d=this._$AH[h]),c||(c=!ot(d)||d!==this._$AH[h]),d===K?e=K:e!==K&&(e+=(d??"")+o[h+1]),this._$AH[h]=d}c&&!s&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Po extends Ct{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}}const Mo=We?We.emptyScript:"";class Ro extends Ct{constructor(){super(...arguments),this.type=4}j(e){e&&e!==K?this.element.setAttribute(this.name,Mo):this.element.removeAttribute(this.name)}}class jo extends Ct{constructor(e,n,r,s,o){super(e,n,r,s,o),this.type=5}_$AI(e,n=this){var r;if((e=(r=Be(this,e,n,0))!==null&&r!==void 0?r:K)===at)return;const s=this._$AH,o=e===K&&s!==K||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,c=e!==K&&(s===K||o);o&&this.element.removeEventListener(this.name,this,s),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class No{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}}const _r=Ot.litHtmlPolyfillSupport;_r==null||_r(ct,lt),((rn=Ot.litHtmlVersions)!==null&&rn!==void 0?rn:Ot.litHtmlVersions=[]).push("2.7.4");const Fo=(t,e,n)=>{var r,s;const o=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:e;let c=o._$litPart$;if(c===void 0){const f=(s=n==null?void 0:n.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=c=new lt(e.insertBefore(st(),f),f,void 0,n??{})}return c._$AI(t),c};const Ho=t=>{const e=t.charAt(0);return!(e!==t.charAt(t.length-1)||e!=="'"&&e!=='"')};function Uo(t){const e=t.match(/([^.]+)/g);return n=>e.reduce((r,s)=>{let o=s;if(s.startsWith("[")&&s.endsWith("]")){const c=s.slice(1,-1),f=Number.parseInt(c);!Number.isNaN(f)&&f.toString()===c?o=f:(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'"))&&(o=c.slice(1,-1))}if(o==="")throw new TypeError("42",{cause:t});return typeof r=="object"&&r!==null?r[o]:void 0},n)}function Wo(t,e={}){return t.reduce((n,r,s)=>{const o=r.trim(),c=Number.parseInt(o),f=Number.parseFloat(o);if(o==="")n[s]=o;else if(Ho(o))n[s]=o.slice(1,-1);else if(["true","false"].includes(o))n[s]=o==="true";else if(!Number.isNaN(c)&&c.toString()===o)n[s]=c;else if(!Number.isNaN(f)&&f.toString()===o)n[s]=f;else if(o.startsWith("{")||o.startsWith("["))try{n[s]=JSON.parse(o)}catch(h){if(h instanceof SyntaxError)throw new TypeError("43",{cause:h.message})}else n[s]=Uo(o)(e);return n},[])}function ci(t){return Array.isArray(t)?t:[t]}function Bo(t){const e=typeof t=="string"?[t]:t;return Array.isArray(e)?e:ci(e.uris)}const Do=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Vo(t){return Do.includes(t.tag)}function qo(t){return Array.isArray(t)?t:[t]}function ui(t,e,n){if(typeof e!="object"){t.push(`${e}`);return}qo(e).forEach(r=>{if(typeof r!="object"){t.push(`${r}`);return}const{tag:s,attributes:o={},booleanAttributes:c=[],properties:f={}}=r,h=Vo(r),d=`<${s}`,_=h?"/>":">",g=`</${s}>`,S=Object.entries(o).reduce((R,[H,G])=>(R.push(`${H}="${G}"`),R),[]),x=ci(c),{override:P,props:C}=Object.entries(f).reduce((R,[H,G])=>(n.has(H)?typeof G=="string"&&(R.override[H]=G):R.props[H]=G,R),{override:{},props:{}}),q=Array.from(n.keys()).map(R=>{var H;return`.${R}=\${${(H=P[R])!=null?H:R}}`}),F=Object.entries(C).reduce((R,[H,G])=>{switch(typeof G){case"object":case"number":case"boolean":R.push(`.${H}=\${${JSON.stringify(G)}}`);break;case"string":R.push(`.${H}=\${"${G}"}`);break}return R},[]);if(t.push([d,S.join(" "),x.join(" "),q.join(" "),F.join(" "),_].join(" ")),!h){const{content:R}=r;R!==void 0&&ui(t,R,n),t.push(g)}})}function Go(t,e=new Set){const n=[];return ui(n,t,e),n.join(" ")}const Yo="modulepreload",zo=function(t,e){return new URL(t,e).href},gr={},Jo=function(e,n,r){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=zo(o,r),o in gr)return;gr[o]=!0;const c=o.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let _=s.length-1;_>=0;_--){const g=s[_];if(g.href===o&&(!c||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${f}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Yo,c||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),c)return new Promise((_,g)=>{d.addEventListener("load",_),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};function li(t,...e){Jo(()=>import("./errors-af3a2945.js"),[],import.meta.url).then(({default:n})=>{const r=n[t];r?console.error(r(...e)):console.error(...e)}).catch(n=>{console.error(`[micro-lc][composer]: Dynamic import error while importing logger utils - ${n.message}`)})}function Ko(t){return e=>{li("0",t,e.message)}}const Qo=Object.freeze(Object.defineProperty({__proto__:null,dynamicImportError:Ko,error:li},Symbol.toStringTag,{value:"Module"}));var wr=Qo;var Xo=Object.defineProperty,Zo=(t,e,n)=>e in t?Xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,be=(t,e,n)=>(Zo(t,typeof e!="symbol"?e+"":e,n),n);class ea{constructor(e){be(this,"_i",0),be(this,"_s"),be(this,"_l"),be(this,"_d",!1),be(this,"_m",0),be(this,"_st",[]),be(this,"_n",0),be(this,"_li",[]),be(this,"_v",[]),this._s=e,this._l=e.length,e.length===0&&(this._d=!0)}_sw(e){this._m=e}_fst(){this._st=[]}_fn(){this._v.push(this._st.join("")),this._fst()}_fs(){this._li.push(this._st.join("")),this._fst()}_fpn(){this._li.push(this._st.slice(0,-1).join("")),this._fst()}_nx(){const e=this._s.charAt(this._i);switch(this._m){case 1:{e==="{"?(this._n+=1,this._st.push(e)):e==="}"&&this._n===0?(this._fn(),this._sw(0)):e==="}"&&this._n>0?(this._st.push(e),this._n-=1):this._st.push(e);break}case 2:{e==="{"?(this._fpn(),this._sw(1)):(this._sw(0),this._st.push(e));break}case 0:default:{e==="$"&&this._sw(2),this._st.push(e);break}}if(this._i+=1,this._i===this._l){if(this._m===2)this._sw(0);else if(this._m===1)throw new TypeError("41",{cause:`${this._i}`});this._fs(),this._d=!0}}_c(){const e=[...this._li],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._v}}run(){for(;!this._d;)this._nx();return this._c()}}const ta=async(t,e="SHA-1")=>window.crypto.subtle.digest(e,new TextEncoder().encode(t)),on=new Map;async function na(t){const e=await ta(t).catch(n=>{wr.error("40",t,n.message)});if(!e||!on.has(e)){let n;try{n=new ea(t).run(),e&&on.set(e,n)}catch(r){r instanceof TypeError&&wr.error(r.message,t,r.cause);const s=[];Object.defineProperty(s,"raw",{value:s,writable:!1}),n={literals:s,variables:[]}}return n}return on.get(e)}class an extends ye{}function ra(){const t=[],e=new Proxy({},{get(n,r,s){return typeof r=="string"&&!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=new an),Reflect.get(n,r,s)}});return new Proxy(new an,{get(n,r,s){if(r==="pool")return e;const o=typeof r=="string"?Number.parseInt(r,10):Number.NaN;return Number.isNaN(o)?Reflect.get(n,r,s):(t.at(o)===void 0&&(t[o]=new an),t[o])}})}async function ia(t,{extraProperties:e,context:n={}}={}){const r=Array.isArray(e)?new Set(e):e,s=Go(t,r),o=await na(s),c=Wo(o.variables,n),f=Co(o.literals,...c);return(h,d)=>Fo(f,h,d)}async function sa(t,e=window,n=console.error){var r;let s=[],o,c=Promise.resolve();if(t.sources){const{sources:f}=t;o=!Array.isArray(f)&&typeof f!="string"?(r=f.importmap)!=null?r:{}:{};try{e.importShim.addImportMap(o)}catch(h){n(h)}s=Bo(f),s.length>0&&(c=Promise.all(s.map(h=>e.importShim(h).catch(n))))}return c.then(()=>({...t,sources:{importmap:o,uris:s}}))}async function oa(t,e,n={}){return ia(t.content,{context:n,extraProperties:new Set(Object.keys(n))}).then(s=>(s(e),null))}const aa=t=>{var e;return{data:{message:t.message,name:t.name,stack:(e=t.stack)!=null?e:""},description:"preview.notifications.error.description",message:"preview.notifications.error.message",status:"error"}},fi=(t,e)=>t.send({content:aa(e),type:"notification"}),hi=t=>"clientX"in t&&"clientY"in t;function kr(t,e){return n=>{hi(n)&&t.send({content:{bubbles:!0,cancelable:!1,clientX:n.clientX,clientY:n.clientY},type:e})}}const ca=(t,e)=>t.has(e.tagName)&&e.hasAttribute(pn),ua=(t,e,n)=>{const{document:r}=t;return s=>{let o;if(hi(s)){const{clientX:c,clientY:f}=s;o=r.elementsFromPoint(c,f).reduce((h,d)=>{if(ca(n.uppercaseTags,d)){const _=d.getAttribute(pn);h.ids.push(_),h.selectors.push(`[${pn}="${_}"]`)}return h},{ids:[],selectors:[]})}(n.mode.getValue()==="select"||o===void 0)&&e.send({content:o&&(o.ids.length>0?o:void 0),type:"click-element"})}};var la=(t,e)=>({postMessage:n=>{t.postMessage(n,(e==null?void 0:e.targetOrigin)??"*",e==null?void 0:e.transfer)}}),di=(t=>(t.Ack="ack",t.Syn="syn",t))(di||{}),fa=Object.values(di),cn=t=>t.data,un=t=>e=>e.type===t.toString(),ha=t=>{const e=t.data;return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"&&"instance"in e&&typeof e.instance=="string"&&"content"in e},da=()=>{let t="#";for(let e=0;e<3;e++)t+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return t},pa=class{constructor(t,e,n,r){se(this,"__generateId");se(this,"__instance");se(this,"__colors");se(this,"__listener");se(this,"__log");se(this,"__receiver");se(this,"__subscription");se(this,"__okToWrite");se(this,"__write$");se(this,"__recv$");this.__generateId=()=>globalThis.crypto.randomUUID();const s=this.__generateId(),o=new ye,c=hn(e,"message").pipe(X(ha)).subscribe(o);this.__subscription=new ce,this.__subscription.add(c),this.__okToWrite=new ye(1),this.__write$=this.__okToWrite.pipe(Le(1)),this.__recv$=o.asObservable(),this.__listener=t,this.__log=(r==null?void 0:r.log)&&r.log.bind(this),this.__instance=s;const f=da();this.__colors={bg:`${f}22`,fg:f},this.__receiver=n,this.__connect(s,r!=null&&r.period?r.period:10)}__connect(t,e){const n=Zs(e).subscribe(()=>this.__receiver.postMessage({content:t,instance:t,type:"syn".toString()}));this.__subscription.add(n),this.__subscription.add(this.__recv$.pipe(le(cn),X(un("ack")),X(({content:r})=>r===t),Le(1)).subscribe(({instance:r})=>{this.__okToWrite.next(0),this.__subscription.add(this.__recv$.pipe(X(({data:{type:s,instance:o}})=>!fa.includes(s)&&o===r)).subscribe(s=>{this.__listener(s);const{data:o}=s;o._id!==void 0&&this.__receiver.postMessage({...o,content:o,instance:t,type:"ack"})})),n.unsubscribe()})),this.__subscription.add(this.__recv$.pipe(le(cn),X(un("syn")),X(({instance:r})=>r!==t),Le(1)).subscribe(({content:r})=>{this.__receiver.postMessage({content:r,instance:t,type:"ack"})}))}__write(t,e){const n={};e!==void 0&&(n._id=e),this.__subscription.add(this.__write$.subscribe(()=>{var s;const r=Object.assign(t,{instance:this.__instance,...n});this.__receiver.postMessage(r),(s=this.__log)==null||s.call(this,r)}))}disconnect(){this.__subscription.unsubscribe()}send(t){this.__write(t)}ackSend(t){let e;const n=new Promise(s=>{e=s}),r=this.__generateId();return this.__subscription.add(this.__recv$.pipe(le(cn),X(un("ack")),X(({_id:s})=>s===r),Le(1)).subscribe(()=>e())),this.__write(t,r),n}get instance(){return this.__instance}get colors(){return this.__colors}get ready(){return Ws(this.__write$).then(()=>{})}},pi=pa;const ma=()=>({configuration:new ye,focus:new ur(void 0),infos:new ye,mocks:new ye,mode:new ur("select"),notification:new ye,setSourceMap:new ye(1),swSourceMapAck:new ye(1),updated:new It,uppercaseTags:new Set}),mi=t=>{let e=0;const n=t.getValue();return n==="interact"?e="select":n==="select"&&(e="interact"),t.next(e),e},va=t=>e=>{const{data:n}=e;switch(n.type){}},ba=async(t,e)=>{const{navigator:{serviceWorker:n}}=t;return Promise.all([n.register("./service-worker.js"),n.ready.then(r=>{if(!r.active)throw new TypeError("smth went wrong on sw activation");return new pi(va(),window.navigator.serviceWorker,r.active)})]).then(([,r])=>r)},ya=(t,e)=>n=>{const{data:r}=n;switch(r.type){case"options":{const{content:{disableOverlay:s,redirectTo:o,timeout:c,run:f}}=r;f&&e.swSourceMapAck.next(0),s&&(Object.defineProperty(t,"__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__",{value:!0}),e.mode.next("interact")),c!==void 0&&Object.defineProperty(t,"__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__",{value:c});const{history:h}=t;o&&h.pushState(h.state,"",o);break}case"ctrl-space":mi(e.mode);break;case"new-configuration":e.configuration.next({...r.content,type:"reset"});break;case"update":e.configuration.next({...r.content,type:"update"});break;case"focus-element":e.focus.next(r.content);break;case"set-source-map":{const{content:s}=r;e.setSourceMap.next(Object.entries(s).reduce((o,[c,f])=>{try{const{href:h}=new URL(c,t.location.href),d=typeof f=="string"?{headers:{},query:{},to:f}:f;o[h]={originalFrom:c,...d}}catch{}return o},{}));break}}},_a=(t,e)=>new pi(ya(t,e),t,la(t.parent),{log(n){if(t.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&console.assert(t.parent!==t),t.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&Eo[n.type]!==ii.Skip){const r={background:this.colors.bg,color:this.colors.fg};console.groupCollapsed(`%c Msg from ${t.origin} (inner) `,Object.entries(r).map(([s,o])=>`${s}: ${o}`).join("; ")),console.info(`window '${t.origin}' is sending a message of type %c ${n.type} `,"background: lightgreen; color: darkgreen"),console.log(n.content),console.groupEnd()}}}),ga=t=>e=>{e.ctrlKey&&e.key===" "&&(e.preventDefault(),mi(t.mode),t.focus.next(void 0))},wa=([t,e])=>ut(e.then(n=>[t,n])),ka=([t,e])=>{const n={label:t,properties:{},type:"layout"},{__manifest:r=Promise.resolve(n)}=e,s=r.then(o=>[e,{__manifest:{...n,...o},tag:t}]).catch(()=>[e,{__manifest:n,tag:t}]);return ut(s)},$a=(t,e)=>ut(e.map(n=>[n,t.whenDefined(n)])).pipe(Me(wa),Me(ka)),Aa=500,An=(t,e)=>{e instanceof Error&&fi(t,e)},Sa=(t,e,n)=>e.pipe(Me(([,{__manifest:{label:r,description:s,...o},tag:c}])=>(delete o.mocks,Us({info:{...uo({description:s,label:r}),...o},tag:c}))),no(Aa),X(r=>r.length>0)).subscribe({error:r=>An(t,r),next:r=>n(r)}),Ea=(t,e,n)=>n.pipe(le(([,{__manifest:{mocks:r={}},tag:s}])=>[s,r])).subscribe({error:r=>An(t,r),next:r=>{e.mocks.next(r)}});async function vi(t,e,n,{addInfo:r,tags:s}){const{subscription:o}=this;if(n){const c=$a(this.customElements,s);return sa(n,this,f=>An(t,f)).then(()=>{o.add(Sa(t,c,r)),o.add(Ea(t,e,c))})}}const bi=(t,e)=>{const{document:n}=t;let r=e.firstElementChild;return r===null&&(r=n.createElement("div"),r.style.height="inherit",r.style.display="flex",e.appendChild(r)),r};async function vn(t,e){const n=ra(),{proxyWindow:r=this}=this;return oa({content:t,sources:{importmap:{},uris:[]}},bi(this,e),{eventBus:n,proxyWindow:r})}function yi(t){bi(this,t).remove()}var xa=Object.defineProperty,Oa=(t,e,n)=>e in t?xa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$r=(t,e,n)=>(Oa(t,typeof e!="symbol"?e+"":e,n),n);function Ar(t,e,n){const{properties:r,attributes:s,booleanAttributes:o=[]}=t,c=Object.assign(Object.fromEntries(ti(o).map(h=>[h,!0])),{...s,...r});return e(c).map(({url:h,method:d="GET",notify:_=!1,handler:g=()=>Promise.resolve(new Response)})=>{var S;const x=Ao({...h,method:d},c),P=new URL(x.pathname,(S=x.origin)!=null?S:n);return[P.href,d,(C,q)=>g(C,q).finally(()=>{_&&this.notify(_i(d,P))})]})}const Ia=(t,e)=>{const{href:n,search:r}=t;return n.replace(/\?$/,"").substring(0,n.length-r.length).match(new RegExp(`^${e}$`))!==null},Ca=(t,e)=>{const{href:n}=t;return n.match(new RegExp(`^${e.replace(/\/$/,"")}/`))!==null};class La extends Map{constructor(e){super(),$r(this,"notify"),$r(this,"__urlMap",new Map),this.notify=e}add(e,n){var r,s;const{method:o,url:c}=e,f=(r=this.get(o))!=null?r:new Map,h=(s=this.__urlMap.get(o))!=null?s:[];f.set(c,n),h.push(c),this.set(o,f),this.__urlMap.set(o,h)}match(e){var n;const{method:r,url:s}=e,o=this.__urlMap.get(r);if(o===void 0)return;const c=o.reduce((f,h,d,_)=>{if(Ia(s,h)||Ca(s,h)){if(f===void 0)return d;if(_[f].length<h.length)return d}return f},void 0);if(c!==void 0)return(n=this.get(r))==null?void 0:n.get(o[c])}}const Ta=t=>([e,n,r])=>t.add({method:n,url:e},r);async function Sr(t,e,n,r){const s=Ta(t);return Array.isArray(e)?Promise.all(e.map(o=>Ar.call(t,o,n,r)).flat().map(s)).then(Ue):Promise.all(Ar.call(t,e,n,r).map(s)).then(Ue)}var Er;const xr=(Er=window.__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__)!=null?Er:5e3,Pa=t=>t.includes("-"),Or=t=>({data:{tag:t},description:"preview.notifications.no-webcomponent-definition.description",message:"preview.notifications.no-webcomponent-definition.message",status:"warning"});async function Ma(t,e,n,r=[]){const{location:{href:s},fetch:o}=this,c=ni(this),f=new La(this.notify.bind(this));await Promise.all(r.map(async d=>{var _;let g=()=>[];const S=await Promise.race([At(dn(xr)),At(e.mocks.pipe(X(([P])=>P===d),Le(1)))]);if(S===0)this.notify(Or(d));else{const[,{fetch:P}]=S;P!==void 0&&(g=P)}const x=(_=n.get(d))!=null?_:[];return Sr(f,x,g,s)})).catch(d=>d instanceof Error&&fi(t,d));const h=async(d,_)=>{var g;const S=ri(c,d),x=f.match({method:(g=_==null?void 0:_.method)!=null?g:"GET",url:S});return x!==void 0?x(S,_).then(P=>P):o(d,_)};if(this.proxyWindow){const d=Object.assign(h,{update:async _=>{let g=()=>[];if(Pa(_.tag)){const S=await Promise.race([At(dn(xr)),At(e.mocks.pipe(X(([x])=>x===_.tag),Le(1)))]);if(S===0)this.notify(Or(_.tag));else{const[,{fetch:x}]=S;x!==void 0&&(g=x)}}return Sr(f,_,g,s)}});this.fetch=d,this.proxyWindow.fetch=d}}function Ra(t,e){const{href:n,origin:r,pathname:s}=new URL(t??"",this.location.href);let o=n;return r===this.location.origin&&(o=`{ your domain }${s}`),this.notify({data:{nextUrl:o,target:e??"[undefined]"},description:"preview.notifications.navigation-event.description.open",message:"preview.notifications.navigation-event.message",status:"default"}),this}function ja(t,e,n){const{href:r,origin:s,pathname:o}=new URL(n);let c=r;s===this.location.origin&&(c=`${o}`),this.notify({data:{nextUrl:c},description:"preview.notifications.navigation-event.description.pushState",message:"preview.notifications.navigation-event.message",status:"default"})}function Na(t,e,n){const{href:r,origin:s,pathname:o,search:c}=new URL(n);let f=r;s===this.location.origin&&(f=`${o}${c}`),this.notify({data:{nextUrl:f},description:"preview.notifications.navigation-event.description.replaceState",message:"preview.notifications.navigation-event.message",status:"info"})}function Fa(t){return new Proxy(t,{get:(e,n)=>n==="pushState"?(r,s,o)=>{ja.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:n==="replaceState"?(r,s,o)=>{Na.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:e[n]})}class Ir extends Map{get length(){return this.size}clear(){super.clear()}getItem(e){var n;return(n=super.get(e))!=null?n:null}key(){return null}removeItem(e){super.delete(e)}setItem(e,n){super.set(e,n)}}const Ha=t=>t.tagName==="A";function Ua(t){const{prototype:{createElement:e}}=Document;return Document.prototype.createElement=function(r,s){const o=e.call(this,r,s);if(Ha(o)){const c=()=>{var f;return t.notify({data:{href:lo(t.location.origin,new URL(o.href,t.location.href)),target:(f=o.getAttribute("target"))!=null?f:"_self"},description:"preview.notifications.anchor.description",message:"preview.notifications.anchor.message",status:"info"})};Object.defineProperty(o,"click",{get(){return c},set:Ue})}return o},()=>{Document.prototype.createElement=e}}function Wa(t,e){let n=t.fetch.bind(t);const r={notify:_=>e.next(_)},s=new Ir,o=new Ir,c=Object.assign(t,r),f=new Proxy(c,{get(_,g,S){if(g==="fetch")return n;if(g==="history")return Fa.call(_,_.history);if(g==="open")return Ra.bind(_);if(g==="localStorage")return s;if(g==="sessionStorage")return o;const x=Reflect.get(_,g);return typeof x!="function"?x:function(...C){return Reflect.apply(x,this===S?t:this,C)}},set(_,g,S){return g==="fetch"?(n=S,!0):Reflect.set(_,g,S)}}),h=Object.assign(c,{proxyWindow:f}),d=Ua(h);return{sandbox:h,unpatch:d}}var Ba=Object.defineProperty,Da=(t,e,n)=>e in t?Ba(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cr=(t,e,n)=>(Da(t,typeof e!="symbol"?e+"":e,n),n);function Va(t,e){const{document:n}=t,r=n.createElement("div"),s="";r.style.display=s,r.style.position="fixed",r.style.width="100vw",r.style.height="100%",r.style.backgroundColor="rgba(0, 0, 0, 0.05)",r.style.zIndex=`${So}`;const o=()=>r.style.display===s,c=()=>o()?r.style.display="none":r.style.display=s,f=e.pipe(X(h=>t.__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__?h==="interact":!0)).subscribe(h=>{switch(h){case"interact":t.dispatchEvent(new Event("mousedown")),r.style.display="none";break;case"select":r.style.display=s;break;case 0:default:c();break}});return n.body.appendChild(r),{cleanup:()=>f.unsubscribe(),overlay:r}}const qa=t=>{const e=t.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.height="inherit",t.body.appendChild(e),e};function Ga(t){const e=t;return Object.assign(t,{bootstrap:vi.bind(e),mocks:{fetch:new Map},subscription:new ce,unmount:yi.bind(e),update:vn.bind(e)})}class Ya{constructor(){Cr(this,"_results",new Map),Cr(this,"_queue",Promise.resolve())}add(e){const r=[...e].map(s=>{let o,c;const f=new Promise((h,d)=>{o=h,c=d});return this._queue=this._queue.then(()=>s()).then(h=>{o(h)}).catch(h=>c(h)),f});return Promise.allSettled(r)}get(e){return this._results.get(e)}}const za=t=>e=>{e.forEach(n=>{n.status==="rejected"&&t.next({data:{reason:n.reason},description:"preview.notifications.lifecycle.description",message:"preview.notifications.lifecycle.message",status:"error"})})},Ja=t=>e=>{t.infos.next(e),e.forEach(({tag:n})=>t.uppercaseTags.add(n.toUpperCase()))},Ka=(t,e,n,r)=>{const s=new Ya,o=r.configuration.pipe(ro(r.swSourceMapAck)).subscribe(([c])=>{const{configuration:f}=c,{content:h}=f;let d;if(c.type==="reset"){const{contexts:_,tags:g}=c;d=s.add([()=>yi.call(t,e),()=>vi.call(t,n,r,f,{addInfo:Ja(r),tags:g}),()=>Ma.call(t,n,r,_,c.tags),()=>vn.call(t,h,e).finally(()=>r.updated.next(0))])}else{const{context:_}=c;d=s.add([()=>{var g,S,x;return(x=(g=t.proxyWindow)==null?void 0:(S=g.fetch).update)==null?void 0:x.call(S,_)},()=>vn.call(t,h,e).finally(()=>r.updated.next(0))])}d.then(za(r.notification)).catch(Ue)});return()=>o.unsubscribe()},Qa=t=>{const{body:e}=t;e.style.height="100%",e.style.padding="0",e.style.margin="0"},Xa=(t,e)=>{const{location:{origin:n,port:r,protocol:s}}=t;return!(n!==e.origin||r!==e.port||s!==e.protocol)},_i=(t,e)=>({data:{method:t,url:e.href.substring(e.origin.length)},description:"preview.notifications.fetch-event.description",message:"preview.notifications.fetch-event.message",status:"info"}),Za=(t,e)=>{const n=ni(t),{document:r,parent:s}=t;if(s===t)return;const o=t.fetch.bind(t);t.fetch=(c,f)=>{var h;const d=ri(n,c);return Xa(r,d)&&e.next(_i((h=f==null?void 0:f.method)!=null?h:"GET",d)),o(c,f)}},ec=(t,e,n)=>{Qa(t.document),Za(t,n.notification);const{cleanup:r}=Va(t,n.mode.asObservable()),s=vo(t.document,n.focus.asObservable(),n.mode.asObservable()),o=qa(t.document),c=Ga(t),{sandbox:f,unpatch:h}=Wa(c,n.notification),d=Ka(f,o,e,n);return{cleanup:()=>{d(),h(),s(),r()},sandboxedWindow:f}};function tc(t){const e=new ce;return e.add(t.updated.subscribe(()=>this.send({content:{},type:"updated"}))),e.add(t.infos.subscribe(n=>this.send({content:n,type:"tag-info"}))),e.add(t.notification.subscribe(n=>this.send({content:n,type:"notification"}))),e.add(t.mode.subscribe(n=>this.send({content:{mode:n},type:"ctrl-space"}))),()=>e.unsubscribe()}function nc(t){const e=new ce;return e.add(t.setSourceMap.subscribe(n=>{this.ackSend({content:n,type:"set-source-map"}).then(()=>t.swSourceMapAck.next(0)).catch(Ue)})),()=>e.unsubscribe()}function rc(t,...e){const n=e.map(({type:r,handler:s})=>(t.addEventListener(r,s),()=>t.removeEventListener(r,s)));return()=>{n.forEach(r=>r())}}function ic(t,e){t.addEventListener("unload",()=>{t.subscription.unsubscribe(),e.forEach(n=>n())})}(async t=>{const e=ma(),n=await ba(t),r=_a(t,e),s=nc.call(n,e),o=tc.call(r,e),c=rc(t,{handler:ga(e),type:"keydown"},{handler:kr(r,"mousemove"),type:"mousemove"},{handler:kr(r,"mousedown"),type:"mousedown"},{handler:ua(t,r,e),type:"mousedown"}),{cleanup:f,sandboxedWindow:h}=ec(t,r,e);ic(h,[f,c,o,s,()=>r.disconnect(),()=>n.send({content:{},type:"unload-client"}),()=>n.disconnect()])})(window).catch(t=>{throw console.error(`[preview] Error Boundary: ${String(t)}`),t});
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),vr=/'/g,br=/"/g,ai=/^(?:script|style|textarea|title)$/i,Io=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Co=Io(1),at=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),yr=new WeakMap,Te=Re.createTreeWalker(Re,129,null,!1),Lo=(t,e)=>{const n=t.length-1,r=[];let s,o=e===2?"<svg>":"",c=rt;for(let h=0;h<n;h++){const d=t[h];let _,g,S=-1,x=0;for(;x<d.length&&(c.lastIndex=x,g=c.exec(d),g!==null);)x=c.lastIndex,c===rt?g[1]==="!--"?c=pr:g[1]!==void 0?c=mr:g[2]!==void 0?(ai.test(g[2])&&(s=RegExp("</"+g[2],"g")),c=Ce):g[3]!==void 0&&(c=Ce):c===Ce?g[0]===">"?(c=s??rt,S=-1):g[1]===void 0?S=-2:(S=c.lastIndex-g[2].length,_=g[1],c=g[3]===void 0?Ce:g[3]==='"'?br:vr):c===br||c===vr?c=Ce:c===pr||c===mr?c=rt:(c=Ce,s=void 0);const P=c===Ce&&t[h+1].startsWith("/>")?" ":"";o+=c===rt?d+xo:S>=0?(r.push(_),d.slice(0,S)+mn+d.slice(S)+Se+P):d+Se+(S===-2?(r.push(void 0),h):P)}const f=o+(t[n]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[dr!==void 0?dr.createHTML(f):f,r]};class ct{constructor({strings:e,_$litType$:n},r){let s;this.parts=[];let o=0,c=0;const f=e.length-1,h=this.parts,[d,_]=Lo(e,n);if(this.el=ct.createElement(d,r),Te.currentNode=this.el.content,n===2){const g=this.el.content,S=g.firstChild;S.remove(),g.append(...S.childNodes)}for(;(s=Te.nextNode())!==null&&h.length<f;){if(s.nodeType===1){if(s.hasAttributes()){const g=[];for(const S of s.getAttributeNames())if(S.endsWith(mn)||S.startsWith(Se)){const x=_[c++];if(g.push(S),x!==void 0){const P=s.getAttribute(x.toLowerCase()+mn).split(Se),C=/([.?@])?(.*)/.exec(x);h.push({type:1,index:o,name:C[2],strings:P,ctor:C[1]==="."?Po:C[1]==="?"?Ro:C[1]==="@"?jo:Ct})}else h.push({type:6,index:o})}for(const S of g)s.removeAttribute(S)}if(ai.test(s.tagName)){const g=s.textContent.split(Se),S=g.length-1;if(S>0){s.textContent=We?We.emptyScript:"";for(let x=0;x<S;x++)s.append(g[x],st()),Te.nextNode(),h.push({type:2,index:++o});s.append(g[S],st())}}}else if(s.nodeType===8)if(s.data===si)h.push({type:2,index:o});else{let g=-1;for(;(g=s.data.indexOf(Se,g+1))!==-1;)h.push({type:7,index:o}),g+=Se.length-1}o++}}static createElement(e,n){const r=Re.createElement("template");return r.innerHTML=e,r}}function Be(t,e,n=t,r){var s,o,c,f;if(e===at)return e;let h=r!==void 0?(s=n._$Co)===null||s===void 0?void 0:s[r]:n._$Cl;const d=ot(e)?void 0:e._$litDirective$;return(h==null?void 0:h.constructor)!==d&&((o=h==null?void 0:h._$AO)===null||o===void 0||o.call(h,!1),d===void 0?h=void 0:(h=new d(t),h._$AT(t,n,r)),r!==void 0?((c=(f=n)._$Co)!==null&&c!==void 0?c:f._$Co=[])[r]=h:n._$Cl=h),h!==void 0&&(e=Be(t,h._$AS(t,e.values),h,r)),e}class To{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var n;const{el:{content:r},parts:s}=this._$AD,o=((n=e==null?void 0:e.creationScope)!==null&&n!==void 0?n:Re).importNode(r,!0);Te.currentNode=o;let c=Te.nextNode(),f=0,h=0,d=s[0];for(;d!==void 0;){if(f===d.index){let _;d.type===2?_=new lt(c,c.nextSibling,this,e):d.type===1?_=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(_=new No(c,this,e)),this._$AV.push(_),d=s[++h]}f!==(d==null?void 0:d.index)&&(c=Te.nextNode(),f++)}return Te.currentNode=Re,o}v(e){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class lt{constructor(e,n,r,s){var o;this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Be(this,e,n),ot(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==at&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Oo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==K&&ot(this._$AH)?this._$AA.nextSibling.data=e:this.$(Re.createTextNode(e)),this._$AH=e}g(e){var n;const{values:r,_$litType$:s}=e,o=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ct.createElement(s.h,this.options)),s);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===o)this._$AH.v(r);else{const c=new To(o,this),f=c.u(this.options);c.v(r),this.$(f),this._$AH=c}}_$AC(e){let n=yr.get(e.strings);return n===void 0&&yr.set(e.strings,n=new ct(e)),n}T(e){oi(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,s=0;for(const o of e)s===n.length?n.push(r=new lt(this.k(st()),this.k(st()),this,this.options)):r=n[s],r._$AI(o),s++;s<n.length&&(this._$AR(r&&r._$AB.nextSibling,s),n.length=s)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class Ct{constructor(e,n,r,s,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=n,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=K}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,r,s){const o=this.strings;let c=!1;if(o===void 0)e=Be(this,e,n,0),c=!ot(e)||e!==this._$AH&&e!==at,c&&(this._$AH=e);else{const f=e;let h,d;for(e=o[0],h=0;h<o.length-1;h++)d=Be(this,f[r+h],n,h),d===at&&(d=this._$AH[h]),c||(c=!ot(d)||d!==this._$AH[h]),d===K?e=K:e!==K&&(e+=(d??"")+o[h+1]),this._$AH[h]=d}c&&!s&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Po extends Ct{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}}const Mo=We?We.emptyScript:"";class Ro extends Ct{constructor(){super(...arguments),this.type=4}j(e){e&&e!==K?this.element.setAttribute(this.name,Mo):this.element.removeAttribute(this.name)}}class jo extends Ct{constructor(e,n,r,s,o){super(e,n,r,s,o),this.type=5}_$AI(e,n=this){var r;if((e=(r=Be(this,e,n,0))!==null&&r!==void 0?r:K)===at)return;const s=this._$AH,o=e===K&&s!==K||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,c=e!==K&&(s===K||o);o&&this.element.removeEventListener(this.name,this,s),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class No{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}}const _r=Ot.litHtmlPolyfillSupport;_r==null||_r(ct,lt),((rn=Ot.litHtmlVersions)!==null&&rn!==void 0?rn:Ot.litHtmlVersions=[]).push("2.7.4");const Fo=(t,e,n)=>{var r,s;const o=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:e;let c=o._$litPart$;if(c===void 0){const f=(s=n==null?void 0:n.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=c=new lt(e.insertBefore(st(),f),f,void 0,n??{})}return c._$AI(t),c};const Ho=t=>{const e=t.charAt(0);return!(e!==t.charAt(t.length-1)||e!=="'"&&e!=='"')};function Uo(t){const e=t.match(/([^.]+)/g);return n=>e.reduce((r,s)=>{let o=s;if(s.startsWith("[")&&s.endsWith("]")){const c=s.slice(1,-1),f=Number.parseInt(c);!Number.isNaN(f)&&f.toString()===c?o=f:(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'"))&&(o=c.slice(1,-1))}if(o==="")throw new TypeError("42",{cause:t});return typeof r=="object"&&r!==null?r[o]:void 0},n)}function Wo(t,e={}){return t.reduce((n,r,s)=>{const o=r.trim(),c=Number.parseInt(o),f=Number.parseFloat(o);if(o==="")n[s]=o;else if(Ho(o))n[s]=o.slice(1,-1);else if(["true","false"].includes(o))n[s]=o==="true";else if(!Number.isNaN(c)&&c.toString()===o)n[s]=c;else if(!Number.isNaN(f)&&f.toString()===o)n[s]=f;else if(o.startsWith("{")||o.startsWith("["))try{n[s]=JSON.parse(o)}catch(h){if(h instanceof SyntaxError)throw new TypeError("43",{cause:h.message})}else n[s]=Uo(o)(e);return n},[])}function ci(t){return Array.isArray(t)?t:[t]}function Bo(t){const e=typeof t=="string"?[t]:t;return Array.isArray(e)?e:ci(e.uris)}const Do=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Vo(t){return Do.includes(t.tag)}function qo(t){return Array.isArray(t)?t:[t]}function ui(t,e,n){if(typeof e!="object"){t.push(`${e}`);return}qo(e).forEach(r=>{if(typeof r!="object"){t.push(`${r}`);return}const{tag:s,attributes:o={},booleanAttributes:c=[],properties:f={}}=r,h=Vo(r),d=`<${s}`,_=h?"/>":">",g=`</${s}>`,S=Object.entries(o).reduce((R,[H,G])=>(R.push(`${H}="${G}"`),R),[]),x=ci(c),{override:P,props:C}=Object.entries(f).reduce((R,[H,G])=>(n.has(H)?typeof G=="string"&&(R.override[H]=G):R.props[H]=G,R),{override:{},props:{}}),q=Array.from(n.keys()).map(R=>{var H;return`.${R}=\${${(H=P[R])!=null?H:R}}`}),F=Object.entries(C).reduce((R,[H,G])=>{switch(typeof G){case"object":case"number":case"boolean":R.push(`.${H}=\${${JSON.stringify(G)}}`);break;case"string":R.push(`.${H}=\${"${G}"}`);break}return R},[]);if(t.push([d,S.join(" "),x.join(" "),q.join(" "),F.join(" "),_].join(" ")),!h){const{content:R}=r;R!==void 0&&ui(t,R,n),t.push(g)}})}function Go(t,e=new Set){const n=[];return ui(n,t,e),n.join(" ")}const Yo="modulepreload",zo=function(t,e){return new URL(t,e).href},gr={},Jo=function(e,n,r){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=zo(o,r),o in gr)return;gr[o]=!0;const c=o.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let _=s.length-1;_>=0;_--){const g=s[_];if(g.href===o&&(!c||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${f}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Yo,c||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),c)return new Promise((_,g)=>{d.addEventListener("load",_),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};function li(t,...e){Jo(()=>import("./errors-af3a2945.js"),[],import.meta.url).then(({default:n})=>{const r=n[t];r?console.error(r(...e)):console.error(...e)}).catch(n=>{console.error(`[micro-lc][composer]: Dynamic import error while importing logger utils - ${n.message}`)})}function Ko(t){return e=>{li("0",t,e.message)}}const Qo=Object.freeze(Object.defineProperty({__proto__:null,dynamicImportError:Ko,error:li},Symbol.toStringTag,{value:"Module"}));var wr=Qo;var Xo=Object.defineProperty,Zo=(t,e,n)=>e in t?Xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,be=(t,e,n)=>(Zo(t,typeof e!="symbol"?e+"":e,n),n);class ea{constructor(e){be(this,"_i",0),be(this,"_s"),be(this,"_l"),be(this,"_d",!1),be(this,"_m",0),be(this,"_st",[]),be(this,"_n",0),be(this,"_li",[]),be(this,"_v",[]),this._s=e,this._l=e.length,e.length===0&&(this._d=!0)}_sw(e){this._m=e}_fst(){this._st=[]}_fn(){this._v.push(this._st.join("")),this._fst()}_fs(){this._li.push(this._st.join("")),this._fst()}_fpn(){this._li.push(this._st.slice(0,-1).join("")),this._fst()}_nx(){const e=this._s.charAt(this._i);switch(this._m){case 1:{e==="{"?(this._n+=1,this._st.push(e)):e==="}"&&this._n===0?(this._fn(),this._sw(0)):e==="}"&&this._n>0?(this._st.push(e),this._n-=1):this._st.push(e);break}case 2:{e==="{"?(this._fpn(),this._sw(1)):(this._sw(0),this._st.push(e));break}case 0:default:{e==="$"&&this._sw(2),this._st.push(e);break}}if(this._i+=1,this._i===this._l){if(this._m===2)this._sw(0);else if(this._m===1)throw new TypeError("41",{cause:`${this._i}`});this._fs(),this._d=!0}}_c(){const e=[...this._li],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._v}}run(){for(;!this._d;)this._nx();return this._c()}}const ta=async(t,e="SHA-1")=>window.crypto.subtle.digest(e,new TextEncoder().encode(t)),on=new Map;async function na(t){const e=await ta(t).catch(n=>{wr.error("40",t,n.message)});if(!e||!on.has(e)){let n;try{n=new ea(t).run(),e&&on.set(e,n)}catch(r){r instanceof TypeError&&wr.error(r.message,t,r.cause);const s=[];Object.defineProperty(s,"raw",{value:s,writable:!1}),n={literals:s,variables:[]}}return n}return on.get(e)}class an extends ye{}function ra(){const t=[],e=new Proxy({},{get(n,r,s){return typeof r=="string"&&!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=new an),Reflect.get(n,r,s)}});return new Proxy(new an,{get(n,r,s){if(r==="pool")return e;const o=typeof r=="string"?Number.parseInt(r,10):Number.NaN;return Number.isNaN(o)?Reflect.get(n,r,s):(t.at(o)===void 0&&(t[o]=new an),t[o])}})}async function ia(t,{extraProperties:e,context:n={}}={}){const r=Array.isArray(e)?new Set(e):e,s=Go(t,r),o=await na(s),c=Wo(o.variables,n),f=Co(o.literals,...c);return(h,d)=>Fo(f,h,d)}async function sa(t,e=window,n=console.error){var r;let s=[],o,c=Promise.resolve();if(t.sources){const{sources:f}=t;o=!Array.isArray(f)&&typeof f!="string"?(r=f.importmap)!=null?r:{}:{};try{e.importShim.addImportMap(o)}catch(h){n(h)}s=Bo(f),s.length>0&&(c=Promise.all(s.map(h=>e.importShim(h).catch(n))))}return c.then(()=>({...t,sources:{importmap:o,uris:s}}))}async function oa(t,e,n={}){return ia(t.content,{context:n,extraProperties:new Set(Object.keys(n))}).then(s=>(s(e),null))}const aa=t=>{var e;return{data:{message:t.message,name:t.name,stack:(e=t.stack)!=null?e:""},description:"preview.notifications.error.description",message:"preview.notifications.error.message",status:"error"}},fi=(t,e)=>t.send({content:aa(e),type:"notification"}),hi=t=>"clientX"in t&&"clientY"in t;function kr(t,e){return n=>{hi(n)&&t.send({content:{bubbles:!0,cancelable:!1,clientX:n.clientX,clientY:n.clientY},type:e})}}const ca=(t,e)=>t.has(e.tagName)&&e.hasAttribute(pn),ua=(t,e,n)=>{const{document:r}=t;return s=>{let o;if(hi(s)){const{clientX:c,clientY:f}=s;o=r.elementsFromPoint(c,f).reduce((h,d)=>{if(ca(n.uppercaseTags,d)){const _=d.getAttribute(pn);h.ids.push(_),h.selectors.push(`[${pn}="${_}"]`)}return h},{ids:[],selectors:[]})}(n.mode.getValue()==="select"||o===void 0)&&e.send({content:o&&(o.ids.length>0?o:void 0),type:"click-element"})}};var la=(t,e)=>({postMessage:n=>{t.postMessage(n,(e==null?void 0:e.targetOrigin)??"*",e==null?void 0:e.transfer)}}),di=(t=>(t.Ack="ack",t.Syn="syn",t))(di||{}),fa=Object.values(di),cn=t=>t.data,un=t=>e=>e.type===t.toString(),ha=t=>{const e=t.data;return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"&&"instance"in e&&typeof e.instance=="string"&&"content"in e},da=()=>{let t="#";for(let e=0;e<3;e++)t+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return t},pa=class{constructor(t,e,n,r){se(this,"__generateId");se(this,"__instance");se(this,"__colors");se(this,"__listener");se(this,"__log");se(this,"__receiver");se(this,"__subscription");se(this,"__okToWrite");se(this,"__write$");se(this,"__recv$");this.__generateId=()=>globalThis.crypto.randomUUID();const s=this.__generateId(),o=new ye,c=hn(e,"message").pipe(X(ha)).subscribe(o);this.__subscription=new ce,this.__subscription.add(c),this.__okToWrite=new ye(1),this.__write$=this.__okToWrite.pipe(Le(1)),this.__recv$=o.asObservable(),this.__listener=t,this.__log=(r==null?void 0:r.log)&&r.log.bind(this),this.__instance=s;const f=da();this.__colors={bg:`${f}22`,fg:f},this.__receiver=n,this.__connect(s,r!=null&&r.period?r.period:10)}__connect(t,e){const n=Zs(e).subscribe(()=>this.__receiver.postMessage({content:t,instance:t,type:"syn".toString()}));this.__subscription.add(n),this.__subscription.add(this.__recv$.pipe(le(cn),X(un("ack")),X(({content:r})=>r===t),Le(1)).subscribe(({instance:r})=>{this.__okToWrite.next(0),this.__subscription.add(this.__recv$.pipe(X(({data:{type:s,instance:o}})=>!fa.includes(s)&&o===r)).subscribe(s=>{this.__listener(s);const{data:o}=s;o._id!==void 0&&this.__receiver.postMessage({...o,content:o,instance:t,type:"ack"})})),n.unsubscribe()})),this.__subscription.add(this.__recv$.pipe(le(cn),X(un("syn")),X(({instance:r})=>r!==t),Le(1)).subscribe(({content:r})=>{this.__receiver.postMessage({content:r,instance:t,type:"ack"})}))}__write(t,e){const n={};e!==void 0&&(n._id=e),this.__subscription.add(this.__write$.subscribe(()=>{var s;const r=Object.assign(t,{instance:this.__instance,...n});this.__receiver.postMessage(r),(s=this.__log)==null||s.call(this,r)}))}disconnect(){this.__subscription.unsubscribe()}send(t){this.__write(t)}ackSend(t){let e;const n=new Promise(s=>{e=s}),r=this.__generateId();return this.__subscription.add(this.__recv$.pipe(le(cn),X(un("ack")),X(({_id:s})=>s===r),Le(1)).subscribe(()=>e())),this.__write(t,r),n}get instance(){return this.__instance}get colors(){return this.__colors}get ready(){return Ws(this.__write$).then(()=>{})}},pi=pa;const ma=()=>({configuration:new ye,focus:new ur(void 0),infos:new ye,mocks:new ye,mode:new ur("select"),notification:new ye,setSourceMap:new ye(1),swSourceMapAck:new ye(1),updated:new It,uppercaseTags:new Set}),mi=t=>{let e=0;const n=t.getValue();return n==="interact"?e="select":n==="select"&&(e="interact"),t.next(e),e},va=t=>e=>{const{data:n}=e;switch(n.type){}},ba=async(t,e)=>{const{navigator:{serviceWorker:n}}=t;return Promise.all([n.register("./service-worker.js"),n.ready.then(r=>{if(!r.active)throw new TypeError("smth went wrong on sw activation");return new pi(va(),window.navigator.serviceWorker,r.active)})]).then(([,r])=>r)},ya=(t,e)=>n=>{const{data:r}=n;switch(r.type){case"options":{const{content:{disableOverlay:s,redirectTo:o,timeout:c,run:f}}=r;f&&e.swSourceMapAck.next(0),s&&(Object.defineProperty(t,"__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__",{value:!0}),e.mode.next("interact")),c!==void 0&&Object.defineProperty(t,"__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__",{value:c});const{history:h}=t;o&&h.pushState(h.state,"",o);break}case"ctrl-space":mi(e.mode);break;case"new-configuration":e.configuration.next({...r.content,type:"reset"});break;case"update":e.configuration.next({...r.content,type:"update"});break;case"focus-element":e.focus.next(r.content);break;case"set-source-map":{const{content:s}=r;e.setSourceMap.next(Object.entries(s).reduce((o,[c,f])=>{try{const{href:h}=new URL(c,t.location.href),d=typeof f=="string"?{headers:{},query:{},to:f}:f;o[h]={originalFrom:c,...d}}catch{}return o},{}));break}}},_a=(t,e)=>new pi(ya(t,e),t,la(t.parent),{log(n){if(t.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&console.assert(t.parent!==t),t.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&Eo[n.type]!==ii.Skip){const r={background:this.colors.bg,color:this.colors.fg};console.groupCollapsed(`%c Msg from ${t.origin} (inner) `,Object.entries(r).map(([s,o])=>`${s}: ${o}`).join("; ")),console.info(`window '${t.origin}' is sending a message of type %c ${n.type} `,"background: lightgreen; color: darkgreen"),console.log(n.content),console.groupEnd()}}}),ga=t=>e=>{e.ctrlKey&&e.key===" "&&(e.preventDefault(),mi(t.mode),t.focus.next(void 0))},wa=([t,e])=>ut(e.then(n=>[t,n])),ka=([t,e])=>{const n={label:t,properties:{},type:"layout"},{__manifest:r=Promise.resolve(n)}=e,s=r.then(o=>[e,{__manifest:{...n,...o},tag:t}]).catch(()=>[e,{__manifest:n,tag:t}]);return ut(s)},$a=(t,e)=>ut(e.map(n=>[n,t.whenDefined(n)])).pipe(Me(wa),Me(ka)),Aa=500,An=(t,e)=>{e instanceof Error&&fi(t,e)},Sa=(t,e,n)=>e.pipe(Me(([,{__manifest:{label:r,description:s,...o},tag:c}])=>(delete o.mocks,Us({info:{...uo({description:s,label:r}),...o},tag:c}))),no(Aa),X(r=>r.length>0)).subscribe({error:r=>An(t,r),next:r=>n(r)}),Ea=(t,e,n)=>n.pipe(le(([,{__manifest:{mocks:r={}},tag:s}])=>[s,r])).subscribe({error:r=>An(t,r),next:r=>{e.mocks.next(r)}});async function vi(t,e,n,{addInfo:r,tags:s}){const{subscription:o}=this;if(n){const c=$a(this.customElements,s);return sa(n,this,f=>{An(t,f),r([])}).then(()=>{o.add(Sa(t,c,r)),o.add(Ea(t,e,c))})}}const bi=(t,e)=>{const{document:n}=t;let r=e.firstElementChild;return r===null&&(r=n.createElement("div"),r.style.height="inherit",r.style.display="flex",e.appendChild(r)),r};async function vn(t,e){const n=ra(),{proxyWindow:r=this}=this;return oa({content:t,sources:{importmap:{},uris:[]}},bi(this,e),{eventBus:n,proxyWindow:r})}function yi(t){bi(this,t).remove()}var xa=Object.defineProperty,Oa=(t,e,n)=>e in t?xa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$r=(t,e,n)=>(Oa(t,typeof e!="symbol"?e+"":e,n),n);function Ar(t,e,n){const{properties:r,attributes:s,booleanAttributes:o=[]}=t,c=Object.assign(Object.fromEntries(ti(o).map(h=>[h,!0])),{...s,...r});return e(c).map(({url:h,method:d="GET",notify:_=!1,handler:g=()=>Promise.resolve(new Response)})=>{var S;const x=Ao({...h,method:d},c),P=new URL(x.pathname,(S=x.origin)!=null?S:n);return[P.href,d,(C,q)=>g(C,q).finally(()=>{_&&this.notify(_i(d,P))})]})}const Ia=(t,e)=>{const{href:n,search:r}=t;return n.replace(/\?$/,"").substring(0,n.length-r.length).match(new RegExp(`^${e}$`))!==null},Ca=(t,e)=>{const{href:n}=t;return n.match(new RegExp(`^${e.replace(/\/$/,"")}/`))!==null};class La extends Map{constructor(e){super(),$r(this,"notify"),$r(this,"__urlMap",new Map),this.notify=e}add(e,n){var r,s;const{method:o,url:c}=e,f=(r=this.get(o))!=null?r:new Map,h=(s=this.__urlMap.get(o))!=null?s:[];f.set(c,n),h.push(c),this.set(o,f),this.__urlMap.set(o,h)}match(e){var n;const{method:r,url:s}=e,o=this.__urlMap.get(r);if(o===void 0)return;const c=o.reduce((f,h,d,_)=>{if(Ia(s,h)||Ca(s,h)){if(f===void 0)return d;if(_[f].length<h.length)return d}return f},void 0);if(c!==void 0)return(n=this.get(r))==null?void 0:n.get(o[c])}}const Ta=t=>([e,n,r])=>t.add({method:n,url:e},r);async function Sr(t,e,n,r){const s=Ta(t);return Array.isArray(e)?Promise.all(e.map(o=>Ar.call(t,o,n,r)).flat().map(s)).then(Ue):Promise.all(Ar.call(t,e,n,r).map(s)).then(Ue)}var Er;const xr=(Er=window.__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__)!=null?Er:5e3,Pa=t=>t.includes("-"),Or=t=>({data:{tag:t},description:"preview.notifications.no-webcomponent-definition.description",message:"preview.notifications.no-webcomponent-definition.message",status:"warning"});async function Ma(t,e,n,r=[]){const{location:{href:s},fetch:o}=this,c=ni(this),f=new La(this.notify.bind(this));await Promise.all(r.map(async d=>{var _;let g=()=>[];const S=await Promise.race([At(dn(xr)),At(e.mocks.pipe(X(([P])=>P===d),Le(1)))]);if(S===0)this.notify(Or(d));else{const[,{fetch:P}]=S;P!==void 0&&(g=P)}const x=(_=n.get(d))!=null?_:[];return Sr(f,x,g,s)})).catch(d=>d instanceof Error&&fi(t,d));const h=async(d,_)=>{var g;const S=ri(c,d),x=f.match({method:(g=_==null?void 0:_.method)!=null?g:"GET",url:S});return x!==void 0?x(S,_).then(P=>P):o(d,_)};if(this.proxyWindow){const d=Object.assign(h,{update:async _=>{let g=()=>[];if(Pa(_.tag)){const S=await Promise.race([At(dn(xr)),At(e.mocks.pipe(X(([x])=>x===_.tag),Le(1)))]);if(S===0)this.notify(Or(_.tag));else{const[,{fetch:x}]=S;x!==void 0&&(g=x)}}return Sr(f,_,g,s)}});this.fetch=d,this.proxyWindow.fetch=d}}function Ra(t,e){const{href:n,origin:r,pathname:s}=new URL(t??"",this.location.href);let o=n;return r===this.location.origin&&(o=`{ your domain }${s}`),this.notify({data:{nextUrl:o,target:e??"[undefined]"},description:"preview.notifications.navigation-event.description.open",message:"preview.notifications.navigation-event.message",status:"default"}),this}function ja(t,e,n){const{href:r,origin:s,pathname:o}=new URL(n);let c=r;s===this.location.origin&&(c=`${o}`),this.notify({data:{nextUrl:c},description:"preview.notifications.navigation-event.description.pushState",message:"preview.notifications.navigation-event.message",status:"default"})}function Na(t,e,n){const{href:r,origin:s,pathname:o,search:c}=new URL(n);let f=r;s===this.location.origin&&(f=`${o}${c}`),this.notify({data:{nextUrl:f},description:"preview.notifications.navigation-event.description.replaceState",message:"preview.notifications.navigation-event.message",status:"info"})}function Fa(t){return new Proxy(t,{get:(e,n)=>n==="pushState"?(r,s,o)=>{ja.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:n==="replaceState"?(r,s,o)=>{Na.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:e[n]})}class Ir extends Map{get length(){return this.size}clear(){super.clear()}getItem(e){var n;return(n=super.get(e))!=null?n:null}key(){return null}removeItem(e){super.delete(e)}setItem(e,n){super.set(e,n)}}const Ha=t=>t.tagName==="A";function Ua(t){const{prototype:{createElement:e}}=Document;return Document.prototype.createElement=function(r,s){const o=e.call(this,r,s);if(Ha(o)){const c=()=>{var f;return t.notify({data:{href:lo(t.location.origin,new URL(o.href,t.location.href)),target:(f=o.getAttribute("target"))!=null?f:"_self"},description:"preview.notifications.anchor.description",message:"preview.notifications.anchor.message",status:"info"})};Object.defineProperty(o,"click",{get(){return c},set:Ue})}return o},()=>{Document.prototype.createElement=e}}function Wa(t,e){let n=t.fetch.bind(t);const r={notify:_=>e.next(_)},s=new Ir,o=new Ir,c=Object.assign(t,r),f=new Proxy(c,{get(_,g,S){if(g==="fetch")return n;if(g==="history")return Fa.call(_,_.history);if(g==="open")return Ra.bind(_);if(g==="localStorage")return s;if(g==="sessionStorage")return o;const x=Reflect.get(_,g);return typeof x!="function"?x:function(...C){return Reflect.apply(x,this===S?t:this,C)}},set(_,g,S){return g==="fetch"?(n=S,!0):Reflect.set(_,g,S)}}),h=Object.assign(c,{proxyWindow:f}),d=Ua(h);return{sandbox:h,unpatch:d}}var Ba=Object.defineProperty,Da=(t,e,n)=>e in t?Ba(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cr=(t,e,n)=>(Da(t,typeof e!="symbol"?e+"":e,n),n);function Va(t,e){const{document:n}=t,r=n.createElement("div"),s="";r.style.display=s,r.style.position="fixed",r.style.width="100vw",r.style.height="100%",r.style.backgroundColor="rgba(0, 0, 0, 0.05)",r.style.zIndex=`${So}`;const o=()=>r.style.display===s,c=()=>o()?r.style.display="none":r.style.display=s,f=e.pipe(X(h=>t.__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__?h==="interact":!0)).subscribe(h=>{switch(h){case"interact":t.dispatchEvent(new Event("mousedown")),r.style.display="none";break;case"select":r.style.display=s;break;case 0:default:c();break}});return n.body.appendChild(r),{cleanup:()=>f.unsubscribe(),overlay:r}}const qa=t=>{const e=t.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.height="inherit",t.body.appendChild(e),e};function Ga(t,e){const n=t;return Object.assign(t,{bootstrap:vi.bind(n),mocks:{fetch:new Map},postChannel:e,subscription:new ce,unmount:yi.bind(n),update:vn.bind(n)})}class Ya{constructor(){Cr(this,"_results",new Map),Cr(this,"_queue",Promise.resolve())}add(e){const r=[...e].map(s=>{let o,c;const f=new Promise((h,d)=>{o=h,c=d});return this._queue=this._queue.then(()=>s()).then(h=>{o(h)}).catch(h=>c(h)),f});return Promise.allSettled(r)}get(e){return this._results.get(e)}}const za=t=>e=>{e.forEach(n=>{n.status==="rejected"&&t.next({data:{reason:n.reason},description:"preview.notifications.lifecycle.description",message:"preview.notifications.lifecycle.message",status:"error"})})},Ja=t=>e=>{t.infos.next(e),e.forEach(({tag:n})=>t.uppercaseTags.add(n.toUpperCase()))},Ka=(t,e,n,r)=>{const s=new Ya,o=r.configuration.pipe(ro(r.swSourceMapAck)).subscribe(([c])=>{const{configuration:f}=c,{content:h}=f;let d;if(c.type==="reset"){const{contexts:_,tags:g}=c;d=s.add([()=>yi.call(t,e),()=>vi.call(t,n,r,f,{addInfo:Ja(r),tags:g}),()=>Ma.call(t,n,r,_,c.tags),()=>vn.call(t,h,e).finally(()=>r.updated.next(0))])}else{const{context:_}=c;d=s.add([()=>{var g,S,x;return(x=(g=t.proxyWindow)==null?void 0:(S=g.fetch).update)==null?void 0:x.call(S,_)},()=>vn.call(t,h,e).finally(()=>r.updated.next(0))])}d.then(za(r.notification)).catch(Ue)});return()=>o.unsubscribe()},Qa=t=>{const{body:e}=t;e.style.height="100%",e.style.padding="0",e.style.margin="0"},Xa=(t,e)=>{const{location:{origin:n,port:r,protocol:s}}=t;return!(n!==e.origin||r!==e.port||s!==e.protocol)},_i=(t,e)=>({data:{method:t,url:e.href.substring(e.origin.length)},description:"preview.notifications.fetch-event.description",message:"preview.notifications.fetch-event.message",status:"info"}),Za=(t,e)=>{const n=ni(t),{document:r,parent:s}=t;if(s===t)return;const o=t.fetch.bind(t);t.fetch=(c,f)=>{var h;const d=ri(n,c);return Xa(r,d)&&e.next(_i((h=f==null?void 0:f.method)!=null?h:"GET",d)),o(c,f)}},ec=(t,e,n)=>{Qa(t.document),Za(t,n.notification);const{cleanup:r}=Va(t,n.mode.asObservable()),s=vo(t.document,n.focus.asObservable(),n.mode.asObservable()),o=qa(t.document),c=Ga(t,e),{sandbox:f,unpatch:h}=Wa(c,n.notification),d=Ka(f,o,e,n);return{cleanup:()=>{d(),h(),s(),r()},sandboxedWindow:f}};function tc(t){const e=new ce;return e.add(t.updated.subscribe(()=>this.send({content:{},type:"updated"}))),e.add(t.infos.subscribe(n=>this.send({content:n,type:"tag-info"}))),e.add(t.notification.subscribe(n=>this.send({content:n,type:"notification"}))),e.add(t.mode.subscribe(n=>this.send({content:{mode:n},type:"ctrl-space"}))),()=>e.unsubscribe()}function nc(t){const e=new ce;return e.add(t.setSourceMap.subscribe(n=>{this.ackSend({content:n,type:"set-source-map"}).then(()=>t.swSourceMapAck.next(0)).catch(Ue)})),()=>e.unsubscribe()}function rc(t,...e){const n=e.map(({type:r,handler:s})=>(t.addEventListener(r,s),()=>t.removeEventListener(r,s)));return()=>{n.forEach(r=>r())}}function ic(t,e){t.addEventListener("unload",()=>{t.subscription.unsubscribe(),e.forEach(n=>n())})}(async t=>{const e=ma(),n=await ba(t),r=_a(t,e),s=nc.call(n,e),o=tc.call(r,e),c=rc(t,{handler:ga(e),type:"keydown"},{handler:kr(r,"mousemove"),type:"mousemove"},{handler:kr(r,"mousedown"),type:"mousedown"},{handler:ua(t,r,e),type:"mousedown"}),{cleanup:f,sandboxedWindow:h}=ec(t,r,e);ic(h,[f,c,o,s,()=>r.disconnect(),()=>n.send({content:{},type:"unload-client"}),()=>n.disconnect()])})(window).catch(t=>{throw console.error(`[preview] Error Boundary: ${String(t)}`),t});
|
@@ -6088,7 +6088,14 @@ async function bootstrap(postChannel, channels, config2, {
|
|
6088
6088
|
const { subscription } = this;
|
6089
6089
|
if (config2) {
|
6090
6090
|
const info$ = requireInfo(this.customElements, tags);
|
6091
|
-
return premount(
|
6091
|
+
return premount(
|
6092
|
+
config2,
|
6093
|
+
this,
|
6094
|
+
(err) => {
|
6095
|
+
reporter(postChannel, err);
|
6096
|
+
addInfo([]);
|
6097
|
+
}
|
6098
|
+
).then(() => {
|
6092
6099
|
subscription.add(collectInfos(postChannel, info$, addInfo));
|
6093
6100
|
subscription.add(collectMocks(postChannel, channels, info$));
|
6094
6101
|
});
|
@@ -6497,11 +6504,12 @@ const appendRenderRoot = (document2) => {
|
|
6497
6504
|
document2.body.appendChild(renderRoot);
|
6498
6505
|
return renderRoot;
|
6499
6506
|
};
|
6500
|
-
function createLifecycle(frame) {
|
6507
|
+
function createLifecycle(frame, postChannel) {
|
6501
6508
|
const composerFrame = frame;
|
6502
6509
|
return Object.assign(frame, {
|
6503
6510
|
bootstrap: bootstrap.bind(composerFrame),
|
6504
6511
|
mocks: { fetch: /* @__PURE__ */ new Map() },
|
6512
|
+
postChannel,
|
6505
6513
|
subscription: new Subscription(),
|
6506
6514
|
unmount: unmount.bind(composerFrame),
|
6507
6515
|
update: update.bind(composerFrame)
|
@@ -6623,7 +6631,7 @@ const createComposerApplication = (self2, postChannel, channels) => {
|
|
6623
6631
|
const { cleanup: overlayDisplaySubscriptionCleanup } = appendOverlay(self2, channels.mode.asObservable());
|
6624
6632
|
const focusCleanup = focus(self2.document, channels.focus.asObservable(), channels.mode.asObservable());
|
6625
6633
|
const renderRoot = appendRenderRoot(self2.document);
|
6626
|
-
const frame = createLifecycle(self2);
|
6634
|
+
const frame = createLifecycle(self2, postChannel);
|
6627
6635
|
const { sandbox: sandboxedWindow, unpatch } = wrap(frame, channels.notification);
|
6628
6636
|
const updateSubscriptionsCleanup = run(sandboxedWindow, renderRoot, postChannel, channels);
|
6629
6637
|
return {
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</style>
|
18
18
|
<script src="https://unpkg.com/zone.js"></script>
|
19
19
|
|
20
|
-
<script type="module" crossorigin src="./assets/index-
|
20
|
+
<script type="module" crossorigin src="./assets/index-ea7e80d3.js"></script>
|
21
21
|
</head>
|
22
22
|
<body></body>
|
23
23
|
</html>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
"dynamicImports": [
|
9
9
|
"../../.yarn/__virtual__/@micro-lc-composer-virtual-1e9d239e46/0/cache/@micro-lc-composer-npm-2.0.3-7d85cea61f-88452090ec.zip/node_modules/@micro-lc/composer/dist/lib/logger/errors.js"
|
10
10
|
],
|
11
|
-
"file": "assets/index-
|
11
|
+
"file": "assets/index-ea7e80d3.js",
|
12
12
|
"isEntry": true,
|
13
13
|
"src": "index.html"
|
14
14
|
}
|
@@ -2106,7 +2106,6 @@
|
|
2106
2106
|
const style = { background: channel.colors.bg, color: channel.colors.fg };
|
2107
2107
|
console.groupCollapsed(`%c Fetch from Service Worker `, Object.entries(style).map(([styleKey, styleValue]) => `${styleKey}: ${styleValue}`).join("; "));
|
2108
2108
|
console.info(`sw is fetching %c ${finalUrl}`, "background: lightgreen; color: darkgreen");
|
2109
|
-
console.log({ clientId, clientSourceMap, request: event.request });
|
2110
2109
|
console.groupEnd();
|
2111
2110
|
}
|
2112
2111
|
event.respondWith(
|
package/website/index.html
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
</style>
|
18
18
|
<script src="https://unpkg.com/zone.js"></script>
|
19
19
|
|
20
|
-
<script type="module" crossorigin src="./assets/index-
|
20
|
+
<script type="module" crossorigin src="./assets/index-c372c995.js"></script>
|
21
21
|
</head>
|
22
22
|
<body></body>
|
23
23
|
</html>
|
package/website/manifest.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
"dynamicImports": [
|
9
9
|
"../../.yarn/__virtual__/@micro-lc-composer-virtual-1e9d239e46/0/cache/@micro-lc-composer-npm-2.0.3-7d85cea61f-88452090ec.zip/node_modules/@micro-lc/composer/dist/lib/logger/errors.js"
|
10
10
|
],
|
11
|
-
"file": "assets/index-
|
11
|
+
"file": "assets/index-c372c995.js",
|
12
12
|
"isEntry": true,
|
13
13
|
"src": "index.html"
|
14
14
|
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use strict";(()=>{var X=function(r,t){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])},X(r,t)};function v(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");X(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function dr(r,t,e,o){function n(i){return i instanceof e?i:new e(function(s){s(i)})}return new(e||(e=Promise))(function(i,s){function a(p){try{c(o.next(p))}catch(m){s(m)}}function f(p){try{c(o.throw(p))}catch(m){s(m)}}function c(p){p.done?i(p.value):n(p.value).then(a,f)}c((o=o.apply(r,t||[])).next())})}function B(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(p){return f([c,p])}}function f(c){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(e=0)),e;)try{if(o=1,n&&(i=c[0]&2?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,n=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1],i=c;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(c);break}i[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(r,e)}catch(p){c=[6,p],n=0}finally{o=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function E(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],o=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var o=e.call(r),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(a){s={error:a}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(s)throw s.error}}return i}function _(r,t,e){if(e||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return r.concat(i||Array.prototype.slice.call(t))}function P(r){return this instanceof P?(this.v=r,this):new P(r)}function vr(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=e.apply(r,t||[]),n,i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(l){o[l]&&(n[l]=function(h){return new Promise(function(x,d){i.push([l,h,x,d])>1||a(l,h)})})}function a(l,h){try{f(o[l](h))}catch(x){m(i[0][3],x)}}function f(l){l.value instanceof P?Promise.resolve(l.value.v).then(c,p):m(i[0][2],l)}function c(l){a("next",l)}function p(l){a("throw",l)}function m(l,h){l(h),i.shift(),i.length&&a(i[0][0],i[0][1])}}function br(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof E=="function"?E(r):r[Symbol.iterator](),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(i){e[i]=r[i]&&function(s){return new Promise(function(a,f){s=r[i](s),n(a,f,s.done,s.value)})}}function n(i,s,a,f){Promise.resolve(f).then(function(c){i({value:c,done:a})},s)}}function u(r){return typeof r=="function"}function j(r){var t=function(o){Error.call(o),o.stack=new Error().stack},e=r(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var N=j(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
|
2
2
|
`+e.map(function(o,n){return n+1+") "+o.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function I(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var g=function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,o,n,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=E(s),f=a.next();!f.done;f=a.next()){var c=f.value;c.remove(this)}}catch(d){t={error:d}}finally{try{f&&!f.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else s.remove(this);var p=this.initialTeardown;if(u(p))try{p()}catch(d){i=d instanceof N?d.errors:[d]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var l=E(m),h=l.next();!h.done;h=l.next()){var x=h.value;try{yr(x)}catch(d){i=i??[],d instanceof N?i=_(_([],y(i)),y(d.errors)):i.push(d)}}}catch(d){o={error:d}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(o)throw o.error}}}if(i)throw new N(i)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)yr(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&I(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&I(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=function(){var t=new r;return t.closed=!0,t}(),r}();var Z=g.EMPTY;function z(r){return r instanceof g||r&&"closed"in r&&u(r.remove)&&u(r.add)&&u(r.unsubscribe)}function yr(r){u(r)?r():r.unsubscribe()}var w={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var k={setTimeout:function(r,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var n=k.delegate;return n?.setTimeout?n.setTimeout.apply(n,_([r,t],y(e))):setTimeout.apply(void 0,_([r,t],y(e)))},clearTimeout:function(r){var t=k.delegate;return(t?.clearTimeout||clearTimeout)(r)},delegate:void 0};function G(r){k.setTimeout(function(){var t=w.onUnhandledError;if(t)t(r);else throw r})}function rr(){}var xr=function(){return er("C",void 0,void 0)}();function _r(r){return er("E",void 0,r)}function gr(r){return er("N",r,void 0)}function er(r,t,e){return{kind:r,value:t,error:e}}var A=null;function C(r){if(w.useDeprecatedSynchronousErrorHandling){var t=!A;if(t&&(A={errorThrown:!1,error:null}),r(),t){var e=A,o=e.errorThrown,n=e.error;if(A=null,o)throw n}}else r()}function wr(r){w.useDeprecatedSynchronousErrorHandling&&A&&(A.errorThrown=!0,A.error=r)}var $=function(r){v(t,r);function t(e){var o=r.call(this)||this;return o.isStopped=!1,e?(o.destination=e,z(e)&&e.add(o)):o.destination=oe,o}return t.create=function(e,o,n){return new R(e,o,n)},t.prototype.next=function(e){this.isStopped?or(gr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?or(_r(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?or(xr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(g);var re=Function.prototype.bind;function tr(r,t){return re.call(r,t)}var ee=function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(o){K(o)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(o){K(o)}else K(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){K(e)}},r}(),R=function(r){v(t,r);function t(e,o,n){var i=r.call(this)||this,s;if(u(e)||!e)s={next:e??void 0,error:o??void 0,complete:n??void 0};else{var a;i&&w.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},s={next:e.next&&tr(e.next,a),error:e.error&&tr(e.error,a),complete:e.complete&&tr(e.complete,a)}):s=e}return i.destination=new ee(s),i}return t}($);function K(r){w.useDeprecatedSynchronousErrorHandling?wr(r):G(r)}function te(r){throw r}function or(r,t){var e=w.onStoppedNotification;e&&k.setTimeout(function(){return e(r,t)})}var oe={closed:!0,next:rr,error:te,complete:rr};var W=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Sr(r){return r}function Er(r){return r.length===0?Sr:r.length===1?r[0]:function(e){return r.reduce(function(o,n){return n(o)},e)}}var b=function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,o){var n=this,i=ie(t)?t:new R(t,e,o);return C(function(){var s=n,a=s.operator,f=s.source;i.add(a?a.call(i,f):f?n._subscribe(i):n._trySubscribe(i))}),i},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var o=this;return e=Or(e),new e(function(n,i){var s=new R({next:function(a){try{t(a)}catch(f){i(f),s.unsubscribe()}},error:i,complete:n});o.subscribe(s)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[W]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Er(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=Or(t),new t(function(o,n){var i;e.subscribe(function(s){return i=s},function(s){return n(s)},function(){return o(i)})})},r.create=function(t){return new r(t)},r}();function Or(r){var t;return(t=r??w.Promise)!==null&&t!==void 0?t:Promise}function ne(r){return r&&u(r.next)&&u(r.error)&&u(r.complete)}function ie(r){return r&&r instanceof $||ne(r)&&z(r)}function se(r){return u(r?.lift)}function T(r){return function(t){if(se(t))return t.lift(function(e){try{return r(e,this)}catch(o){this.error(o)}});throw new TypeError("Unable to lift unknown Observable type")}}function O(r,t,e,o,n){return new ae(r,t,e,o,n)}var ae=function(r){v(t,r);function t(e,o,n,i,s,a){var f=r.call(this,e)||this;return f.onFinalize=s,f.shouldUnsubscribe=a,f._next=o?function(c){try{o(c)}catch(p){e.error(p)}}:r.prototype._next,f._error=i?function(c){try{i(c)}catch(p){e.error(p)}finally{this.unsubscribe()}}:r.prototype._error,f._complete=n?function(){try{n()}catch(c){e.error(c)}finally{this.unsubscribe()}}:r.prototype._complete,f}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var o=this.closed;r.prototype.unsubscribe.call(this),!o&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}($);var Mr=j(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}});var nr=function(r){v(t,r);function t(){var e=r.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var o=new Tr(this,this);return o.operator=e,o},t.prototype._throwIfClosed=function(){if(this.closed)throw new Mr},t.prototype.next=function(e){var o=this;C(function(){var n,i;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var s=E(o.currentObservers),a=s.next();!a.done;a=s.next()){var f=a.value;f.next(e)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var o=this;C(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=e;for(var n=o.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;C(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var o=e.observers;o.length;)o.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var o=this,n=this,i=n.hasError,s=n.isStopped,a=n.observers;return i||s?Z:(this.currentObservers=null,a.push(e),new g(function(){o.currentObservers=null,I(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var o=this,n=o.hasError,i=o.thrownError,s=o.isStopped;n?e.error(i):s&&e.complete()},t.prototype.asObservable=function(){var e=new b;return e.source=this,e},t.create=function(e,o){return new Tr(e,o)},t}(b);var Tr=function(r){v(t,r);function t(e,o){var n=r.call(this)||this;return n.destination=e,n.source=o,n}return t.prototype.next=function(e){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,e)},t.prototype.error=function(e){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,e)},t.prototype.complete=function(){var e,o;(o=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||o===void 0||o.call(e)},t.prototype._subscribe=function(e){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(e))!==null&&n!==void 0?n:Z},t}(nr);var q={now:function(){return(q.delegate||Date).now()},delegate:void 0};var F=function(r){v(t,r);function t(e,o,n){e===void 0&&(e=1/0),o===void 0&&(o=1/0),n===void 0&&(n=q);var i=r.call(this)||this;return i._bufferSize=e,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,o),i}return t.prototype.next=function(e){var o=this,n=o.isStopped,i=o._buffer,s=o._infiniteTimeWindow,a=o._timestampProvider,f=o._windowTime;n||(i.push(e),!s&&i.push(a.now()+f)),this._trimBuffer(),r.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(e),n=this,i=n._infiniteTimeWindow,s=n._buffer,a=s.slice(),f=0;f<a.length&&!e.closed;f+=i?1:2)e.next(a[f]);return this._checkFinalizedStatuses(e),o},t.prototype._trimBuffer=function(){var e=this,o=e._bufferSize,n=e._timestampProvider,i=e._buffer,s=e._infiniteTimeWindow,a=(s?1:2)*o;if(o<1/0&&a<i.length&&i.splice(0,i.length-a),!s){for(var f=n.now(),c=0,p=1;p<i.length&&i[p]<=f;p+=2)c=p;c&&i.splice(0,c+1)}},t}(nr);var Pr=function(r){v(t,r);function t(e,o){return r.call(this)||this}return t.prototype.schedule=function(e,o){return o===void 0&&(o=0),this},t}(g);var V={setInterval:function(r,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var n=V.delegate;return n?.setInterval?n.setInterval.apply(n,_([r,t],y(e))):setInterval.apply(void 0,_([r,t],y(e)))},clearInterval:function(r){var t=V.delegate;return(t?.clearInterval||clearInterval)(r)},delegate:void 0};var Ir=function(r){v(t,r);function t(e,o){var n=r.call(this,e,o)||this;return n.scheduler=e,n.work=o,n.pending=!1,n}return t.prototype.schedule=function(e,o){var n;if(o===void 0&&(o=0),this.closed)return this;this.state=e;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,o)),this.pending=!0,this.delay=o,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(s,this.id,o),this},t.prototype.requestAsyncId=function(e,o,n){return n===void 0&&(n=0),V.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,o,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return o;o!=null&&V.clearInterval(o)},t.prototype.execute=function(e,o){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,o);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,o){var n=!1,i;try{this.work(e)}catch(s){n=!0,i=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,o=e.id,n=e.scheduler,i=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,I(i,this),o!=null&&(this.id=this.recycleAsyncId(n,o,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},t}(Pr);var ir=function(){function r(t,e){e===void 0&&(e=r.now),this.schedulerActionCtor=t,this.now=e}return r.prototype.schedule=function(t,e,o){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(o,e)},r.now=q.now,r}();var Ar=function(r){v(t,r);function t(e,o){o===void 0&&(o=ir.now);var n=r.call(this,e,o)||this;return n.actions=[],n._active=!1,n}return t.prototype.flush=function(e){var o=this.actions;if(this._active){o.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=o.shift());if(this._active=!1,n){for(;e=o.shift();)e.unsubscribe();throw n}},t}(ir);var sr=new Ar(Ir),jr=sr;var kr=new b(function(r){return r.complete()});function Cr(r){return r&&u(r.schedule)}var J=function(r){return r&&typeof r.length=="number"&&typeof r!="function"};function Rr(r){return u(r?.then)}function Wr(r){return u(r[W])}function Fr(r){return Symbol.asyncIterator&&u(r?.[Symbol.asyncIterator])}function Ur(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ce(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Lr=ce();function Dr(r){return u(r?.[Lr])}function $r(r){return vr(this,arguments,function(){var e,o,n,i;return B(this,function(s){switch(s.label){case 0:e=r.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,P(e.read())];case 3:return o=s.sent(),n=o.value,i=o.done,i?[4,P(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,P(n)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function qr(r){return u(r?.getReader)}function U(r){if(r instanceof b)return r;if(r!=null){if(Wr(r))return fe(r);if(J(r))return ue(r);if(Rr(r))return pe(r);if(Fr(r))return Vr(r);if(Dr(r))return le(r);if(qr(r))return me(r)}throw Ur(r)}function fe(r){return new b(function(t){var e=r[W]();if(u(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ue(r){return new b(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}function pe(r){return new b(function(t){r.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,G)})}function le(r){return new b(function(t){var e,o;try{for(var n=E(r),i=n.next();!i.done;i=n.next()){var s=i.value;if(t.next(s),t.closed)return}}catch(a){e={error:a}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}t.complete()})}function Vr(r){return new b(function(t){he(r,t).catch(function(e){return t.error(e)})})}function me(r){return Vr($r(r))}function he(r,t){var e,o,n,i;return dr(this,void 0,void 0,function(){var s,a;return B(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),e=br(r),f.label=1;case 1:return[4,e.next()];case 2:if(o=f.sent(),!!o.done)return[3,4];if(s=o.value,t.next(s),t.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=f.sent(),n={error:a},[3,11];case 6:return f.trys.push([6,,9,10]),o&&!o.done&&(i=e.return)?[4,i.call(e)]:[3,8];case 7:f.sent(),f.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Hr(r,t,e,o,n){o===void 0&&(o=0),n===void 0&&(n=!1);var i=t.schedule(function(){e(),n?r.add(this.schedule(null,o)):this.unsubscribe()},o);if(r.add(i),!n)return i}var Yr=j(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}});function ar(r,t){var e=typeof t=="object";return new Promise(function(o,n){var i=new R({next:function(s){o(s),i.unsubscribe()},error:n,complete:function(){e?o(t.defaultValue):n(new Yr)}});r.subscribe(i)})}function Br(r){return r instanceof Date&&!isNaN(r)}function M(r,t){return T(function(e,o){var n=0;e.subscribe(O(o,function(i){o.next(r.call(t,i,n++))}))})}var de=Array.isArray;function ve(r,t){return de(t)?r.apply(void 0,_([],y(t))):r(t)}function Nr(r){return M(function(t){return ve(r,t)})}function zr(r,t,e,o,n,i,s,a){var f=[],c=0,p=0,m=!1,l=function(){m&&!f.length&&!c&&t.complete()},h=function(d){return c<o?x(d):f.push(d)},x=function(d){i&&t.next(d),c++;var hr=!1;U(e(d,p++)).subscribe(O(t,function(D){n?.(D),i?h(D):t.next(D)},function(){hr=!0},void 0,function(){if(hr)try{c--;for(var D=function(){var Y=f.shift();s?Hr(t,s,function(){return x(Y)}):x(Y)};f.length&&c<o;)D();l()}catch(Y){t.error(Y)}}))};return r.subscribe(O(t,h,function(){m=!0,l()})),function(){a?.()}}function cr(r,t,e){return e===void 0&&(e=1/0),u(t)?cr(function(o,n){return M(function(i,s){return t(o,i,n,s)})(U(r(o,n)))},e):(typeof t=="number"&&(e=t),T(function(o,n){return zr(o,n,r,e)}))}var be=["addListener","removeListener"],ye=["addEventListener","removeEventListener"],xe=["on","off"];function H(r,t,e,o){if(u(e)&&(o=e,e=void 0),o)return H(r,t,e).pipe(Nr(o));var n=y(we(r)?ye.map(function(a){return function(f){return r[a](t,f,e)}}):_e(r)?be.map(Gr(r,t)):ge(r)?xe.map(Gr(r,t)):[],2),i=n[0],s=n[1];if(!i&&J(r))return cr(function(a){return H(a,t,e)})(U(r));if(!i)throw new TypeError("Invalid event target");return new b(function(a){var f=function(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return a.next(1<c.length?c:c[0])};return i(f),function(){return s(f)}})}function Gr(r,t){return function(e){return function(o){return r[e](t,o)}}}function _e(r){return u(r.addListener)&&u(r.removeListener)}function ge(r){return u(r.on)&&u(r.off)}function we(r){return u(r.addEventListener)&&u(r.removeEventListener)}function Kr(r,t,e){r===void 0&&(r=0),e===void 0&&(e=jr);var o=-1;return t!=null&&(Cr(t)?e=t:o=t),new b(function(n){var i=Br(r)?+r-e.now():r;i<0&&(i=0);var s=0;return e.schedule(function(){n.closed||(n.next(s++),0<=o?this.schedule(void 0,o):n.complete())},i)})}function fr(r,t){return r===void 0&&(r=0),t===void 0&&(t=sr),r<0&&(r=0),Kr(r,r,t)}function S(r,t){return T(function(e,o){var n=0;e.subscribe(O(o,function(i){return r.call(t,i,n++)&&o.next(i)}))})}function L(r){return r<=0?function(){return kr}:T(function(t,e){var o=0;t.subscribe(O(e,function(n){++o<=r&&(e.next(n),r<=o&&e.complete())}))})}var Jr=(r,t)=>e=>({postMessage:o=>{let{errorCatcher:n=()=>()=>{},...i}=t??{};r.clients.get(e).then(s=>s?.postMessage(o,i)).catch(n(e,o))}});var Qr=(r=>(r.Ack="ack",r.Syn="syn",r))(Qr||{}),Se=Object.values(Qr),ur=r=>r.data,pr=r=>t=>t.type===r.toString(),Ee=r=>{let t=r.data;return typeof t=="object"&&t!==null&&"type"in t&&typeof t.type=="string"&&"instance"in t&&typeof t.instance=="string"&&"content"in t},Oe=()=>{let r="#";for(let t=0;t<3;t++)r+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return r},Me=class{__generateId;__instance;__colors;__listener;__log;__receiver;__subscription;__okToWrite;__write$;__recv$;__connect(r,t){let e=fr(t).subscribe(()=>this.__receiver.postMessage({content:r,instance:r,type:"syn".toString()}));this.__subscription.add(e),this.__subscription.add(this.__recv$.pipe(M(ur),S(pr("ack")),S(({content:o})=>o===r),L(1)).subscribe(({instance:o})=>{this.__okToWrite.next(0),this.__subscription.add(this.__recv$.pipe(S(({data:{type:n,instance:i}})=>!Se.includes(n)&&i===o)).subscribe(n=>{this.__listener(n);let{data:i}=n;i._id!==void 0&&this.__receiver.postMessage({...i,content:i,instance:r,type:"ack"})})),e.unsubscribe()})),this.__subscription.add(this.__recv$.pipe(M(ur),S(pr("syn")),S(({instance:o})=>o!==r),L(1)).subscribe(({content:o})=>{this.__receiver.postMessage({content:o,instance:r,type:"ack"})}))}__write(r,t){let e={};t!==void 0&&(e._id=t),this.__subscription.add(this.__write$.subscribe(()=>{let o=Object.assign(r,{instance:this.__instance,...e});this.__receiver.postMessage(o),this.__log?.(o)}))}constructor(r,t,e,o){this.__generateId=()=>globalThis.crypto.randomUUID();let n=this.__generateId(),i=new F,s=H(t,"message").pipe(S(Ee)).subscribe(i);this.__subscription=new g,this.__subscription.add(s),this.__okToWrite=new F(1),this.__write$=this.__okToWrite.pipe(L(1)),this.__recv$=i.asObservable(),this.__listener=r,this.__log=o?.log&&o.log.bind(this),this.__instance=n;let a=Oe();this.__colors={bg:`${a}22`,fg:a},this.__receiver=e,this.__connect(n,o?.period?o.period:10)}disconnect(){this.__subscription.unsubscribe()}send(r){this.__write(r)}ackSend(r){let t,e=new Promise(n=>{t=n}),o=this.__generateId();return this.__subscription.add(this.__recv$.pipe(M(ur),S(pr("ack")),S(({_id:n})=>n===o),L(1)).subscribe(()=>t())),this.__write(r,o),e}get instance(){return this.__instance}get colors(){return this.__colors}get ready(){return ar(this.__write$).then(()=>{})}},Xr=Me;var Q=new Map,lr=new Map,mr=new Map,Zr=(r,t)=>{let e=t.keys(),o,{done:n=!1,value:i}=e.next();for(;!n&&o===void 0;){i!==void 0&&r.startsWith(i)&&(o=i,n=!0);let{value:s,done:a=!1}=e.next();n=a,i=s}return o},Te=r=>r!==null&&"id"in r,Pe=r=>t=>console.error(`[SW]: error on ${r} - ${String(t)}`),Ie=Jr(self,{errorCatcher:Pe}),Ae=r=>function({data:e}){let o=e;switch(o.type){case"set-source-map":{let{content:n}=o,i=Object.entries(n).reduce((s,[a,f])=>{let{clientSourceMap:c,clientTosMap:p}=s,{headers:m={}}=f;return Object.keys(m).length>0&&p.set(encodeURI(f.to),m),c.set(encodeURI(a),f),s},{clientSourceMap:new Map,clientTosMap:new Map});lr.set(r,i.clientSourceMap),mr.set(r,i.clientTosMap);break}case"unload-client":{lr.delete(r),mr.delete(r),Q.delete(r),this.disconnect();break}default:break}},je=r=>{let t=new Map,e=new F,o={addEventListener(n,i){t.set(i,e.subscribe(s=>i(s)))},removeEventListener(n,i){t.get(i)?.unsubscribe(),t.delete(i)}};return{buffer:e,channel:new Xr(Ae(r),o,Ie(r))}},ke=r=>{let t=Q.get(r);return t||(t=je(r),Q.set(r,t)),t};self.addEventListener("install",()=>{self.skipWaiting().catch(r=>console.error(`[SW] error while skipWaiting - ${String(r)}`))});self.addEventListener("activate",r=>{r.waitUntil(self.clients.claim())});self.addEventListener("message",r=>{let{source:t}=r;if(!Te(t))return;let{id:e}=t;ke(e).buffer.next(r)});self.addEventListener("fetch",r=>{let t=r.clientId!==""?r.clientId:r.resultingClientId,e=lr.get(t);if(!e)return r.respondWith(self.fetch(r.request));let o=mr.get(t),{request:{url:n}}=r,i=Zr(n,e),s=Zr(n,o),a=new Headers(r.request.headers),f={};if(i!==void 0){let m=e.get(i)?.to,l=e.get(i)?.headers??{},h=n.substring(i.length);f=e.get(i)?.query??{},n=`${m}${h}`,Object.entries(l).forEach(([x,d])=>a.set(x,d))}if(s!==void 0){let m=o.get(s)??{};Object.entries(m).forEach(([l,h])=>a.set(l,h))}let c;try{let m=new URL(n);Object.entries(f).forEach(([l,h])=>m.searchParams.set(l,h)),c=m.href}catch{c=n}let p=Q.get(t)?.channel;r.respondWith(self.fetch(c,{...r.request,headers:a}).catch(m=>(console.error(m),Promise.reject(m))))});})();
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function I(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var g=function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,o,n,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=E(s),f=a.next();!f.done;f=a.next()){var c=f.value;c.remove(this)}}catch(d){t={error:d}}finally{try{f&&!f.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else s.remove(this);var p=this.initialTeardown;if(u(p))try{p()}catch(d){i=d instanceof N?d.errors:[d]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var l=E(m),h=l.next();!h.done;h=l.next()){var x=h.value;try{yr(x)}catch(d){i=i??[],d instanceof N?i=_(_([],y(i)),y(d.errors)):i.push(d)}}}catch(d){o={error:d}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(o)throw o.error}}}if(i)throw new N(i)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)yr(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&I(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&I(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=function(){var t=new r;return t.closed=!0,t}(),r}();var Z=g.EMPTY;function z(r){return r instanceof g||r&&"closed"in r&&u(r.remove)&&u(r.add)&&u(r.unsubscribe)}function yr(r){u(r)?r():r.unsubscribe()}var w={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var k={setTimeout:function(r,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var n=k.delegate;return n?.setTimeout?n.setTimeout.apply(n,_([r,t],y(e))):setTimeout.apply(void 0,_([r,t],y(e)))},clearTimeout:function(r){var t=k.delegate;return(t?.clearTimeout||clearTimeout)(r)},delegate:void 0};function G(r){k.setTimeout(function(){var t=w.onUnhandledError;if(t)t(r);else throw r})}function rr(){}var xr=function(){return er("C",void 0,void 0)}();function _r(r){return er("E",void 0,r)}function gr(r){return er("N",r,void 0)}function er(r,t,e){return{kind:r,value:t,error:e}}var A=null;function C(r){if(w.useDeprecatedSynchronousErrorHandling){var t=!A;if(t&&(A={errorThrown:!1,error:null}),r(),t){var e=A,o=e.errorThrown,n=e.error;if(A=null,o)throw n}}else r()}function wr(r){w.useDeprecatedSynchronousErrorHandling&&A&&(A.errorThrown=!0,A.error=r)}var $=function(r){v(t,r);function t(e){var o=r.call(this)||this;return o.isStopped=!1,e?(o.destination=e,z(e)&&e.add(o)):o.destination=oe,o}return t.create=function(e,o,n){return new R(e,o,n)},t.prototype.next=function(e){this.isStopped?or(gr(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?or(_r(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?or(xr,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(g);var re=Function.prototype.bind;function tr(r,t){return re.call(r,t)}var ee=function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(o){K(o)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(o){K(o)}else K(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){K(e)}},r}(),R=function(r){v(t,r);function t(e,o,n){var i=r.call(this)||this,s;if(u(e)||!e)s={next:e??void 0,error:o??void 0,complete:n??void 0};else{var a;i&&w.useDeprecatedNextContext?(a=Object.create(e),a.unsubscribe=function(){return i.unsubscribe()},s={next:e.next&&tr(e.next,a),error:e.error&&tr(e.error,a),complete:e.complete&&tr(e.complete,a)}):s=e}return i.destination=new ee(s),i}return t}($);function K(r){w.useDeprecatedSynchronousErrorHandling?wr(r):G(r)}function te(r){throw r}function or(r,t){var e=w.onStoppedNotification;e&&k.setTimeout(function(){return e(r,t)})}var oe={closed:!0,next:rr,error:te,complete:rr};var W=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Sr(r){return r}function Er(r){return r.length===0?Sr:r.length===1?r[0]:function(e){return r.reduce(function(o,n){return n(o)},e)}}var b=function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,o){var n=this,i=ie(t)?t:new R(t,e,o);return C(function(){var s=n,a=s.operator,f=s.source;i.add(a?a.call(i,f):f?n._subscribe(i):n._trySubscribe(i))}),i},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var o=this;return e=Or(e),new e(function(n,i){var s=new R({next:function(a){try{t(a)}catch(f){i(f),s.unsubscribe()}},error:i,complete:n});o.subscribe(s)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[W]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Er(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=Or(t),new t(function(o,n){var i;e.subscribe(function(s){return i=s},function(s){return n(s)},function(){return o(i)})})},r.create=function(t){return new r(t)},r}();function Or(r){var t;return(t=r??w.Promise)!==null&&t!==void 0?t:Promise}function ne(r){return r&&u(r.next)&&u(r.error)&&u(r.complete)}function ie(r){return r&&r instanceof $||ne(r)&&z(r)}function se(r){return u(r?.lift)}function M(r){return function(t){if(se(t))return t.lift(function(e){try{return r(e,this)}catch(o){this.error(o)}});throw new TypeError("Unable to lift unknown Observable type")}}function O(r,t,e,o,n){return new ae(r,t,e,o,n)}var ae=function(r){v(t,r);function t(e,o,n,i,s,a){var f=r.call(this,e)||this;return f.onFinalize=s,f.shouldUnsubscribe=a,f._next=o?function(c){try{o(c)}catch(p){e.error(p)}}:r.prototype._next,f._error=i?function(c){try{i(c)}catch(p){e.error(p)}finally{this.unsubscribe()}}:r.prototype._error,f._complete=n?function(){try{n()}catch(c){e.error(c)}finally{this.unsubscribe()}}:r.prototype._complete,f}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var o=this.closed;r.prototype.unsubscribe.call(this),!o&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t}($);var Tr=j(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}});var nr=function(r){v(t,r);function t(){var e=r.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var o=new Mr(this,this);return o.operator=e,o},t.prototype._throwIfClosed=function(){if(this.closed)throw new Tr},t.prototype.next=function(e){var o=this;C(function(){var n,i;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var s=E(o.currentObservers),a=s.next();!a.done;a=s.next()){var f=a.value;f.next(e)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var o=this;C(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=e;for(var n=o.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;C(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var o=e.observers;o.length;)o.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var o=this,n=this,i=n.hasError,s=n.isStopped,a=n.observers;return i||s?Z:(this.currentObservers=null,a.push(e),new g(function(){o.currentObservers=null,I(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var o=this,n=o.hasError,i=o.thrownError,s=o.isStopped;n?e.error(i):s&&e.complete()},t.prototype.asObservable=function(){var e=new b;return e.source=this,e},t.create=function(e,o){return new Mr(e,o)},t}(b);var Mr=function(r){v(t,r);function t(e,o){var n=r.call(this)||this;return n.destination=e,n.source=o,n}return t.prototype.next=function(e){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,e)},t.prototype.error=function(e){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,e)},t.prototype.complete=function(){var e,o;(o=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||o===void 0||o.call(e)},t.prototype._subscribe=function(e){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(e))!==null&&n!==void 0?n:Z},t}(nr);var V={now:function(){return(V.delegate||Date).now()},delegate:void 0};var F=function(r){v(t,r);function t(e,o,n){e===void 0&&(e=1/0),o===void 0&&(o=1/0),n===void 0&&(n=V);var i=r.call(this)||this;return i._bufferSize=e,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,o),i}return t.prototype.next=function(e){var o=this,n=o.isStopped,i=o._buffer,s=o._infiniteTimeWindow,a=o._timestampProvider,f=o._windowTime;n||(i.push(e),!s&&i.push(a.now()+f)),this._trimBuffer(),r.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(e),n=this,i=n._infiniteTimeWindow,s=n._buffer,a=s.slice(),f=0;f<a.length&&!e.closed;f+=i?1:2)e.next(a[f]);return this._checkFinalizedStatuses(e),o},t.prototype._trimBuffer=function(){var e=this,o=e._bufferSize,n=e._timestampProvider,i=e._buffer,s=e._infiniteTimeWindow,a=(s?1:2)*o;if(o<1/0&&a<i.length&&i.splice(0,i.length-a),!s){for(var f=n.now(),c=0,p=1;p<i.length&&i[p]<=f;p+=2)c=p;c&&i.splice(0,c+1)}},t}(nr);var Pr=function(r){v(t,r);function t(e,o){return r.call(this)||this}return t.prototype.schedule=function(e,o){return o===void 0&&(o=0),this},t}(g);var q={setInterval:function(r,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];var n=q.delegate;return n?.setInterval?n.setInterval.apply(n,_([r,t],y(e))):setInterval.apply(void 0,_([r,t],y(e)))},clearInterval:function(r){var t=q.delegate;return(t?.clearInterval||clearInterval)(r)},delegate:void 0};var Ir=function(r){v(t,r);function t(e,o){var n=r.call(this,e,o)||this;return n.scheduler=e,n.work=o,n.pending=!1,n}return t.prototype.schedule=function(e,o){var n;if(o===void 0&&(o=0),this.closed)return this;this.state=e;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,o)),this.pending=!0,this.delay=o,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(s,this.id,o),this},t.prototype.requestAsyncId=function(e,o,n){return n===void 0&&(n=0),q.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,o,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return o;o!=null&&q.clearInterval(o)},t.prototype.execute=function(e,o){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,o);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,o){var n=!1,i;try{this.work(e)}catch(s){n=!0,i=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var e=this,o=e.id,n=e.scheduler,i=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,I(i,this),o!=null&&(this.id=this.recycleAsyncId(n,o,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},t}(Pr);var ir=function(){function r(t,e){e===void 0&&(e=r.now),this.schedulerActionCtor=t,this.now=e}return r.prototype.schedule=function(t,e,o){return e===void 0&&(e=0),new this.schedulerActionCtor(this,t).schedule(o,e)},r.now=V.now,r}();var Ar=function(r){v(t,r);function t(e,o){o===void 0&&(o=ir.now);var n=r.call(this,e,o)||this;return n.actions=[],n._active=!1,n}return t.prototype.flush=function(e){var o=this.actions;if(this._active){o.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=o.shift());if(this._active=!1,n){for(;e=o.shift();)e.unsubscribe();throw n}},t}(ir);var sr=new Ar(Ir),jr=sr;var kr=new b(function(r){return r.complete()});function Cr(r){return r&&u(r.schedule)}var J=function(r){return r&&typeof r.length=="number"&&typeof r!="function"};function Rr(r){return u(r?.then)}function Wr(r){return u(r[W])}function Fr(r){return Symbol.asyncIterator&&u(r?.[Symbol.asyncIterator])}function Ur(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ce(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Lr=ce();function Dr(r){return u(r?.[Lr])}function $r(r){return vr(this,arguments,function(){var e,o,n,i;return B(this,function(s){switch(s.label){case 0:e=r.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,P(e.read())];case 3:return o=s.sent(),n=o.value,i=o.done,i?[4,P(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,P(n)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Vr(r){return u(r?.getReader)}function U(r){if(r instanceof b)return r;if(r!=null){if(Wr(r))return fe(r);if(J(r))return ue(r);if(Rr(r))return pe(r);if(Fr(r))return qr(r);if(Dr(r))return le(r);if(Vr(r))return me(r)}throw Ur(r)}function fe(r){return new b(function(t){var e=r[W]();if(u(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ue(r){return new b(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}function pe(r){return new b(function(t){r.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,G)})}function le(r){return new b(function(t){var e,o;try{for(var n=E(r),i=n.next();!i.done;i=n.next()){var s=i.value;if(t.next(s),t.closed)return}}catch(a){e={error:a}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}t.complete()})}function qr(r){return new b(function(t){he(r,t).catch(function(e){return t.error(e)})})}function me(r){return qr($r(r))}function he(r,t){var e,o,n,i;return dr(this,void 0,void 0,function(){var s,a;return B(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),e=br(r),f.label=1;case 1:return[4,e.next()];case 2:if(o=f.sent(),!!o.done)return[3,4];if(s=o.value,t.next(s),t.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=f.sent(),n={error:a},[3,11];case 6:return f.trys.push([6,,9,10]),o&&!o.done&&(i=e.return)?[4,i.call(e)]:[3,8];case 7:f.sent(),f.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Hr(r,t,e,o,n){o===void 0&&(o=0),n===void 0&&(n=!1);var i=t.schedule(function(){e(),n?r.add(this.schedule(null,o)):this.unsubscribe()},o);if(r.add(i),!n)return i}var Yr=j(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}});function ar(r,t){var e=typeof t=="object";return new Promise(function(o,n){var i=new R({next:function(s){o(s),i.unsubscribe()},error:n,complete:function(){e?o(t.defaultValue):n(new Yr)}});r.subscribe(i)})}function Br(r){return r instanceof Date&&!isNaN(r)}function T(r,t){return M(function(e,o){var n=0;e.subscribe(O(o,function(i){o.next(r.call(t,i,n++))}))})}var de=Array.isArray;function ve(r,t){return de(t)?r.apply(void 0,_([],y(t))):r(t)}function Nr(r){return T(function(t){return ve(r,t)})}function zr(r,t,e,o,n,i,s,a){var f=[],c=0,p=0,m=!1,l=function(){m&&!f.length&&!c&&t.complete()},h=function(d){return c<o?x(d):f.push(d)},x=function(d){i&&t.next(d),c++;var hr=!1;U(e(d,p++)).subscribe(O(t,function(D){n?.(D),i?h(D):t.next(D)},function(){hr=!0},void 0,function(){if(hr)try{c--;for(var D=function(){var Y=f.shift();s?Hr(t,s,function(){return x(Y)}):x(Y)};f.length&&c<o;)D();l()}catch(Y){t.error(Y)}}))};return r.subscribe(O(t,h,function(){m=!0,l()})),function(){a?.()}}function cr(r,t,e){return e===void 0&&(e=1/0),u(t)?cr(function(o,n){return T(function(i,s){return t(o,i,n,s)})(U(r(o,n)))},e):(typeof t=="number"&&(e=t),M(function(o,n){return zr(o,n,r,e)}))}var be=["addListener","removeListener"],ye=["addEventListener","removeEventListener"],xe=["on","off"];function H(r,t,e,o){if(u(e)&&(o=e,e=void 0),o)return H(r,t,e).pipe(Nr(o));var n=y(we(r)?ye.map(function(a){return function(f){return r[a](t,f,e)}}):_e(r)?be.map(Gr(r,t)):ge(r)?xe.map(Gr(r,t)):[],2),i=n[0],s=n[1];if(!i&&J(r))return cr(function(a){return H(a,t,e)})(U(r));if(!i)throw new TypeError("Invalid event target");return new b(function(a){var f=function(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return a.next(1<c.length?c:c[0])};return i(f),function(){return s(f)}})}function Gr(r,t){return function(e){return function(o){return r[e](t,o)}}}function _e(r){return u(r.addListener)&&u(r.removeListener)}function ge(r){return u(r.on)&&u(r.off)}function we(r){return u(r.addEventListener)&&u(r.removeEventListener)}function Kr(r,t,e){r===void 0&&(r=0),e===void 0&&(e=jr);var o=-1;return t!=null&&(Cr(t)?e=t:o=t),new b(function(n){var i=Br(r)?+r-e.now():r;i<0&&(i=0);var s=0;return e.schedule(function(){n.closed||(n.next(s++),0<=o?this.schedule(void 0,o):n.complete())},i)})}function fr(r,t){return r===void 0&&(r=0),t===void 0&&(t=sr),r<0&&(r=0),Kr(r,r,t)}function S(r,t){return M(function(e,o){var n=0;e.subscribe(O(o,function(i){return r.call(t,i,n++)&&o.next(i)}))})}function L(r){return r<=0?function(){return kr}:M(function(t,e){var o=0;t.subscribe(O(e,function(n){++o<=r&&(e.next(n),r<=o&&e.complete())}))})}var Jr=(r,t)=>e=>({postMessage:o=>{let{errorCatcher:n=()=>()=>{},...i}=t??{};r.clients.get(e).then(s=>s?.postMessage(o,i)).catch(n(e,o))}});var Qr=(r=>(r.Ack="ack",r.Syn="syn",r))(Qr||{}),Se=Object.values(Qr),ur=r=>r.data,pr=r=>t=>t.type===r.toString(),Ee=r=>{let t=r.data;return typeof t=="object"&&t!==null&&"type"in t&&typeof t.type=="string"&&"instance"in t&&typeof t.instance=="string"&&"content"in t},Oe=()=>{let r="#";for(let t=0;t<3;t++)r+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return r},Te=class{__generateId;__instance;__colors;__listener;__log;__receiver;__subscription;__okToWrite;__write$;__recv$;__connect(r,t){let e=fr(t).subscribe(()=>this.__receiver.postMessage({content:r,instance:r,type:"syn".toString()}));this.__subscription.add(e),this.__subscription.add(this.__recv$.pipe(T(ur),S(pr("ack")),S(({content:o})=>o===r),L(1)).subscribe(({instance:o})=>{this.__okToWrite.next(0),this.__subscription.add(this.__recv$.pipe(S(({data:{type:n,instance:i}})=>!Se.includes(n)&&i===o)).subscribe(n=>{this.__listener(n);let{data:i}=n;i._id!==void 0&&this.__receiver.postMessage({...i,content:i,instance:r,type:"ack"})})),e.unsubscribe()})),this.__subscription.add(this.__recv$.pipe(T(ur),S(pr("syn")),S(({instance:o})=>o!==r),L(1)).subscribe(({content:o})=>{this.__receiver.postMessage({content:o,instance:r,type:"ack"})}))}__write(r,t){let e={};t!==void 0&&(e._id=t),this.__subscription.add(this.__write$.subscribe(()=>{let o=Object.assign(r,{instance:this.__instance,...e});this.__receiver.postMessage(o),this.__log?.(o)}))}constructor(r,t,e,o){this.__generateId=()=>globalThis.crypto.randomUUID();let n=this.__generateId(),i=new F,s=H(t,"message").pipe(S(Ee)).subscribe(i);this.__subscription=new g,this.__subscription.add(s),this.__okToWrite=new F(1),this.__write$=this.__okToWrite.pipe(L(1)),this.__recv$=i.asObservable(),this.__listener=r,this.__log=o?.log&&o.log.bind(this),this.__instance=n;let a=Oe();this.__colors={bg:`${a}22`,fg:a},this.__receiver=e,this.__connect(n,o?.period?o.period:10)}disconnect(){this.__subscription.unsubscribe()}send(r){this.__write(r)}ackSend(r){let t,e=new Promise(n=>{t=n}),o=this.__generateId();return this.__subscription.add(this.__recv$.pipe(T(ur),S(pr("ack")),S(({_id:n})=>n===o),L(1)).subscribe(()=>t())),this.__write(r,o),e}get instance(){return this.__instance}get colors(){return this.__colors}get ready(){return ar(this.__write$).then(()=>{})}},Xr=Te;var Q=new Map,lr=new Map,mr=new Map,Zr=(r,t)=>{let e=t.keys(),o,{done:n=!1,value:i}=e.next();for(;!n&&o===void 0;){i!==void 0&&r.startsWith(i)&&(o=i,n=!0);let{value:s,done:a=!1}=e.next();n=a,i=s}return o},Me=r=>r!==null&&"id"in r,Pe=r=>t=>console.error(`[SW]: error on ${r} - ${String(t)}`),Ie=Jr(self,{errorCatcher:Pe}),Ae=r=>function({data:e}){let o=e;switch(o.type){case"set-source-map":{let{content:n}=o,i=Object.entries(n).reduce((s,[a,f])=>{let{clientSourceMap:c,clientTosMap:p}=s,{headers:m={}}=f;return Object.keys(m).length>0&&p.set(encodeURI(f.to),m),c.set(encodeURI(a),f),s},{clientSourceMap:new Map,clientTosMap:new Map});lr.set(r,i.clientSourceMap),mr.set(r,i.clientTosMap);break}case"unload-client":{lr.delete(r),mr.delete(r),Q.delete(r),this.disconnect();break}default:break}},je=r=>{let t=new Map,e=new F,o={addEventListener(n,i){t.set(i,e.subscribe(s=>i(s)))},removeEventListener(n,i){t.get(i)?.unsubscribe(),t.delete(i)}};return{buffer:e,channel:new Xr(Ae(r),o,Ie(r))}},ke=r=>{let t=Q.get(r);return t||(t=je(r),Q.set(r,t)),t};self.addEventListener("install",()=>{self.skipWaiting().catch(r=>console.error(`[SW] error while skipWaiting - ${String(r)}`))});self.addEventListener("activate",r=>{r.waitUntil(self.clients.claim())});self.addEventListener("message",r=>{let{source:t}=r;if(!Me(t))return;let{id:e}=t;ke(e).buffer.next(r)});self.addEventListener("fetch",r=>{let t=r.clientId!==""?r.clientId:r.resultingClientId,e=lr.get(t);if(!e)return r.respondWith(self.fetch(r.request));let o=mr.get(t),{request:{url:n}}=r,i=Zr(n,e),s=Zr(n,o),a=new Headers(r.request.headers),f={};if(i!==void 0){let m=e.get(i)?.to,l=e.get(i)?.headers??{},h=n.substring(i.length);f=e.get(i)?.query??{},n=`${m}${h}`,Object.entries(l).forEach(([x,d])=>a.set(x,d))}if(s!==void 0){let m=o.get(s)??{};Object.entries(m).forEach(([l,h])=>a.set(l,h))}let c;try{let m=new URL(n);Object.entries(f).forEach(([l,h])=>m.searchParams.set(l,h)),c=m.href}catch{c=n}let p=Q.get(t)?.channel;r.respondWith(self.fetch(c,{...r.request,headers:a}).catch(m=>(console.error(m),Promise.reject(m))))});})();
|