diff --git a/dotCMS/src/main/webapp/html/dotcms-block-editor.js b/dotCMS/src/main/webapp/html/dotcms-block-editor.js
index f3a7dd03d2c3..69f8926f5098 100644
--- a/dotCMS/src/main/webapp/html/dotcms-block-editor.js
+++ b/dotCMS/src/main/webapp/html/dotcms-block-editor.js
@@ -1 +1 @@
-var runtime=function(c){"use strict";var l,M=Object.prototype,p=M.hasOwnProperty,w=Object.defineProperty||function(r,t,e){r[t]=e.value},O="function"==typeof Symbol?Symbol:{},L=O.iterator||"@@iterator",z=O.asyncIterator||"@@asyncIterator",_=O.toStringTag||"@@toStringTag";function v(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{v({},"")}catch{v=function(t,e,o){return t[e]=o}}function R(r,t,e,o){var i=Object.create((t&&t.prototype instanceof j?t:j).prototype),a=new I(o||[]);return w(i,"_invoke",{value:H(r,e,a)}),i}function k(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}c.wrap=R;var Y="suspendedStart",q="executing",b="completed",s={};function j(){}function S(){}function d(){}var N={};v(N,L,function(){return this});var T=Object.getPrototypeOf,E=T&&T(T(A([])));E&&E!==M&&p.call(E,L)&&(N=E);var g=d.prototype=j.prototype=Object.create(N);function D(r){["next","throw","return"].forEach(function(t){v(r,t,function(e){return this._invoke(t,e)})})}function G(r,t){function e(i,a,u,h){var f=k(r[i],r,a);if("throw"!==f.type){var C=f.arg,m=C.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,h)},function(y){e("throw",y,u,h)}):t.resolve(m).then(function(y){C.value=y,u(C)},function(y){return e("throw",y,u,h)})}h(f.arg)}var o;w(this,"_invoke",{value:function n(i,a){function u(){return new t(function(h,f){e(i,a,h,f)})}return o=o?o.then(u,u):u()}})}function H(r,t,e){var o=Y;return function(i,a){if(o===q)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return $()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var h=W(u,e);if(h){if(h===s)continue;return h}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===Y)throw o=b,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=q;var f=k(r,t,e);if("normal"===f.type){if(o=e.done?b:"suspendedYield",f.arg===s)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=b,e.method="throw",e.arg=f.arg)}}}function W(r,t){var e=t.method,o=r.iterator[e];if(o===l)return t.delegate=null,"throw"===e&&r.iterator.return&&(t.method="return",t.arg=l,W(r,t),"throw"===t.method)||"return"!==e&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),s;var n=k(o,r.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var i=n.arg;return i?i.done?(t[r.resultName]=i.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=l),t.delegate=null,s):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function J(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function P(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function A(r){if(r){var t=r[L];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),P(e),s}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;P(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:A(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=l),s}},c}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch{"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,_={},v={};function r(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return _[e](t,t.exports,r),t.loaded=!0,t.exports}r.m=_,e=[],r.O=(n,t,o,f)=>{if(!t){var a=1/0;for(i=0;i=f)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(l=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[t,o,f]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,o){if(1&o&&(t=this(t)),8&o||"object"==typeof t&&t&&(4&o&&t.__esModule||16&o&&"function"==typeof t.then))return t;var f=Object.create(null);r.r(f);var i={};n=n||[null,e({}),e([]),e(e)];for(var a=2&o&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(l=>i[l]=()=>t[l]);return i.default=()=>t,r.d(f,i),f}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(8592===e?"common":e)+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="dotcms-block-editor:";r.l=(t,o,f,i)=>{if(e[t])e[t].push(o);else{var a,l;if(void 0!==f)for(var d=document.getElementsByTagName("script"),s=0;s{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(m=>m(b)),g)return g(b)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={3666:0};r.f.j=(o,f)=>{var i=r.o(e,o)?e[o]:void 0;if(0!==i)if(i)f.push(i[2]);else if(3666!=o){var a=new Promise((c,u)=>i=e[o]=[c,u]);f.push(i[2]=a);var l=r.p+r.u(o),d=new Error;r.l(l,c=>{if(r.o(e,o)&&(0!==(i=e[o])&&(e[o]=void 0),i)){var u=c&&("load"===c.type?"missing":c.type),p=c&&c.target&&c.target.src;d.message="Loading chunk "+o+" failed.\n("+u+": "+p+")",d.name="ChunkLoadError",d.type=u,d.request=p,i[1](d)}},"chunk-"+o,o)}else e[o]=0},r.O.j=o=>0===e[o];var n=(o,f)=>{var d,s,[i,a,l]=f,c=0;if(i.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(l)var u=l(r)}for(o&&o(f);c{"use strict";ge(88583),ge(30757)},30757:()=>{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i1)&&tt(this)}}}),x(o,pe,{value:function(p){-1>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):(we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},ae=we),G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch{ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{C=function(r){return{is:r.toLowerCase()}}}}(window)},88583:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;iI.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;kF,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}(typeof window<"u"&&window||typeof self<"u"&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae=typeof window<"u",ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&typeof t.set>"u")}const A=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&typeof J.process<"u"&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=typeof J.process<"u"&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;return ht&&u===ke&&"error"===t.type?(f=c&&c.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===f&&t.preventDefault()):(f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault()),f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;cfunction(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch{}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch{}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function h(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if(typeof window<"u")try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",w="prependListener",b="."+w+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;Bfunction(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function Me(t,a){a.patchEventPrototype(t,a)})(t,u),function $e(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function Ct(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u=typeof WebSocket<"u",c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function be(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),typeof E.SVGElement<"u"&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),typeof IDBIndex<"u"&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function Pt(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function C(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;Ifunction(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function S(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function ut(t,a){const u=t.constructor.name;for(let c=0;c{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})}},X=>{X(X.s=39061)}]);(self.webpackChunkdotcms_block_editor=self.webpackChunkdotcms_block_editor||[]).push([[179],{73825:(K,O,A)=>{"use strict";function k(n){return"function"==typeof n}let V=!1;const B={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else V&&console.log("RxJS: Back to a better error behavior. Thank you. <3");V=n},get useDeprecatedSynchronousErrorHandling(){return V}};function Y(n){setTimeout(()=>{throw n},0)}const $={closed:!0,next(n){},error(n){if(B.useDeprecatedSynchronousErrorHandling)throw n;Y(n)},complete(){}},R=Array.isArray||(n=>n&&"number"==typeof n.length);function P(n){return null!==n&&"object"==typeof n}const te=(()=>{function n(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return n.prototype=Object.create(Error.prototype),n})();class ae{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ae)e.remove(this);else if(null!==e)for(let s=0;st.concat(e instanceof te?e.errors:e),[])}ae.EMPTY=((n=new ae).closed=!0,n);const ye="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ne extends ae{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=$;break;case 1:if(!t){this.destination=$;break}if("object"==typeof t){t instanceof ne?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new X(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new X(this,t,e,i)}}[ye](){return this}static create(t,e,i){const r=new ne(t,e,i);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class X extends ne{constructor(t,e,i,r){super(),this._parentSubscriber=t;let o,s=this;k(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==$&&(s=Object.create(e),k(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;B.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=B;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):Y(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;Y(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);B.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),B.useDeprecatedSynchronousErrorHandling)throw i;Y(i)}}__tryOrSetError(t,e,i){if(!B.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return B.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(Y(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const j="function"==typeof Symbol&&Symbol.observable||"@@observable";function z(n){return n}function pe(...n){return Re(n)}function Re(n){return 0===n.length?z:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}let Se=(()=>{class n{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function W(n,t,e){if(n){if(n instanceof ne)return n;if(n[ye])return n[ye]()}return n||t||e?new ne(n,t,e):new ne($)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||B.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),B.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){B.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function U(n){for(;n;){const{closed:t,destination:e,isStopped:i}=n;if(t||i)return!1;n=e&&e instanceof ne?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Ee(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[j](){return this}pipe(...e){return 0===e.length?this:Re(e)(this)}toPromise(e){return new(e=Ee(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function Ee(n){if(n||(n=B.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const ve=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class Ze extends ae{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class wt extends ne{constructor(t){super(t),this.destination=t}}let le=(()=>{class n extends Se{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[ye](){return new wt(this)}lift(e){const i=new Li(this,this);return i.operator=e,i}next(e){if(this.closed)throw new ve;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew Li(t,e),n})();class Li extends le{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):ae.EMPTY}}function Mi(n){return n&&"function"==typeof n.schedule}function fe(n,t){return function(i){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new jr(n,t))}}class jr{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new ir(t,this.project,this.thisArg))}}class ir extends ne{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const $i=n=>t=>{for(let e=0,i=n.length;en&&"number"==typeof n.length&&"function"!=typeof n;function Ao(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const Be=n=>{if(n&&"function"==typeof n[j])return(n=>t=>{const e=n[j]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)})(n);if(ma(n))return $i(n);if(Ao(n))return(n=>t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Y),t))(n);if(n&&"function"==typeof n[Oo])return(n=>t=>{const e=n[Oo]();for(;;){let i;try{i=e.next()}catch(r){return t.error(r),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof e.return&&t.add(()=>{e.return&&e.return()}),t})(n);{const e=`You provided ${P(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Bt(n,t){return new Se(e=>{const i=new ae;let r=0;return i.add(t.schedule(function(){r!==n.length?(e.next(n[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function zr(n,t){if(null!=n){if(function fi(n){return n&&"function"==typeof n[j]}(n))return function jt(n,t){return new Se(e=>{const i=new ae;return i.add(t.schedule(()=>{const r=n[j]();i.add(r.subscribe({next(o){i.add(t.schedule(()=>e.next(o)))},error(o){i.add(t.schedule(()=>e.error(o)))},complete(){i.add(t.schedule(()=>e.complete()))}}))})),i})}(n,t);if(Ao(n))return function gt(n,t){return new Se(e=>{const i=new ae;return i.add(t.schedule(()=>n.then(r=>{i.add(t.schedule(()=>{e.next(r),i.add(t.schedule(()=>e.complete()))}))},r=>{i.add(t.schedule(()=>e.error(r)))}))),i})}(n,t);if(ma(n))return Bt(n,t);if(function Wi(n){return n&&"function"==typeof n[Oo]}(n)||"string"==typeof n)return function On(n,t){if(!n)throw new Error("Iterable cannot be null");return new Se(e=>{const i=new ae;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(()=>{r=n[Oo](),i.add(t.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(n,t)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}function Ct(n,t){return t?zr(n,t):n instanceof Se?n:new Se(Be(n))}class Wn extends ne{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class es extends ne{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function dc(n,t){if(t.closed)return;if(n instanceof Se)return n.subscribe(t);let e;try{e=Be(n)(t)}catch(i){t.error(i)}return e}function ri(n,t,e=Number.POSITIVE_INFINITY){return"function"==typeof t?i=>i.pipe(ri((r,o)=>Ct(n(r,o)).pipe(fe((s,a)=>t(r,s,o,a))),e)):("number"==typeof t&&(e=t),i=>i.lift(new _w(n,e)))}class _w{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new vw(t,this.project,this.concurrent))}}class vw extends es{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}const Cf=ri;function nl(n=Number.POSITIVE_INFINITY){return ri(z,n)}function il(n,t){return t?Bt(n,t):new Se($i(n))}function Cs(...n){let t=Number.POSITIVE_INFINITY,e=null,i=n[n.length-1];return Mi(i)?(e=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(t=n.pop())):"number"==typeof i&&(t=n.pop()),null===e&&1===n.length&&n[0]instanceof Se?n[0]:nl(t)(il(n,e))}function hc(){return function(t){return t.lift(new ko(t))}}class ko{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const r=new uy(t,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class uy extends ne{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=t._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class Gu extends Se{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new ae,t.add(this.source.subscribe(new dy(this.getSubject(),this))),t.closed&&(this._connection=null,t=ae.EMPTY)),t}refCount(){return hc()(this)}}const bw=(()=>{const n=Gu.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class dy extends wt{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}class ww{constructor(t,e){this.subjectFactory=t,this.selector=e}call(t,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(t);return o.add(e.subscribe(r)),o}}function ya(){return new le}function Dn(n){for(let t in n)if(n[t]===Dn)return t;throw Error("Could not find renamed property on target object.")}function Tf(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function bn(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(bn).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function _a(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const Mf=Dn({__forward_ref__:Dn});function Ut(n){return n.__forward_ref__=Ut,n.toString=function(){return bn(this())},n}function Je(n){return va(n)?n():n}function va(n){return"function"==typeof n&&n.hasOwnProperty(Mf)&&n.__forward_ref__===Ut}function Sf(n){return n&&!!n.\u0275providers}const Yu="https://g.co/ng/security#xss";class Z extends Error{constructor(t,e){super(function qu(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}}function at(n){return"string"==typeof n?n:null==n?"":String(n)}function Ku(n,t){throw new Z(-201,!1)}function Vr(n,t){null==n&&function Qt(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function H(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function lt(n){return{providers:n.providers||[],imports:n.imports||[]}}function Qu(n){return my(n,fc)||my(n,gy)}function my(n,t){return n.hasOwnProperty(t)?n[t]:null}function ol(n){return n&&(n.hasOwnProperty(Ju)||n.hasOwnProperty(Ew))?n[Ju]:null}const fc=Dn({\u0275prov:Dn}),Ju=Dn({\u0275inj:Dn}),gy=Dn({ngInjectableDef:Dn}),Ew=Dn({ngInjectorDef:Dn});var et=(()=>((et=et||{})[et.Default=0]="Default",et[et.Host=1]="Host",et[et.Self=2]="Self",et[et.SkipSelf=4]="SkipSelf",et[et.Optional=8]="Optional",et))();let Ef;function Br(n){const t=Ef;return Ef=n,t}function _y(n,t,e){const i=Qu(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&et.Optional?null:void 0!==t?t:void Ku(bn(n))}const pn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Ur={},xf="__NG_DI_FLAG__",Xu="ngTempTokenPath",Ow=/\n/gm,Ts="__source";let sl;function al(n){const t=sl;return sl=n,t}function ed(n,t=et.Default){if(void 0===sl)throw new Z(-203,!1);return null===sl?_y(n,void 0,t):sl.get(n,t&et.Optional?null:void 0,t)}function F(n,t=et.Default){return(function yy(){return Ef}()||ed)(Je(n),t)}function tt(n,t=et.Default){return F(n,mc(t))}function mc(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function nd(n){const t=[];for(let e=0;e((co=co||{})[co.OnPush=0]="OnPush",co[co.Default=1]="Default",co))(),ie=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(ie||(ie={})),ie))();const Te={},Ke=[],ut=Dn({\u0275cmp:Dn}),Pn=Dn({\u0275dir:Dn}),oi=Dn({\u0275pipe:Dn}),wi=Dn({\u0275mod:Dn}),on=Dn({\u0275fac:Dn}),Si=Dn({__NG_ELEMENT_ID__:Dn});let uo=0;function Me(n){return Ms(()=>{const e=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===co.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Ke,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||ie.Emulated,id:"c"+uo++,styles:n.styles||Ke,_:null,setInput:null,schemas:n.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=n.dependencies,s=n.features;return r.inputs=If(n.inputs,i),r.outputs=If(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(br).filter(ns):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(wr).filter(ns):null,r})}function Ei(n,t,e){const i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof t?t():t).map(br),i.pipeDefs=()=>("function"==typeof e?e():e).map(wr)}function br(n){return wn(n)||rr(n)}function ns(n){return null!==n}function Xe(n){return Ms(()=>({type:n.type,bootstrap:n.bootstrap||Ke,declarations:n.declarations||Ke,imports:n.imports||Ke,exports:n.exports||Ke,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function If(n,t){if(null==n)return Te;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}const we=Me;function Zn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function wn(n){return n[ut]||null}function rr(n){return n[Pn]||null}function wr(n){return n[oi]||null}function ho(n,t){const e=n[wi]||null;if(!e&&!0===t)throw new Error(`Type ${bn(n)} does not have '\u0275mod' property.`);return e}function fo(n){return Array.isArray(n)&&"object"==typeof n[1]}function rs(n){return Array.isArray(n)&&!0===n[1]}function Lw(n){return 0!=(4&n.flags)}function Nf(n){return n.componentOffset>-1}function Ty(n){return 1==(1&n.flags)}function ss(n){return null!==n.template}function aB(n){return 0!=(256&n[2])}function _c(n,t){return n.hasOwnProperty(on)?n[on]:null}class fx{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Gi(){return px}function px(n){return n.type.prototype.ngOnChanges&&(n.setInput=dB),uB}function uB(){const n=gx(this),t=n?.current;if(t){const e=n.previous;if(e===Te)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function dB(n,t,e,i){const r=this.declaredInputs[e],o=gx(n)||function hB(n,t){return n[mx]=t}(n,{previous:Te,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new fx(l&&l.currentValue,t,a===Te),n[i]=t}Gi.ngInherit=!0;const mx="__ngSimpleChanges__";function gx(n){return n[mx]||null}function Yi(n){for(;Array.isArray(n);)n=n[0];return n}function My(n,t){return Yi(t[n])}function po(n,t){return Yi(t[n.index])}function vx(n,t){return n.data[t]}function ld(n,t){return n[t]}function mo(n,t){const e=t[n];return fo(e)?e:e[0]}function Sy(n){return 64==(64&n[2])}function cl(n,t){return null==t?null:n[t]}function bx(n){n[18]=0}function Fw(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}const yt={lFrame:Ox(null),bindingsEnabled:!0};function Cx(){return yt.bindingsEnabled}function se(){return yt.lFrame.lView}function tn(){return yt.lFrame.tView}function de(n){return yt.lFrame.contextLView=n,n[8]}function he(n){return yt.lFrame.contextLView=null,n}function qi(){let n=Dx();for(;null!==n&&64===n.type;)n=n.parent;return n}function Dx(){return yt.lFrame.currentTNode}function Es(n,t){const e=yt.lFrame;e.currentTNode=n,e.isParent=t}function jw(){return yt.lFrame.isParent}function zw(){yt.lFrame.isParent=!1}function Dr(){const n=yt.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function cd(){return yt.lFrame.bindingIndex++}function Ma(n){const t=yt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function MB(n,t){const e=yt.lFrame;e.bindingIndex=e.bindingRootIndex=n,Vw(t)}function Vw(n){yt.lFrame.currentDirectiveIndex=n}function Ex(){return yt.lFrame.currentQueryIndex}function Uw(n){yt.lFrame.currentQueryIndex=n}function EB(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function xx(n,t,e){if(e&et.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&et.Host||(r=EB(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;t=r,n=o}const i=yt.lFrame=Ix();return i.currentTNode=t,i.lView=n,!0}function Hw(n){const t=Ix(),e=n[1];yt.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Ix(){const n=yt.lFrame,t=null===n?null:n.child;return null===t?Ox(n):t}function Ox(n){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function Ax(){const n=yt.lFrame;return yt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const kx=Ax;function $w(){const n=Ax();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Tr(){return yt.lFrame.selectedIndex}function vc(n){yt.lFrame.selectedIndex=n}function Jn(){const n=yt.lFrame;return vx(n.tView,n.selectedIndex)}function Ww(){yt.lFrame.currentNamespace="svg"}function Gw(){!function AB(){yt.lFrame.currentNamespace=null}()}function Ey(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===t){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class Lf{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Kw(n,t,e){let i=0;for(;it){s=o-1;break}}}for(;o>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}let Qw=!0;function ky(n){const t=Qw;return Qw=n,t}let zB=0;const xs={};function Ny(n,t){const e=Vx(n,t);if(-1!==e)return e;const i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,Zw(i.data,n),Zw(t,null),Zw(i.blueprint,null));const r=Jw(n,t),o=n.injectorIndex;if(Fx(r)){const s=Oy(r),a=Ay(r,t),l=a[1].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function Zw(n,t){n.push(0,0,0,0,0,0,0,0,t)}function Vx(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Jw(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=Yx(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Xw(n,t,e){!function VB(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Si)&&(i=e[Si]),null==i&&(i=e[Si]=zB++);const r=255&i;t.data[n+(r>>5)]|=1<=0?255&t:$B:t}(e);if("function"==typeof o){if(!xx(t,n,i))return i&et.Host?Bx(r,0,i):Ux(t,e,i,r);try{const s=o(i);if(null!=s||i&et.Optional)return s;Ku()}finally{kx()}}else if("number"==typeof o){let s=null,a=Vx(n,t),l=-1,c=i&et.Host?t[16][6]:null;for((-1===a||i&et.SkipSelf)&&(l=-1===a?Jw(n,t):t[a+8],-1!==l&&Gx(i,!1)?(s=t[1],a=Oy(l),t=Ay(l,t)):a=-1);-1!==a;){const u=t[1];if(Wx(o,a,u.data)){const d=UB(a,t,e,s,i,c);if(d!==xs)return d}l=t[a+8],-1!==l&&Gx(i,t[1].data[a+8]===c)&&Wx(o,a,t)?(s=u,a=Oy(l),t=Ay(l,t)):a=-1}}return r}function UB(n,t,e,i,r,o){const s=t[1],a=s.data[n+8],u=Py(a,s,e,null==i?Nf(a)&&Qw:i!=s&&0!=(3&a.type),r&et.Host&&o===a);return null!==u?bc(t,s,u,a):xs}function Py(n,t,e,i,r){const o=n.providerIndexes,s=t.data,a=1048575&o,l=n.directiveStart,u=o>>20,h=r?a+u:n.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&ss(f)&&f.type===e)return l}return null}function bc(n,t,e,i){let r=n[e];const o=t.data;if(function LB(n){return n instanceof Lf}(r)){const s=r;s.resolving&&function ba(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new Z(-200,`Circular dependency in DI detected for ${n}${e}`)}(function en(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():at(n)}(o[e]));const a=ky(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Br(s.injectImpl):null;xx(n,i,et.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function NB(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=px(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==l&&Br(l),ky(a),s.resolving=!1,kx()}}return r}function Wx(n,t,e){return!!(e[t+(n>>5)]&1<{const t=n.prototype.constructor,e=t[on]||eC(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[on]||eC(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function eC(n){return va(n)?()=>{const t=eC(Je(n));return t&&t()}:_c(n)}function Yx(n){const t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}const fd="__parameters__";function md(n,t,e){return Ms(()=>{const i=function tC(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(fd)?l[fd]:Object.defineProperty(l,fd,{value:[]})[fd];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class Ce{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=H({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function wc(n,t){n.forEach(e=>Array.isArray(e)?wc(e,t):t(e))}function Kx(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function Ry(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function zf(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function KB(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function iC(n,t){const e=gd(n,t);if(e>=0)return n[1|e]}function gd(n,t){return function Qx(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=n[o<t?r=o:i=o+1}return~(r<({token:n})),-1),Vf=ll(md("Optional"),8),Bf=ll(md("SkipSelf"),4);var Hr=(()=>((Hr=Hr||{})[Hr.Important=1]="Important",Hr[Hr.DashCase=2]="DashCase",Hr))();const lC=new Map;let yU=0;const uC="__ngContext__";function ar(n,t){fo(t)?(n[uC]=t[20],function vU(n){lC.set(n[20],n)}(t)):n[uC]=t}function hC(n,t){return undefined(n,t)}function Wf(n){const t=n[3];return rs(t)?t[3]:t}function fC(n){return gI(n[13])}function pC(n){return gI(n[4])}function gI(n){for(;null!==n&&!rs(n);)n=n[4];return n}function _d(n,t,e,i,r){if(null!=i){let o,s=!1;rs(i)?o=i:fo(i)&&(s=!0,i=i[0]);const a=Yi(i);0===n&&null!==e?null==r?CI(t,e,a):Cc(t,e,a,r||null,!0):1===n&&null!==e?Cc(t,e,a,r||null,!0):2===n?function wC(n,t,e){const i=By(n,t);i&&function zU(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}(t,a,s):3===n&&t.destroyNode(a),null!=o&&function UU(n,t,e,i,r){const o=e[7];o!==Yi(e)&&_d(t,n,i,o,r);for(let a=10;a0&&(n[e-1][4]=i[4]);const o=Ry(n,10+t);!function AU(n,t){Gf(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(i[1],i);const s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function vI(n,t){if(!(128&t[2])){const e=t[11];e.destroyNode&&Gf(n,t,e,3,null,null),function PU(n){let t=n[13];if(!t)return _C(n[1],n);for(;t;){let e=null;if(fo(t))e=t[13];else{const i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)fo(t)&&_C(t[1],t),t=t[3];null===t&&(t=n),fo(t)&&_C(t[1],t),e=t&&t[4]}t=e}}(t)}}function _C(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=128,function jU(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===ie.None||o===ie.Emulated)return null}return po(i,e)}}(n,t.parent,e)}function Cc(n,t,e,i,r){n.insertBefore(t,e,i,r)}function CI(n,t,e){n.appendChild(t,e)}function DI(n,t,e,i,r){null!==i?Cc(n,t,e,i,r):CI(n,t,e)}function By(n,t){return n.parentNode(t)}function TI(n,t,e){return SI(n,t,e)}let $y,TC,Wy,SI=function MI(n,t,e){return 40&n.type?po(n,e):null};function Uy(n,t,e,i){const r=bI(n,i,t),o=t[11],a=TI(i.parent||t[6],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return $y}()?.createHTML(n)||n}function NI(n){return function MC(){if(void 0===Wy&&(Wy=null,pn.trustedTypes))try{Wy=pn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Wy}()?.createHTML(n)||n}class Tc{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Yu})`}}class KU extends Tc{getTypeName(){return"HTML"}}class QU extends Tc{getTypeName(){return"Style"}}class ZU extends Tc{getTypeName(){return"Script"}}class JU extends Tc{getTypeName(){return"URL"}}class XU extends Tc{getTypeName(){return"ResourceURL"}}function yo(n){return n instanceof Tc?n.changingThisBreaksApplicationSecurity:n}function Is(n,t){const e=function e8(n){return n instanceof Tc&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${Yu})`)}return e===t}class s8{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Dc(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class a8{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Dc(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=Dc(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0"),!0}endElement(t){const e=t.nodeName.toLowerCase();SC.hasOwnProperty(e)&&!FI.hasOwnProperty(e)&&(this.buf.push(""),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(BI(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const h8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f8=/([^\#-~ |!])/g;function BI(n){return n.replace(/&/g,"&").replace(h8,function(t){return""+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(f8,function(t){return""+t.charCodeAt(0)+";"}).replace(//g,">")}let Yy;function UI(n,t){let e=null;try{Yy=Yy||function RI(n){const t=new a8(n);return function l8(){try{return!!(new window.DOMParser).parseFromString(Dc(""),"text/html")}catch{return!1}}()?new s8(t):t}(n);let i=t?String(t):"";e=Yy.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Yy.getInertBodyElement(i)}while(i!==o);return Dc((new d8).sanitizeChildren(xC(e)||e))}finally{if(e){const i=xC(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function xC(n){return"content"in n&&function p8(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Ln=(()=>((Ln=Ln||{})[Ln.NONE=0]="NONE",Ln[Ln.HTML=1]="HTML",Ln[Ln.STYLE=2]="STYLE",Ln[Ln.SCRIPT=3]="SCRIPT",Ln[Ln.URL=4]="URL",Ln[Ln.RESOURCE_URL=5]="RESOURCE_URL",Ln))();function ul(n){const t=qf();return t?NI(t.sanitize(Ln.HTML,n)||""):Is(n,"HTML")?NI(yo(n)):UI(function kI(){return void 0!==TC?TC:typeof document<"u"?document:void 0}(),at(n))}function dl(n){const t=qf();return t?t.sanitize(Ln.URL,n)||"":Is(n,"URL")?yo(n):Gy(at(n))}function qf(){const n=se();return n&&n[12]}const qy=new Ce("ENVIRONMENT_INITIALIZER"),WI=new Ce("INJECTOR",-1),GI=new Ce("INJECTOR_DEF_TYPES");class YI{get(t,e=Ur){if(e===Ur){const i=new Error(`NullInjectorError: No provider for ${bn(t)}!`);throw i.name="NullInjectorError",i}return e}}function w8(...n){return{\u0275providers:qI(0,n),\u0275fromNgModule:!0}}function qI(n,...t){const e=[],i=new Set;let r;return wc(t,o=>{const s=o;IC(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&KI(r,e),e}function KI(n,t){for(let e=0;e{t.push(o)})}}function IC(n,t,e,i){if(!(n=Je(n)))return!1;let r=null,o=ol(n);const s=!o&&wn(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const l=n.ngModule;if(o=ol(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)IC(c,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{wc(o.imports,u=>{IC(u,t,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&KI(c,t)}if(!a){const c=_c(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Ke},{provide:GI,useValue:r,multi:!0},{provide:qy,useValue:()=>F(r),multi:!0})}const l=o.providers;null==l||a||OC(l,u=>{t.push(u)})}}return r!==n&&void 0!==n.providers}function OC(n,t){for(let e of n)Sf(e)&&(e=e.\u0275providers),Array.isArray(e)?OC(e,t):t(e)}const C8=Dn({provide:String,useValue:Dn});function AC(n){return null!==n&&"object"==typeof n&&C8 in n}function Mc(n){return"function"==typeof n}const kC=new Ce("Set Injector scope."),Ky={},T8={};let NC;function Qy(){return void 0===NC&&(NC=new YI),NC}class Os{}class JI extends Os{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,LC(t,s=>this.processProvider(s)),this.records.set(WI,vd(void 0,this)),r.has("environment")&&this.records.set(Os,vd(void 0,this));const o=this.records.get(kC);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(GI.multi,Ke,et.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();const e=al(this),i=Br(void 0);try{return t()}finally{al(e),Br(i)}}get(t,e=Ur,i=et.Default){this.assertNotDestroyed(),i=mc(i);const r=al(this),o=Br(void 0);try{if(!(i&et.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function I8(n){return"function"==typeof n||"object"==typeof n&&n instanceof Ce}(t)&&Qu(t);a=l&&this.injectableDefInScope(l)?vd(PC(t),Ky):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&et.Self?Qy():this.parent).get(t,e=i&et.Optional&&e===Ur?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Xu]=s[Xu]||[]).unshift(bn(t)),r)throw s;return function vy(n,t,e,i){const r=n[Xu];throw t[Ts]&&r.unshift(t[Ts]),n.message=function kw(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=bn(t);if(Array.isArray(t))r=t.map(bn).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):bn(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(Ow,"\n ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[Xu]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{Br(o),al(r)}}resolveInjectorInitializers(){const t=al(this),e=Br(void 0);try{const i=this.get(qy.multi,Ke,et.Self);for(const r of i)r()}finally{al(t),Br(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(bn(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Z(205,!1)}processProvider(t){let e=Mc(t=Je(t))?t:Je(t&&t.provide);const i=function S8(n){return AC(n)?vd(void 0,n.useValue):vd(XI(n),Ky)}(t);if(Mc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=vd(void 0,Ky,!0),r.factory=()=>nd(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===Ky&&(e.value=T8,e.value=e.factory()),"object"==typeof e.value&&e.value&&function x8(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=Je(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function PC(n){const t=Qu(n),e=null!==t?t.factory:_c(n);if(null!==e)return e;if(n instanceof Ce)throw new Z(204,!1);if(n instanceof Function)return function M8(n){const t=n.length;if(t>0)throw zf(t,"?"),new Z(204,!1);const e=function Zu(n){const t=n&&(n[fc]||n[gy]);if(t){const e=function Sw(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new Z(204,!1)}function XI(n,t,e){let i;if(Mc(n)){const r=Je(n);return _c(r)||PC(r)}if(AC(n))i=()=>Je(n.useValue);else if(function ZI(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...nd(n.deps||[]));else if(function QI(n){return!(!n||!n.useExisting)}(n))i=()=>F(Je(n.useExisting));else{const r=Je(n&&(n.useClass||n.provide));if(!function E8(n){return!!n.deps}(n))return _c(r)||PC(r);i=()=>new r(...nd(n.deps))}return i}function vd(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function LC(n,t){for(const e of n)Array.isArray(e)?LC(e,t):e&&Sf(e)?LC(e.\u0275providers,t):t(e)}class O8{}class eO{}class k8{resolveComponentFactory(t){throw function A8(n){const t=Error(`No component factory found for ${bn(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let Sc=(()=>{class n{}return n.NULL=new k8,n})();function N8(){return bd(qi(),se())}function bd(n,t){return new Dt(po(n,t))}let Dt=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=N8,n})();function P8(n){return n instanceof Dt?n.nativeElement:n}class Kf{}let lr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function L8(){const n=se(),e=mo(qi().index,n);return(fo(e)?e:n)[11]}(),n})(),R8=(()=>{class n{}return n.\u0275prov=H({token:n,providedIn:"root",factory:()=>null}),n})();class wd{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const F8=new wd("15.1.1"),RC={};function jC(n){return n.ngOriginalError}class Cd{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&jC(t);for(;e&&jC(e);)e=jC(e);return e||null}}function nO(n){return n.ownerDocument.defaultView}function iO(n){return n.ownerDocument}function Ea(n){return n instanceof Function?n():n}function oO(n,t,e){let i=n.length;for(;;){const r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}const sO="ng-template";function G8(n,t,e){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==oO(f,c,0)||2&i&&c!==h){if(as(i))return!1;s=!0}}}}else{if(!s&&!as(i)&&!as(l))return!1;if(s&&as(l))continue;s=!1,i=l|1&i}}return as(i)||s}function as(n){return 0==(1&n)}function K8(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!as(s)&&(t+=cO(o,r),r=""),i=s,o=o||!as(i);e++}return""!==r&&(t+=cO(o,r)),t}const _t={};function C(n){uO(tn(),se(),Tr()+n,!1)}function uO(n,t,e,i){if(!i)if(3==(3&t[2])){const o=n.preOrderCheckHooks;null!==o&&xy(t,o,e)}else{const o=n.preOrderHooks;null!==o&&Iy(t,o,0,e)}vc(e)}function pO(n,t=null,e=null,i){const r=mO(n,t,e,i);return r.resolveInjectorInitializers(),r}function mO(n,t=null,e=null,i,r=new Set){const o=[e||Ke,w8(n)];return i=i||("object"==typeof n?void 0:bn(n)),new JI(o,t||Qy(),i||null,r)}let Mr=(()=>{class n{static create(e,i){if(Array.isArray(e))return pO({name:""},i,e,"");{const r=e.name??"";return pO({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=Ur,n.NULL=new YI,n.\u0275prov=H({token:n,providedIn:"any",factory:()=>F(WI)}),n.__NG_ELEMENT_ID__=-1,n})();function I(n,t=et.Default){const e=se();return null===e?F(n,t):Hx(qi(),e,Je(n),t)}function DO(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;i22&&uO(n,t,22,!1),e(i,r)}finally{vc(o)}}function WC(n,t,e){if(Lw(t)){const r=t.directiveEnd;for(let o=t.directiveStart;o0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,Qf(n,e,r.hostVars,_t),r)}function As(n,t,e,i,r,o){const s=po(n,t);!function ZC(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{const a=null==s?at(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}(t[11],s,o,n.value,e,i,r)}function VH(n,t,e,i,r,o){const s=o[t];if(null!==s){const a=i.setInput;for(let l=0;l0&&JC(e)}}function JC(n){for(let i=fC(n);null!==i;i=pC(i))for(let r=10;r0&&JC(o)}const e=n[1].components;if(null!==e)for(let i=0;i0&&JC(r)}}function WH(n,t){const e=mo(t,n),i=e[1];(function GH(n,t){for(let e=t.length;e-1&&(yC(t,i),Ry(e,i))}this._attachedToViewContainer=!1}vI(this._lView[1],this._lView)}onDestroy(t){SO(this._lView[1],this._lView,null,t)}markForCheck(){XC(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){t_(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Z(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function NU(n,t){Gf(n,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Z(902,!1);this._appRef=t}}class YH extends Zf{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;t_(t[1],t,t[8],!1)}checkNoChanges(){}get context(){return null}}class FO extends Sc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=wn(t);return new Jf(e,this.ngModule)}}function jO(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class KH{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=mc(i);const r=this.injector.get(t,RC,i);return r!==RC||e===RC?r:this.parentInjector.get(t,e,i)}}class Jf extends eO{get inputs(){return jO(this.componentDef.inputs)}get outputs(){return jO(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function tH(n){return n.map(eH).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof Os?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new KH(t,o):t,a=s.get(Kf,null);if(null===a)throw new Z(407,!1);const l=s.get(R8,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function MH(n,t,e){return n.selectRootElement(t,e===ie.ShadowDom)}(c,i,this.componentDef.encapsulation):gC(c,u,function qH(n){const t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(u)),h=this.componentDef.onPush?288:272,f=qC(0,null,null,1,0,null,null,null,null,null),p=Jy(null,f,null,h,null,null,a,c,l,s,null);let m,g;Hw(p);try{const y=this.componentDef;let b,w=null;y.findHostDirectiveDefs?(b=[],w=new Map,y.findHostDirectiveDefs(y,b,w),b.push(y)):b=[y];const _=function ZH(n,t){const e=n[1];return n[22]=t,Md(e,22,2,"#host",null)}(p,d),N=function JH(n,t,e,i,r,o,s,a){const l=r[1];!function XH(n,t,e,i){for(const r of n)t.mergedAttrs=Rf(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(n_(t,t.mergedAttrs,!0),null!==e&&AI(i,e,t))}(i,n,t,s);const c=o.createRenderer(t,e),u=Jy(r,MO(e),null,e.onPush?32:16,r[n.index],n,o,c,a||null,null,null);return l.firstCreatePass&&QC(l,n,i.length-1),e_(r,u),r[n.index]=u}(_,d,y,b,p,a,c);g=vx(f,22),d&&function t9(n,t,e,i){if(i)Kw(n,e,["ng-version",F8.full]);else{const{attrs:r,classes:o}=function nH(n){const t=[],e=[];let i=1,r=2;for(;i0&&OI(n,e,o.join(" "))}}(c,y,d,i),void 0!==e&&function n9(n,t,e){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Rf(r.hostAttrs,e=Rf(e,r.hostAttrs))}}(i)}function nD(n){return n===Te?{}:n===Ke?[]:n}function o9(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function s9(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function a9(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}let r_=null;function Ec(){if(!r_){const n=pn.Symbol;if(n&&n.iterator)r_=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;es(Yi(_[i.index])):i.index;let w=null;if(!s&&a&&(w=function w9(n,t,e,i){const r=n.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==w)(w.__ngLastListenerFn__||w).__ngNextListenerFn__=o,w.__ngLastListenerFn__=o,h=!1;else{o=nA(i,t,u,o,!1);const _=e.listen(g,r,o);d.push(o,_),c&&c.push(r,b,y,y+1)}}else o=nA(i,t,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?mo(n.index,t):t);let l=tA(t,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=tA(t,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function D(n=1){return function xB(n){return(yt.lFrame.contextLView=function IB(n,t){for(;n>0;)t=t[15],n--;return t}(n,yt.lFrame.contextLView))[8]}(n)}function C9(n,t){let e=null;const i=function Q8(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(n);for(let r=0;r>17&32767}function sD(n){return 2|n}function Ic(n){return(131068&n)>>2}function aD(n,t){return-131069&n|t<<2}function lD(n){return 1|n}function dA(n,t,e,i,r){const o=n[e+1],s=null===t;let a=i?hl(o):Ic(o),l=!1;for(;0!==a&&(!1===l||s);){const u=n[a+1];x9(n[a],t)&&(l=!0,n[a+1]=i?lD(u):sD(u)),a=i?hl(u):Ic(u)}l&&(n[e+1]=i?sD(o):lD(o))}function x9(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&gd(n,t)>=0}const Oi={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function hA(n){return n.substring(Oi.key,Oi.keyEnd)}function I9(n){return n.substring(Oi.value,Oi.valueEnd)}function fA(n,t){const e=Oi.textEnd;return e===t?-1:(t=Oi.keyEnd=function k9(n,t,e){for(;t32;)t++;return t}(n,Oi.key=t,e),Ld(n,t,e))}function pA(n,t){const e=Oi.textEnd;let i=Oi.key=Ld(n,t,e);return e===i?-1:(i=Oi.keyEnd=function N9(n,t,e){let i;for(;t=65&&(-33&i)<=90||i>=48&&i<=57);)t++;return t}(n,i,e),i=gA(n,i,e),i=Oi.value=Ld(n,i,e),i=Oi.valueEnd=function P9(n,t,e){let i=-1,r=-1,o=-1,s=t,a=s;for(;s32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,e),gA(n,i,e))}function mA(n){Oi.key=0,Oi.keyEnd=0,Oi.value=0,Oi.valueEnd=0,Oi.textEnd=n.length}function Ld(n,t,e){for(;t=0;e=pA(t,e))bA(n,hA(t),I9(t))}function Ht(n){us(go,Ns,n,!0)}function Ns(n,t){for(let e=function O9(n){return mA(n),fA(n,Ld(n,0,Oi.textEnd))}(t);e>=0;e=fA(t,e))go(n,hA(t),!0)}function cs(n,t,e,i){const r=se(),o=tn(),s=Ma(2);o.firstUpdatePass&&vA(o,n,s,i),t!==_t&&cr(r,s,t)&&wA(o,o.data[Tr()],r,r[11],n,r[s+1]=function U9(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=bn(yo(n)))),n}(t,e),i,s)}function us(n,t,e,i){const r=tn(),o=Ma(2);r.firstUpdatePass&&vA(r,null,o,i);const s=se();if(e!==_t&&cr(s,o,e)){const a=r.data[Tr()];if(DA(a,i)&&!_A(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=_a(l,e||"")),rD(r,a,s,e,i)}else!function B9(n,t,e,i,r,o,s,a){r===_t&&(r=Ke);let l=0,c=0,u=0=n.expandoStartIndex}function vA(n,t,e,i){const r=n.data;if(null===r[e+1]){const o=r[Tr()],s=_A(n,e);DA(o,i)&&null===t&&!s&&(t=!1),t=function R9(n,t,e,i){const r=function Bw(n){const t=yt.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}(n);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=tp(e=cD(null,n,t,e,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=cD(r,n,t,e,i),null===o){let l=function F9(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Ic(i))return n[hl(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=cD(null,n,t,l[1],i),l=tp(l,t.attrs,i),function j9(n,t,e,i){n[hl(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else o=function z9(n,t,e){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=hl(n[a+1]);n[i+1]=l_(h,a),0!==h&&(n[h+1]=aD(n[h+1],i)),n[a+1]=function T9(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=l_(a,0),0!==a&&(n[a+1]=aD(n[a+1],i)),a=i;else n[i+1]=l_(l,0),0===a?a=i:n[l+1]=aD(n[l+1],i),l=i;c&&(n[i+1]=sD(n[i+1])),dA(n,u,i,!0),dA(n,u,i,!1),function E9(n,t,e,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&gd(o,t)>=0&&(e[i+1]=lD(e[i+1]))}(t,u,n,i,o),s=l_(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function cD(n,t,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===_t&&(h=d?Ke:void 0);let f=d?iC(h,i):u===i?h:void 0;if(c&&!c_(f)&&(f=iC(l,i)),c_(f)&&(a=f,s))return a;const p=n[r+1];r=s?hl(p):Ic(p)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=iC(l,i))}return a}function c_(n){return void 0!==n}function DA(n,t){return 0!=(n.flags&(t?8:16))}function Ne(n,t=""){const e=se(),i=tn(),r=n+22,o=i.firstCreatePass?Md(i,r,1,t,null):i.data[r],s=e[r]=function mC(n,t){return n.createText(t)}(e[11],t);Uy(i,e,s,o),Es(o,!1)}function Et(n){return Ki("",n,""),Et}function Ki(n,t,e){const i=se(),r=Ed(i,n,t,e);return r!==_t&&xa(i,Tr(),r),Ki}function u_(n,t,e,i,r){const o=se(),s=xd(o,n,t,e,i,r);return s!==_t&&xa(o,Tr(),s),u_}const Fd="en-US";let $A=Fd;function hD(n,t,e,i,r){if(n=Je(n),Array.isArray(n))for(let o=0;o>20;if(Mc(n)||!n.multi){const f=new Lf(l,r,I),p=pD(a,t,r?u:u+h,d);-1===p?(Xw(Ny(c,s),o,a),fD(o,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=pD(a,t,u+h,d),p=pD(a,t,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){Xw(Ny(c,s),o,a);const y=function s6(n,t,e,i,r){const o=new Lf(n,e,I);return o.multi=[],o.index=t,o.componentProviders=0,mk(o,r,i&&!e),o}(r?o6:r6,e.length,r,i,l);!r&&g&&(e[p].providerFactory=y),fD(o,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),s.push(y)}else fD(o,n,f>-1?f:p,mk(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function fD(n,t,e,i){const r=Mc(t),o=function D8(n){return!!n.useClass}(t);if(r||o){const l=(o?Je(t.useClass):t).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function mk(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function pD(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function i6(n,t,e){const i=tn();if(i.firstCreatePass){const r=ss(n);hD(e,i.data,i.blueprint,r,!0),hD(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class jd{}class gk{}class yk extends jd{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new FO(this);const i=ho(t);this._bootstrapComponents=Ea(i.bootstrap),this._r3Injector=mO(t,e,[{provide:jd,useValue:this},{provide:Sc,useValue:this.componentFactoryResolver}],bn(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class gD extends gk{constructor(t){super(),this.moduleType=t}create(t){return new yk(this.moduleType,t)}}class l6 extends jd{constructor(t,e,i){super(),this.componentFactoryResolver=new FO(this),this.instance=null;const r=new JI([...t,{provide:jd,useValue:this},{provide:Sc,useValue:this.componentFactoryResolver}],e||Qy(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function m_(n,t,e=null){return new l6(n,t,e).injector}let c6=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=qI(0,e.type),r=i.length>0?m_([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=H({token:n,providedIn:"environment",factory:()=>new n(F(Os))}),n})();function Ps(n){n.getStandaloneInjector=t=>t.get(c6).getOrCreateStandaloneInjector(n)}function Qi(n,t,e){const i=Dr()+n,r=se();return r[i]===_t?ks(r,i,e?t.call(e):t()):Xf(r,i)}function bt(n,t,e,i){return Mk(se(),Dr(),n,t,e,i)}function mi(n,t,e,i,r){return function Sk(n,t,e,i,r,o,s){const a=t+e;return xc(n,a,r,o)?ks(n,a+2,s?i.call(s,r,o):i(r,o)):ap(n,a+2)}(se(),Dr(),n,t,e,i,r)}function fl(n,t,e,i,r,o){return function Ek(n,t,e,i,r,o,s,a){const l=t+e;return function s_(n,t,e,i,r){const o=xc(n,t,e,i);return cr(n,t+2,r)||o}(n,l,r,o,s)?ks(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):ap(n,l+3)}(se(),Dr(),n,t,e,i,r,o)}function zd(n,t,e,i,r,o,s){return function xk(n,t,e,i,r,o,s,a,l){const c=t+e;return Lo(n,c,r,o,s,a)?ks(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):ap(n,c+4)}(se(),Dr(),n,t,e,i,r,o,s)}function _D(n,t,e,i){return function Ik(n,t,e,i,r,o){let s=t+e,a=!1;for(let l=0;l=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=_c(i.type)),s=Br(I);try{const a=ky(!1),l=o();return ky(a),function _9(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,se(),r,l),l}finally{Br(s)}}function ei(n,t,e){const i=n+22,r=se(),o=ld(r,i);return function lp(n,t){return n[1].data[t].pure}(r,i)?Mk(r,Dr(),t,o.transform,e,o):o.transform(e)}function vD(n){return t=>{setTimeout(n,void 0,t)}}const re=class S6 extends le{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=vD(o),r&&(r=vD(r)),s&&(s=vD(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof ae&&t.add(a),a}};function E6(){return this._results[Ec()]()}class cp{get changes(){return this._changes||(this._changes=new re)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Ec(),i=cp.prototype;i[e]||(i[e]=E6)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const i=this;i.dirty=!1;const r=function Po(n){return n.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function YB(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=O6,n})();const x6=Ro,I6=class extends x6{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tViews,r=Jy(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),$C(i,r,t),new Zf(r)}};function O6(){return g_(qi(),se())}function g_(n,t){return 4&n.type?new I6(t,n,bd(n,t)):null}let Gr=(()=>{class n{}return n.__NG_ELEMENT_ID__=A6,n})();function A6(){return kk(qi(),se())}const k6=Gr,Ok=class extends k6{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return bd(this._hostTNode,this._hostLView)}get injector(){return new dd(this._hostTNode,this._hostLView)}get parentInjector(){const t=Jw(this._hostTNode,this._hostLView);if(Fx(t)){const e=Ay(t,this._hostLView),i=Oy(t);return new dd(e[1].data[i+8],e)}return new dd(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Ak(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){const s=t&&!function jf(n){return"function"==typeof n}(t);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?t:new Jf(wn(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Os,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(t,e){const i=t._lView,r=i[1];if(function yB(n){return rs(n[3])}(i)){const u=this.indexOf(t);if(-1!==u)this.detach(u);else{const d=i[3],h=new Ok(d,d[6],d[3]);h.detach(h.indexOf(t))}}const o=this._adjustIndex(e),s=this._lContainer;!function LU(n,t,e,i){const r=10+i,o=e.length;i>0&&(e[r-1][4]=t),i0)i.push(s[a/2]);else{const c=o[a+1],u=t[-l];for(let d=10;d{class n{constructor(e){this.appInits=e,this.resolve=__,this.reject=__,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(F(dp,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const hp=new Ce("AppId",{providedIn:"root",factory:function nN(){return`${OD()}${OD()}${OD()}`}});function OD(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const iN=new Ce("Platform Initializer"),b_=new Ce("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),rN=new Ce("appBootstrapListener"),oN=new Ce("AnimationModuleType");let r$=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Ls=new Ce("LocaleId",{providedIn:"root",factory:()=>tt(Ls,et.Optional|et.SkipSelf)||function o$(){return typeof $localize<"u"&&$localize.locale||Fd}()});class a${constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let sN=(()=>{class n{compileModuleSync(e){return new gD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ea(ho(e).declarations).reduce((s,a)=>{const l=wn(a);return l&&s.push(new Jf(l)),s},[]);return new a$(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const u$=(()=>Promise.resolve(0))();function AD(n){typeof Zone>"u"?u$.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class $t{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new re(!1),this.onMicrotaskEmpty=new re(!1),this.onStable=new re(!1),this.onError=new re(!1),typeof Zone>"u")throw new Z(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function d$(){let n=pn.requestAnimationFrame,t=pn.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function p$(n){const t=()=>{!function f$(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(pn,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,ND(n),n.isCheckStableRunning=!0,kD(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),ND(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return cN(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),uN(n)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return cN(n),e.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),uN(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,ND(n),kD(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!$t.isInAngularZone())throw new Z(909,!1)}static assertNotInAngularZone(){if($t.isInAngularZone())throw new Z(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,h$,__,__);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const h$={};function kD(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function ND(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function cN(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function uN(n){n._nesting--,kD(n)}class m${constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new re,this.onMicrotaskEmpty=new re,this.onStable=new re,this.onError=new re}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}const dN=new Ce(""),w_=new Ce("");let RD,PD=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,RD||(function g$(n){RD=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{$t.assertNotInAngularZone(),AD(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())AD(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(F($t),F(LD),F(w_))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),LD=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return RD?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),pl=null;const hN=new Ce("AllowMultipleToken"),FD=new Ce("PlatformDestroyListeners");class fN{constructor(t,e){this.name=t,this.token=e}}function mN(n,t,e=[]){const i=`Platform: ${t}`,r=new Ce(i);return(o=[])=>{let s=jD();if(!s||s.injector.get(hN,!1)){const a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function v$(n){if(pl&&!pl.get(hN,!1))throw new Z(400,!1);pl=n;const t=n.get(yN);(function pN(n){const t=n.get(iN,null);t&&t.forEach(e=>e())})(n)}(function gN(n=[],t){return Mr.create({name:t,providers:[{provide:kC,useValue:"platform"},{provide:FD,useValue:new Set([()=>pl=null])},...n]})}(a,i))}return function w$(n){const t=jD();if(!t)throw new Z(401,!1);return t}()}}function jD(){return pl?.get(yN)??null}let yN=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function vN(n,t){let e;return e="noop"===n?new m$:("zone.js"===n?void 0:n)||new $t(t),e}(i?.ngZone,function _N(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:$t,useValue:r}];return r.run(()=>{const s=Mr.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(Cd,null);if(!l)throw new Z(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{C_(this._modules,a),c.unsubscribe()})}),function bN(n,t,e){try{const i=e();return ep(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(v_);return c.runInitializers(),c.donePromise.then(()=>(function WA(n){Vr(n,"Expected localeId to be defined"),"string"==typeof n&&($A=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ls,Fd)||Fd),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=wN({},i);return function y$(n,t,e){const i=new gD(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(kc);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Z(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Z(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(FD,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(F(Mr))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function wN(n,t){return Array.isArray(t)?t.reduce(wN,n):{...n,...t}}let kc=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Se(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new Se(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{$t.assertNotInAngularZone(),AD(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{$t.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Cs(o,s.pipe(function py(){return n=>hc()(function fy(n,t){return function(i){let r;if(r="function"==typeof n?n:function(){return n},"function"==typeof t)return i.lift(new ww(r,t));const o=Object.create(i,bw);return o.source=i,o.subjectFactory=r,o}}(ya)(n))}()))}bootstrap(e,i){const r=e instanceof eO;if(!this._injector.get(v_).done)throw!r&&function id(n){const t=wn(n)||rr(n)||wr(n);return null!==t&&t.standalone}(e),new Z(405,false);let s;s=r?e:this._injector.get(Sc).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function _$(n){return n.isBoundToModule}(s)?void 0:this._injector.get(jd),c=s.create(Mr.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(dN,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),C_(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Z(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;C_(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(rN,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>C_(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Z(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(F($t),F(Os),F(Cd))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function C_(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let Rn=(()=>{class n{}return n.__NG_ELEMENT_ID__=T$,n})();function T$(n){return function M$(n,t,e){if(Nf(n)&&!e){const i=mo(n.index,t);return new Zf(i,i)}return 47&n.type?new Zf(t[16],t):null}(qi(),se(),16==(16&n))}class SN{constructor(){}supports(t){return o_(t)}create(t){return new A$(t)}}const O$=(n,t)=>t;class A${constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||O$}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new k$(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new EN),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new EN),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class k${constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class N${constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class EN{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new N$,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function xN(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new L$(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class L${constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function ON(){return new M_([new SN])}let M_=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||ON()),deps:[[n,new Bf,new Vf]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Z(901,!1)}}return n.\u0275prov=H({token:n,providedIn:"root",factory:ON}),n})();function AN(){return new fp([new IN])}let fp=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||AN()),deps:[[n,new Bf,new Vf]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Z(901,!1)}}return n.\u0275prov=H({token:n,providedIn:"root",factory:AN}),n})();const j$=mN(null,"core",[]);let z$=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(F(kc))},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();let HD=null;function Rs(){return HD}class H${}const Fn=new Ce("DocumentToken");let $D=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return function $$(){return F(kN)}()},providedIn:"platform"}),n})();const W$=new Ce("Location Initialized");let kN=(()=>{class n extends $D{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Rs().getBaseHref(this._doc)}onPopState(e){const i=Rs().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Rs().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){NN()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){NN()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(F(Fn))},n.\u0275prov=H({token:n,factory:function(){return function G$(){return new kN(F(Fn))}()},providedIn:"platform"}),n})();function NN(){return!!window.history.pushState}function WD(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function PN(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function Oa(n){return n&&"?"!==n[0]?"?"+n:n}let Pc=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return tt(RN)},providedIn:"root"}),n})();const LN=new Ce("appBaseHref");let RN=(()=>{class n extends Pc{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??tt(Fn).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return WD(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Oa(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Oa(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Oa(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(F($D),F(LN,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Y$=(()=>{class n extends Pc{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=WD(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Oa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Oa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(F($D),F(LN,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),GD=(()=>{class n{constructor(e){this._subject=new re,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function Q$(n){if(new RegExp("^(https?:)?//").test(n)){const[,e]=n.split(/\/\/[^\/]+/);return e}return n}(PN(FN(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Oa(i))}normalize(e){return n.stripTrailingSlash(function K$(n,t){return n&&new RegExp(`^${n}([/;?#]|$)`).test(t)?t.substring(n.length):t}(this._basePath,FN(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Oa(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Oa(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=Oa,n.joinWithSlash=WD,n.stripTrailingSlash=PN,n.\u0275fac=function(e){return new(e||n)(F(Pc))},n.\u0275prov=H({token:n,factory:function(){return function q$(){return new GD(F(Pc))}()},providedIn:"root"}),n})();function FN(n){return n.replace(/\/index.html$/,"")}function GN(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}const nT=/\s+/,YN=[];let li=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=YN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(nT):YN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(nT):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(nT).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(I(M_),I(fp),I(Dt),I(lr))},n.\u0275dir=we({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class PW{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let qr=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new PW(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),QN(a,r)}});for(let r=0,o=i.length;r{QN(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(I(Gr),I(Ro),I(M_))},n.\u0275dir=we({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function QN(n,t){n.context.$implicit=t.item}let Wt=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new RW,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){ZN("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){ZN("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(I(Gr),I(Ro))},n.\u0275dir=we({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class RW{constructor(){this.$implicit=null,this.ngIf=null}}function ZN(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${bn(t)}'.`)}class iT{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Hd=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),L_=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new iT(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(I(Gr),I(Ro),I(Hd,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),R_=(()=>{class n{constructor(e,i,r){r._addDefault(new iT(e,i))}}return n.\u0275fac=function(e){return new(e||n)(I(Gr),I(Ro),I(Hd,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),Zi=(()=>{class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Hr.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(e){return new(e||n)(I(Dt),I(fp),I(lr))},n.\u0275dir=we({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),Kr=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(I(Gr))},n.\u0275dir=we({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Gi]}),n})();function fs(n,t){return new Z(2100,!1)}class jW{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}}class zW{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}}const VW=new zW,BW=new jW;let F_=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(ep(e))return VW;if(JO(e))return BW;throw fs()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(I(Rn,16))},n.\u0275pipe=Zn({name:"async",type:n,pure:!1,standalone:!0}),n})(),rT=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fs();return e.toLowerCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=Zn({name:"lowercase",type:n,pure:!0,standalone:!0}),n})();const UW=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;let XN=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fs();return e.replace(UW,i=>i[0].toUpperCase()+i.slice(1).toLowerCase())}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=Zn({name:"titlecase",type:n,pure:!0,standalone:!0}),n})(),mn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();const tP="browser";let aG=(()=>{class n{}return n.\u0275prov=H({token:n,providedIn:"root",factory:()=>new lG(F(Fn),window)}),n})();class lG{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function cG(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=nP(this.window.history)||nP(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function nP(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class iP{}class RG extends H${constructor(){super(...arguments),this.supportsDOMEvents=!0}}class cT extends RG{static makeCurrent(){!function U$(n){HD||(HD=n)}(new cT)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function FG(){return yp=yp||document.querySelector("base"),yp?yp.getAttribute("href"):null}();return null==e?null:function jG(n){z_=z_||document.createElement("a"),z_.setAttribute("href",n);const t=z_.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){yp=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return GN(document.cookie,t)}}let z_,yp=null;const cP=new Ce("TRANSITION_ID"),VG=[{provide:dp,useFactory:function zG(n,t,e){return()=>{e.get(v_).donePromise.then(()=>{const i=Rs(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const V_=new Ce("EventManagerPlugins");let B_=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),_p=(()=>{class n extends dP{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach(hP),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(hP))}}return n.\u0275fac=function(e){return new(e||n)(F(Fn))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function hP(n){Rs().remove(n)}const uT={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},dT=/%COMP%/g;function hT(n,t){return t.flat(100).map(e=>e.replace(dT,n))}function mP(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let U_=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new fT(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case ie.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new qG(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case ie.ShadowDom:return new KG(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=hT(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(F(B_),F(_p),F(hp))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class fT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(uT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(yP(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(yP(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;const o=uT[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=uT[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Hr.DashCase|Hr.Important)?t.style.setProperty(e,i,r&Hr.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Hr.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,mP(i)):this.eventManager.addEventListener(t,e,mP(i))}}function yP(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class qG extends fT{constructor(t,e,i,r){super(t),this.component=i;const o=hT(r+"-"+i.id,i.styles);e.addStyles(o),this.contentAttr=function WG(n){return"_ngcontent-%COMP%".replace(dT,n)}(r+"-"+i.id),this.hostAttr=function GG(n){return"_nghost-%COMP%".replace(dT,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class KG extends fT{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=hT(r.id,r.styles);for(let s=0;s{class n extends uP{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(F(Fn))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const _P=["alt","control","meta","shift"],ZG={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},JG={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let XG=(()=>{class n extends uP{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Rs().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=n._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),_P.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=ZG[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),_P.forEach(s=>{s!==r&&(0,JG[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(F(Fn))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const bP=[{provide:b_,useValue:tP},{provide:iN,useValue:function eY(){cT.makeCurrent()},multi:!0},{provide:Fn,useFactory:function nY(){return function qU(n){TC=n}(document),document},deps:[]}],iY=mN(j$,"browser",bP),wP=new Ce(""),CP=[{provide:w_,useClass:class BG{addToWindow(t){pn.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},pn.getAllAngularTestabilities=()=>t.getAllTestabilities(),pn.getAllAngularRootElements=()=>t.getAllRootElements(),pn.frameworkStabilizers||(pn.frameworkStabilizers=[]),pn.frameworkStabilizers.push(i=>{const r=pn.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Rs().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:dN,useClass:PD,deps:[$t,LD,w_]},{provide:PD,useClass:PD,deps:[$t,LD,w_]}],DP=[{provide:kC,useValue:"root"},{provide:Cd,useFactory:function tY(){return new Cd},deps:[]},{provide:V_,useClass:QG,multi:!0,deps:[Fn,$t,b_]},{provide:V_,useClass:XG,multi:!0,deps:[Fn]},{provide:U_,useClass:U_,deps:[B_,_p,hp]},{provide:Kf,useExisting:U_},{provide:dP,useExisting:_p},{provide:_p,useClass:_p,deps:[Fn]},{provide:B_,useClass:B_,deps:[V_,$t]},{provide:iP,useClass:UG,deps:[]},[]];let TP=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:hp,useValue:e.appId},{provide:cP,useExisting:hp},VG]}}}return n.\u0275fac=function(e){return new(e||n)(F(wP,12))},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:[...DP,...CP],imports:[mn,z$]}),n})(),MP=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return n.\u0275fac=function(e){return new(e||n)(F(Fn))},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new e:function oY(){return new MP(F(Fn))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let gT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new(e||n):F(yT),i},providedIn:"root"}),n})(),yT=(()=>{class n extends gT{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Ln.NONE:return i;case Ln.HTML:return Is(i,"HTML")?yo(i):UI(this._doc,String(i)).toString();case Ln.STYLE:return Is(i,"Style")?yo(i):i;case Ln.SCRIPT:if(Is(i,"Script"))return yo(i);throw new Error("unsafe value used in a script context");case Ln.URL:return Is(i,"URL")?yo(i):Gy(String(i));case Ln.RESOURCE_URL:if(Is(i,"ResourceURL"))return yo(i);throw new Error(`unsafe value used in a resource URL context (see ${Yu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Yu})`)}}bypassSecurityTrustHtml(e){return function t8(n){return new KU(n)}(e)}bypassSecurityTrustStyle(e){return function n8(n){return new QU(n)}(e)}bypassSecurityTrustScript(e){return function i8(n){return new ZU(n)}(e)}bypassSecurityTrustUrl(e){return function r8(n){return new JU(n)}(e)}bypassSecurityTrustResourceUrl(e){return function o8(n){return new XU(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(F(Fn))},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new e:function hY(n){return new yT(n.get(Fn))}(F(Mr)),i},providedIn:"root"}),n})();function Le(...n){let t=n[n.length-1];return Mi(t)?(n.pop(),Bt(n,t)):il(n)}function gl(n,t){return ri(n,t,1)}function gn(n,t){return function(i){return i.lift(new fY(n,t))}}class fY{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new pY(t,this.predicate,this.thisArg))}}class pY extends ne{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}class H_{}class _T{}class Qr{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Qr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Qr;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Qr?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class mY{encodeKey(t){return xP(t)}encodeValue(t){return xP(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const yY=/%(\d[a-f0-9])/gi,_Y={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function xP(n){return encodeURIComponent(n).replace(yY,(t,e)=>_Y[e]??t)}function $_(n){return`${n}`}class ps{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new mY,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function gY(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map($_):[$_(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new ps({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push($_(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf($_(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class vY{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function IP(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function OP(n){return typeof Blob<"u"&&n instanceof Blob}function AP(n){return typeof FormData<"u"&&n instanceof FormData}class ka{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function bY(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Qr),this.context||(this.context=new vY),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,t.setHeaders[h]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((d,h)=>d.set(h,t.setParams[h]),c)),new ka(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var An=(()=>((An=An||{})[An.Sent=0]="Sent",An[An.UploadProgress=1]="UploadProgress",An[An.ResponseHeader=2]="ResponseHeader",An[An.DownloadProgress=3]="DownloadProgress",An[An.Response=4]="Response",An[An.User=5]="User",An))();class vT{constructor(t,e=200,i="OK"){this.headers=t.headers||new Qr,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class bT extends vT{constructor(t={}){super(t),this.type=An.ResponseHeader}clone(t={}){return new bT({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class W_ extends vT{constructor(t={}){super(t),this.type=An.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new W_({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class kP extends vT{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function wT(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let ur=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof ka)o=e;else{let l,c;l=r.headers instanceof Qr?r.headers:new Qr(r.headers),r.params&&(c=r.params instanceof ps?r.params:new ps({fromObject:r.params})),o=new ka(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=Le(o).pipe(gl(l=>this.handler.handle(l)));if(e instanceof ka||"events"===r.observe)return s;const a=s.pipe(gn(l=>l instanceof W_));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(fe(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(fe(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(fe(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(fe(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new ps).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,wT(r,i))}post(e,i,r={}){return this.request("POST",e,wT(r,i))}put(e,i,r={}){return this.request("PUT",e,wT(r,i))}}return n.\u0275fac=function(e){return new(e||n)(F(H_))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function NP(n,t){return t(n)}function CY(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}const TY=new Ce("HTTP_INTERCEPTORS"),vp=new Ce("HTTP_INTERCEPTOR_FNS");function MY(){let n=null;return(t,e)=>(null===n&&(n=(tt(TY,{optional:!0})??[]).reduceRight(CY,NP)),n(t,e))}let PP=(()=>{class n extends H_{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(vp)));this.chain=i.reduceRight((r,o)=>function DY(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),NP)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(F(_T),F(Os))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const IY=/^\)\]\}',?\n/;let RP=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Se(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Qr(r.getAllResponseHeaders()),m=function OY(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new bT({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),y=null;204!==p&&(y=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=y?200:0);let b=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof y){const w=y;y=y.replace(IY,"");try{y=""!==y?JSON.parse(y):null}catch(_){y=w,b&&(b=!1,y={error:_,text:y})}}b?(i.next(new W_({body:y,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new kP({error:y,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new kP({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:An.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:An.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:An.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(F(iP))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const CT=new Ce("XSRF_ENABLED"),FP="XSRF-TOKEN",jP=new Ce("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>FP}),zP="X-XSRF-TOKEN",VP=new Ce("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>zP});class BP{}let AY=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=GN(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(F(Fn),F(b_),F(jP))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function kY(n,t){const e=n.url.toLowerCase();if(!tt(CT)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);const i=tt(BP).getToken(),r=tt(VP);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var yi=(()=>((yi=yi||{})[yi.Interceptors=0]="Interceptors",yi[yi.LegacyInterceptors=1]="LegacyInterceptors",yi[yi.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",yi[yi.NoXsrfProtection=3]="NoXsrfProtection",yi[yi.JsonpSupport=4]="JsonpSupport",yi[yi.RequestsMadeViaParent=5]="RequestsMadeViaParent",yi))();function $d(n,t){return{\u0275kind:n,\u0275providers:t}}function NY(...n){const t=[ur,RP,PP,{provide:H_,useExisting:PP},{provide:_T,useExisting:RP},{provide:vp,useValue:kY,multi:!0},{provide:CT,useValue:!0},{provide:BP,useClass:AY}];for(const e of n)t.push(...e.\u0275providers);return function b8(n){return{\u0275providers:n}}(t)}const UP=new Ce("LEGACY_INTERCEPTOR_FN");function LY({cookieName:n,headerName:t}){const e=[];return void 0!==n&&e.push({provide:jP,useValue:n}),void 0!==t&&e.push({provide:VP,useValue:t}),$d(yi.CustomXsrfConfiguration,e)}let DT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:[NY($d(yi.LegacyInterceptors,[{provide:UP,useFactory:MY},{provide:vp,useExisting:UP,multi:!0}]),LY({cookieName:FP,headerName:zP}))]}),n})();class RY extends ae{constructor(t,e){super()}schedule(t,e=0){return this}}class G_ extends RY{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let HP=(()=>{class n{constructor(e,i=n.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return n.now=()=>Date.now(),n})();class ms extends HP{constructor(t,e=HP.now){super(t,()=>ms.delegate&&ms.delegate!==this?ms.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return ms.delegate&&ms.delegate!==this?ms.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const TT=new class jY extends ms{}(class FY extends G_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}),zY=TT,Fs=new Se(n=>n.complete());function Y_(n){return n?function VY(n){return new Se(t=>n.schedule(()=>t.complete()))}(n):Fs}function bo(n,t){return new Se(t?e=>t.schedule(BY,0,{error:n,subscriber:e}):e=>e.error(n))}function BY({error:n,subscriber:t}){t.error(n)}class zo{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return Le(this.value);case"E":return bo(this.error);case"C":return Y_()}throw new Error("unexpected notification kind value")}static createNext(t){return typeof t<"u"?new zo("N",t):zo.undefinedValueNotification}static createError(t){return new zo("E",void 0,t)}static createComplete(){return zo.completeNotification}}zo.completeNotification=new zo("C"),zo.undefinedValueNotification=new zo("N",void 0);class HY{constructor(t,e=0){this.scheduler=t,this.delay=e}call(t,e){return e.subscribe(new q_(t,this.scheduler,this.delay))}}class q_ extends ne{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(q_.dispatch,this.delay,new $Y(t,this.destination)))}_next(t){this.scheduleMessage(zo.createNext(t))}_error(t){this.scheduleMessage(zo.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(zo.createComplete()),this.unsubscribe()}}class $Y{constructor(t,e){this.notification=t,this.destination=e}}class K_ extends le{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new WY(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;let s;if(this.closed)throw new ve;if(this.isStopped||this.hasError?s=ae.EMPTY:(this.observers.push(t),s=new Ze(this,t)),r&&t.add(t=new q_(t,r)),e)for(let a=0;ae&&(s=Math.max(s,o-e)),s>0&&r.splice(0,s),r}}class WY{constructor(t,e){this.time=t,this.value=e}}function ci(n,t){return"function"==typeof t?e=>e.pipe(ci((i,r)=>Ct(n(i,r)).pipe(fe((o,s)=>t(i,o,r,s))))):e=>e.lift(new GY(n))}class GY{constructor(t){this.project=t}call(t,e){return e.subscribe(new YY(t,this.project))}}class YY extends es{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new Wn(this),r=this.destination;r.add(i),this.innerSubscription=dc(t,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;(!t||t.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const Q_={schedule(n,t){const e=setTimeout(n,t);return()=>clearTimeout(e)},scheduleBeforeRender(n){if(typeof window>"u")return Q_.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return Q_.schedule(n,16);const t=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(t)}};let MT;function nq(n,t,e){let i=e;return function KY(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&t.some((r,o)=>!("*"===r||!function ZY(n,t){if(!MT){const e=Element.prototype;MT=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&MT.call(n,t)}(n,r)||(i=o,0))),i}class rq{constructor(t,e){this.componentFactory=e.get(Sc).resolveComponentFactory(t)}create(t){return new oq(this.componentFactory,t)}}class oq{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new K_(1),this.events=this.eventEmitters.pipe(ci(i=>Cs(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get($t),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=Q_.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{null!==this.componentRef?function JY(n,t){return n===t||n!=n&&t!=t}(e,this.getInputValue(t))&&(void 0!==e||!this.unchangedInputs.has(t))||(this.recordInputChange(t,e),this.unchangedInputs.delete(t),this.hasInputChanges=!0,this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=Mr.create({providers:[],parent:this.injector}),i=function tq(n,t){const e=n.childNodes,i=t.map(()=>[]);let r=-1;t.some((o,s)=>"*"===o&&(r=s,!0));for(let o=0,s=e.length;o{this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:i,templateName:r})=>t.instance[i].pipe(fe(s=>({name:r,value:s}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}markViewForCheck(t){this.hasInputChanges&&(this.hasInputChanges=!1,t.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=Q_.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[t];if(i)return void(i.currentValue=e);const r=this.unchangedInputs.has(t),o=r?void 0:this.getInputValue(t);this.inputChanges[t]=new fx(o,e,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class sq extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function Z_(n,t){return new Se(e=>{const i=n.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(t?t.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let $P=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(I(lr),I(Dt))},n.\u0275dir=we({type:n}),n})(),Lc=(()=>{class n extends $P{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Ri(n)))(i||n)}}(),n.\u0275dir=we({type:n,features:[Cn]}),n})();const xr=new Ce("NgValueAccessor"),uq={provide:xr,useExisting:Ut(()=>yl),multi:!0},hq=new Ce("CompositionEventMode");let yl=(()=>{class n extends $P{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function dq(){const n=Rs()?Rs().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(I(lr),I(Dt),I(hq,8))},n.\u0275dir=we({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&oe("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Pt([uq]),Cn]}),n})();function _l(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function GP(n){return null!=n&&"number"==typeof n.length}const dr=new Ce("NgValidators"),vl=new Ce("NgAsyncValidators"),pq=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Wd{static min(t){return function YP(n){return t=>{if(_l(t.value)||_l(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(_l(t.value)||_l(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return function KP(n){return _l(n.value)?{required:!0}:null}(t)}static requiredTrue(t){return function QP(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function ZP(n){return _l(n.value)||pq.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function JP(n){return t=>_l(t.value)||!GP(t.value)?null:t.value.lengthGP(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function e2(n){if(!n)return J_;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(_l(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return a2(t)}static composeAsync(t){return l2(t)}}function J_(n){return null}function t2(n){return null!=n}function n2(n){return ep(n)?Ct(n):n}function r2(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function o2(n,t){return t.map(e=>e(n))}function s2(n){return n.map(t=>function mq(n){return!n.validate}(t)?t:e=>t.validate(e))}function a2(n){if(!n)return null;const t=n.filter(t2);return 0==t.length?null:function(e){return r2(o2(e,t))}}function ST(n){return null!=n?a2(s2(n)):null}function l2(n){if(!n)return null;const t=n.filter(t2);return 0==t.length?null:function(e){return function lq(...n){if(1===n.length){const t=n[0];if(R(t))return Z_(t,null);if(P(t)&&Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);return Z_(e.map(i=>t[i]),e)}}if("function"==typeof n[n.length-1]){const t=n.pop();return Z_(n=1===n.length&&R(n[0])?n[0]:n,null).pipe(fe(e=>t(...e)))}return Z_(n,null)}(o2(e,t).map(n2)).pipe(fe(r2))}}function ET(n){return null!=n?l2(s2(n)):null}function c2(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function u2(n){return n._rawValidators}function d2(n){return n._rawAsyncValidators}function xT(n){return n?Array.isArray(n)?n:[n]:[]}function X_(n,t){return Array.isArray(n)?n.includes(t):n===t}function h2(n,t){const e=xT(t);return xT(n).forEach(r=>{X_(e,r)||e.push(r)}),e}function f2(n,t){return xT(t).filter(e=>!X_(n,e))}class p2{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ST(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ET(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Ir extends p2{get formDirective(){return null}get path(){return null}}class js extends p2{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class m2{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Rc=(()=>{class n extends m2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(I(js,2))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&vo("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Cn]}),n})(),Gd=(()=>{class n extends m2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(I(Ir,10))},n.\u0275dir=we({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&vo("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Cn]}),n})();const bp="VALID",tv="INVALID",Yd="PENDING",wp="DISABLED";function kT(n){return(nv(n)?n.validators:n)||null}function NT(n,t){return(nv(t)?t.asyncValidators:n)||null}function nv(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function y2(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new Z(1e3,"");if(!i[e])throw new Z(1001,"")}function _2(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new Z(1002,"")})}class iv{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===bp}get invalid(){return this.status===tv}get pending(){return this.status==Yd}get disabled(){return this.status===wp}get enabled(){return this.status!==wp}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(h2(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(h2(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(f2(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(f2(t,this._rawAsyncValidators))}hasValidator(t){return X_(this._rawValidators,t)}hasAsyncValidator(t){return X_(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Yd,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=wp,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=bp,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===bp||this.status===Yd)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?wp:bp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Yd,this._hasOwnPendingAsyncValidator=!0;const e=n2(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new re,this.statusChanges=new re}_calculateStatus(){return this._allControlsDisabled()?wp:this.errors?tv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Yd)?Yd:this._anyControlsHaveStatus(tv)?tv:bp}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){nv(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function Cq(n){return Array.isArray(n)?ST(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function Dq(n){return Array.isArray(n)?ET(n):n||null}(this._rawAsyncValidators)}}class qd extends iv{constructor(t,e,i){super(kT(e),NT(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){_2(this,0,t),Object.keys(t).forEach(i=>{y2(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class v2 extends qd{}const Kd=new Ce("CallSetDisabledState",{providedIn:"root",factory:()=>rv}),rv="always";function ov(n,t){return[...t.path,n]}function Cp(n,t,e=rv){PT(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function Mq(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&b2(n,t)})}(n,t),function Eq(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function Sq(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&b2(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function Tq(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function sv(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),lv(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function av(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function PT(n,t){const e=u2(n);null!==t.validator?n.setValidators(c2(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=d2(n);null!==t.asyncValidator?n.setAsyncValidators(c2(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();av(t._rawValidators,r),av(t._rawAsyncValidators,r)}function lv(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=u2(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){const r=d2(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}const i=()=>{};return av(t._rawValidators,i),av(t._rawAsyncValidators,i),e}function b2(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function RT(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function FT(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===yl?e=o:function Oq(n){return Object.getPrototypeOf(n.constructor)===Lc}(o)?i=o:r=o}),r||i||e||null}function D2(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function T2(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Qd=class extends iv{constructor(t=null,e,i){super(kT(e),NT(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),nv(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=T2(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){D2(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){D2(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){T2(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Lq={provide:js,useExisting:Ut(()=>Tp)},E2=(()=>Promise.resolve())();let Tp=(()=>{class n extends js{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Qd,this._registered=!1,this.update=new re,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=FT(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),RT(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Cp(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){E2.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&function Ud(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);E2.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ov(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(I(Ir,9),I(dr,10),I(vl,10),I(xr,10),I(Rn,8),I(Kd,8))},n.\u0275dir=we({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Pt([Lq]),Cn,Gi]}),n})(),Zd=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),I2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();const zT=new Ce("NgModelWithFormControlWarning"),Bq={provide:Ir,useExisting:Ut(()=>Na)};let Na=(()=>{class n extends Ir{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new re,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(lv(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return Cp(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){sv(e.control||null,e,!1),function Aq(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function C2(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(sv(i||null,e),(n=>n instanceof Qd)(r)&&(Cp(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function w2(n,t){PT(n,t)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function xq(n,t){return lv(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){PT(this.form,this),this._oldForm&&lv(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(I(dr,10),I(vl,10),I(Kd,8))},n.\u0275dir=we({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&oe("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Pt([Bq]),Cn,Gi]}),n})();const $q={provide:js,useExisting:Ut(()=>Fc)};let Fc=(()=>{class n extends js{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new re,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=FT(0,o)}ngOnChanges(e){this._added||this._setUpControl(),RT(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return ov(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(I(Ir,13),I(dr,10),I(vl,10),I(xr,10),I(zT,8))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Pt([$q]),Cn,Gi]}),n})(),W2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[I2]}),n})();class G2 extends iv{constructor(t,e,i){super(kT(e),NT(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){_2(this,0,t),t.forEach((i,r)=>{y2(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function Y2(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let cv=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return Y2(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new qd(r,o)}record(e,i=null){const r=this._reduceControls(e);return new v2(r,i)}control(e,i,r){let o={};return this.useNonNullable?(Y2(i)?o=i:(o.validators=i,o.asyncValidators=r),new Qd(e,{...o,nonNullable:!0})):new Qd(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new G2(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Qd||e instanceof iv?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),uv=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Kd,useValue:e.callSetDisabledState??rv}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[W2]}),n})(),Jd=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:zT,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Kd,useValue:e.callSetDisabledState??rv}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[W2]}),n})();class q2{}class oK{}const Pa="*";function Mp(n,t){return{type:7,name:n,definitions:t,options:{}}}function La(n,t=null){return{type:4,styles:t,timings:n}}function K2(n,t=null){return{type:2,steps:n,options:t}}function ui(n){return{type:6,styles:n,offset:null}}function Q2(n,t,e){return{type:0,name:n,styles:t,options:e}}function Ra(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function Xd(n,t=null){return{type:8,animation:n,options:t}}function eh(n,t=null){return{type:10,animation:n,options:t}}function Z2(n){Promise.resolve().then(n)}class Sp{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){Z2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class J2{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const o=this.players.length;0==o?Z2(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}function X2(n){return new Z(3e3,!1)}function BK(){return typeof window<"u"&&typeof window.document<"u"}function GT(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function bl(n){switch(n.length){case 0:return new Sp;case 1:return n[0];default:return new J2(n)}}function eL(n,t,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,y=p;if("offset"!==m)switch(g=t.normalizePropertyName(g,s),y){case"!":y=r.get(m);break;case Pa:y=o.get(m);break;default:y=t.normalizeStyleValue(m,g,y,s)}f.set(g,y)}),h||a.push(f),c=f,l=d}),s.length)throw function IK(n){return new Z(3502,!1)}();return a}function YT(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&qT(e,"start",n)));break;case"done":n.onDone(()=>i(e&&qT(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&qT(e,"destroy",n)))}}function qT(n,t,e){const o=KT(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function KT(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function wo(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function tL(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let QT=(n,t)=>!1,nL=(n,t,e)=>[],iL=null;function ZT(n){const t=n.parentNode||n.host;return t===iL?null:t}(GT()||typeof Element<"u")&&(BK()?(iL=(()=>document.documentElement)(),QT=(n,t)=>{for(;t;){if(t===n)return!0;t=ZT(t)}return!1}):QT=(n,t)=>n.contains(t),nL=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let zc=null,rL=!1;const oL=QT,sL=nL;let aL=(()=>{class n{validateStyleProperty(e){return function HK(n){zc||(zc=function $K(){return typeof document<"u"?document.body:null}()||{},rL=!!zc.style&&"WebkitAppearance"in zc.style);let t=!0;return zc.style&&!function UK(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in zc.style,!t&&rL&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in zc.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return oL(e,i)}getParentElement(e){return ZT(e)}query(e,i,r){return sL(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new Sp(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),JT=(()=>{class n{}return n.NOOP=new aL,n})();const XT="ng-enter",dv="ng-leave",hv="ng-trigger",fv=".ng-trigger",cL="ng-animating",eM=".ng-animating";function Fa(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:tM(parseFloat(t[1]),t[2])}function tM(n,t){return"s"===t?1e3*n:n}function pv(n,t,e){return n.hasOwnProperty("duration")?n:function YK(n,t,e){let r,o=0,s="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(X2()),{duration:0,delay:0,easing:""};r=tM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=tM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(function aK(){return new Z(3100,!1)}()),a=!0),o<0&&(t.push(function lK(){return new Z(3101,!1)}()),a=!0),a&&t.splice(l,0,X2())}return{duration:r,delay:o,easing:s}}(n,t,e)}function Ep(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function uL(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function wl(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function hL(n,t,e){return e?t+":"+e+";":""}function fL(n){let t="";for(let e=0;e{const o=iM(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),GT()&&fL(n))}function Vc(n,t){n.style&&(t.forEach((e,i)=>{const r=iM(i);n.style[r]=""}),GT()&&fL(n))}function xp(n){return Array.isArray(n)?1==n.length?n[0]:K2(n):n}const nM=new RegExp("{{\\s*(.+?)\\s*}}","g");function pL(n){let t=[];if("string"==typeof n){let e;for(;e=nM.exec(n);)t.push(e[1]);nM.lastIndex=0}return t}function Ip(n,t,e){const i=n.toString(),r=i.replace(nM,(o,s)=>{let a=t[s];return null==a&&(e.push(function uK(n){return new Z(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function mv(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const QK=/-+([a-z0-9])/g;function iM(n){return n.replace(QK,(...t)=>t[1].toUpperCase())}function ZK(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Co(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function dK(n){return new Z(3004,!1)}()}}function mL(n,t){return window.getComputedStyle(n)[t]}function iQ(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function rQ(n,t,e){if(":"==n[0]){const l=function oQ(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*([=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function TK(n){return new Z(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(gL(r,s));"<"==o[0]&&!("*"==r&&"*"==s)&&t.push(gL(s,r))}(i,e,t)):e.push(n),e}const vv=new Set(["true","1"]),bv=new Set(["false","0"]);function gL(n,t){const e=vv.has(n)||bv.has(n),i=vv.has(t)||bv.has(t);return(r,o)=>{let s="*"==n||n==r,a="*"==t||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?vv.has(n):bv.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?vv.has(t):bv.has(t)),s&&a}}const sQ=new RegExp("s*:selfs*,?","g");function rM(n,t,e,i){return new aQ(n).build(t,e,i)}class aQ{constructor(t){this._driver=t}build(t,e,i){const r=new uQ(e);return this._resetContextStyleTimingState(r),Co(this,xp(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(function fK(){return new Z(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function pK(){return new Z(3007,!1)}())}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{pL(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(mv(o.values()),e.errors.push(function mK(n,t){return new Z(3008,!1)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=Co(this,xp(t.animation),e);return{type:1,matchers:iQ(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Bc(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>Co(this,i,e)),options:Bc(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const o=t.steps.map(s=>{e.currentTime=i;const a=Co(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Bc(t.options)}}visitAnimate(t,e){const i=function hQ(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return oM(pv(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=oM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=pv(e,t);return oM(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:ui({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=ui(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===Pa?i.push(a):e.errors.push(new Z(3002,!1)):i.push(uL(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function yK(n,t,e,i,r){return new Z(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function KK(n,t,e){const i=t.params||{},r=pL(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function cK(n){return new Z(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function _K(){return new Z(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=t.steps.map(y=>{const b=this._makeStyleAst(y,e);let w=null!=b.offset?b.offset:function dQ(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(b.styles),_=0;return null!=w&&(o++,_=b.offset=w),l=l||_<0||_>1,a=a||_0&&o{const w=h>0?b==f?1:h*b:s[b],_=w*g;e.currentTime=p+m.delay+_,m.duration=_,this._validateStyleAst(y,e),y.offset=w,i.styles.push(y)}),i}visitReference(t,e){return{type:8,animation:Co(this,xp(t.animation),e),options:Bc(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Bc(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Bc(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[o,s]=function lQ(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(sQ,"")),n=n.replace(/@\*/g,fv).replace(/@\w+/g,e=>fv+"-"+e.slice(1)).replace(/:animating/g,eM),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,wo(e.collectedStyles,e.currentQuerySelector,new Map);const a=Co(this,xp(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Bc(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function CK(){return new Z(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:pv(t.timings,e.errors,!0);return{type:12,animation:Co(this,xp(t.animation),e),timings:i,options:null}}}class uQ{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Bc(n){return n?(n=Ep(n)).params&&(n.params=function cQ(n){return n?Ep(n):null}(n.params)):n={},n}function oM(n,t,e){return{duration:n,delay:t,easing:e}}function sM(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class wv{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const mQ=new RegExp(":enter","g"),yQ=new RegExp(":leave","g");function aM(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new _Q).buildKeyframes(n,t,e,i,r,o,s,a,l,c)}class _Q{buildKeyframes(t,e,i,r,o,s,a,l,c,u=[]){c=c||new wv;const d=new lM(t,e,c,r,o,u,[]);d.options=l;const h=l.delay?Fa(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),Co(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[sM(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:Fa(Ip(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Fa(i.duration):null,a=null!=i.delay?Fa(i.delay):null;return 0!==s&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),Co(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Cv);const s=Fa(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Co(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?Fa(t.options.delay):0;t.steps.forEach(s=>{const a=e.createSubContext(t.options);o&&a.delayNextStep(o),Co(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return pv(e.params?Ip(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?Fa(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Cv);let s=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(t.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),Co(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;Co(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Cv={};class lM{constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Cv,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Dv(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=Fa(i.duration)),null!=i.delay&&(r.delay=Fa(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Ip(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,o=new lM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Cv,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new vQ(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(mQ,"."+this._enterClassName)).replace(yQ,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function DK(n){return new Z(3014,!1)}()),a}}class Dv{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Dv(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Pa),this._currentKeyframe.set(e,Pa);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function bQ(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,Pa)}else wl(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of s){const c=Ip(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Pa),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=wl(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?t.add(d):u===Pa&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=t.size?mv(t.values()):[],s=e.size?mv(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return sM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class vQ extends Dv{constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=wl(t[0]);l.set("offset",0),o.push(l);const c=wl(t[0]);c.set("offset",vL(a)),o.push(c);const u=t.length-1;for(let d=1;d<=u;d++){let h=wl(t[d]);const f=h.get("offset");h.set("offset",vL((e+f*i)/s)),o.push(h)}i=s,e=0,r="",t=o}return sM(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function vL(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class cM{}const wQ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class CQ extends cM{normalizePropertyName(t,e){return iM(t)}normalizeStyleValue(t,e,i,r){let o="";const s=i.toString().trim();if(wQ.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function hK(n,t){return new Z(3005,!1)}())}return s+o}}function bL(n,t,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const uM={};class wL{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function DQ(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||uM,p=this.buildStyles(i,a&&a.params||uM,d),m=l&&l.params||uM,g=this.buildStyles(r,m,d),y=new Set,b=new Map,w=new Map,_="void"===r,N={params:TQ(m,h),delay:this.ast.options?.delay},S=u?[]:aM(t,e,this.ast.animation,o,s,p,g,N,c,d);let J=0;if(S.forEach(ke=>{J=Math.max(ke.duration+ke.delay,J)}),d.length)return bL(e,this._triggerName,i,r,_,p,g,[],[],b,w,J,d);S.forEach(ke=>{const $e=ke.element,vt=wo(b,$e,new Set);ke.preStyleProps.forEach(st=>vt.add(st));const ct=wo(w,$e,new Set);ke.postStyleProps.forEach(st=>ct.add(st)),$e!==e&&y.add($e)});const Q=mv(y.values());return bL(e,this._triggerName,i,r,_,p,g,S,Q,b,w,J)}}function TQ(n,t){const e=Ep(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class MQ{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=Ep(this.defaultParams);return Object.keys(t).forEach(o=>{const s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Ip(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class EQ{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new MQ(r.style,r.options&&r.options.params||{},i))}),CL(this.states,"true","1"),CL(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new wL(t,r,this.states))}),this.fallbackTransition=function xQ(n,t,e){return new wL(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function CL(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const IQ=new wv;class OQ{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],o=rM(this._driver,e,i,[]);if(i.length)throw function OK(n){return new Z(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,e,i){const r=t.element,o=eL(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=aM(this._driver,e,o,XT,dv,new Map,new Map,i,IQ,r),s.forEach(u=>{const d=wo(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function AK(){return new Z(3300,!1)}()),s=[]),r.length)throw function kK(n){return new Z(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,Pa))})});const c=bl(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function NK(n){return new Z(3301,!1)}();return e}listen(t,e,i,r){const o=KT(e,"","","");return YT(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const DL="ng-animate-queued",dM="ng-animate-disabled",LQ=[],TL={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},RQ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Vo="__ng_removed";class hM{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function VQ(n){return n??null}(i?t.value:t),i){const o=Ep(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Op="void",fM=new hM(Op);class FQ{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Bo(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function PK(n,t){return new Z(3302,!1)}();if(null==i||0==i.length)throw function LK(n){return new Z(3303,!1)}();if(!function BQ(n){return"start"==n||"done"==n}(i))throw function RK(n,t){return new Z(3400,!1)}();const o=wo(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);const a=wo(this._engine.statesByElement,t,new Map);return a.has(e)||(Bo(t,hv),Bo(t,hv+"-"+e),a.set(e,fM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function FK(n){return new Z(3401,!1)}();return e}trigger(t,e,i,r=!0){const o=this._getTrigger(e),s=new pM(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Bo(t,hv),Bo(t,hv+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new hM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=fM),c.value!==Op&&l.value===c.value){if(!function $Q(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{Vc(t,g),zs(t,y)})}return}const h=wo(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,t,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Bo(t,DL),s.onStart(()=>{th(t,DL)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(t);if(g){let y=g.indexOf(s);y>=0&&g.splice(y,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,fv,!0);i.forEach(r=>{if(r[Vo])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const o=this._engine.statesByElement.get(t),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(t,c,Op,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&bl(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||fM,u=new hM(Op),d=new pM(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const o=t[Vo];(!o||o===TL)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Bo(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=KT(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,YT(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class jQ{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new FQ(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Tv(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Tv(e))return;const o=e[Vo];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Bo(t,dM)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),th(t,dM))}removeNode(t,e,i,r){if(Tv(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Vo]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Tv(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,fv,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,eM,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return bl(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Vo];if(e&&e.setForRemoval){if(t[Vo]=TL,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(dM)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?bl(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function jK(n){return new Z(3402,!1)}()}_flushAnimations(t,e){const i=new wv,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(ce=>{u.add(ce);const me=this.driver.query(ce,".ng-animate-queued",!0);for(let be=0;be{const be=XT+m++;p.set(me,be),ce.forEach(He=>Bo(He,be))});const g=[],y=new Set,b=new Set;for(let ce=0;cey.add(He)):b.add(me))}const w=new Map,_=EL(h,Array.from(y));_.forEach((ce,me)=>{const be=dv+m++;w.set(me,be),ce.forEach(He=>Bo(He,be))}),t.push(()=>{f.forEach((ce,me)=>{const be=p.get(me);ce.forEach(He=>th(He,be))}),_.forEach((ce,me)=>{const be=w.get(me);ce.forEach(He=>th(He,be))}),g.forEach(ce=>{this.processLeaveNode(ce)})});const N=[],S=[];for(let ce=this._namespaceList.length-1;ce>=0;ce--)this._namespaceList[ce].drainQueuedTransitions(e).forEach(be=>{const He=be.player,kt=be.element;if(N.push(He),this.collectedEnterElements.length){const In=kt[Vo];if(In&&In.setForMove){if(In.previousTriggersValues&&In.previousTriggersValues.has(be.triggerName)){const Kt=In.previousTriggersValues.get(be.triggerName),pt=this.statesByElement.get(be.element);if(pt&&pt.has(be.triggerName)){const Bn=pt.get(be.triggerName);Bn.value=Kt,pt.set(be.triggerName,Bn)}}return void He.destroy()}}const dn=!d||!this.driver.containsElement(d,kt),Vt=w.get(kt),xn=p.get(kt),Ft=this._buildInstruction(be,i,xn,Vt,dn);if(Ft.errors&&Ft.errors.length)return void S.push(Ft);if(dn)return He.onStart(()=>Vc(kt,Ft.fromStyles)),He.onDestroy(()=>zs(kt,Ft.toStyles)),void r.push(He);if(be.isFallbackTransition)return He.onStart(()=>Vc(kt,Ft.fromStyles)),He.onDestroy(()=>zs(kt,Ft.toStyles)),void r.push(He);const nr=[];Ft.timelines.forEach(In=>{In.stretchStartingKeyframe=!0,this.disabledNodes.has(In.element)||nr.push(In)}),Ft.timelines=nr,i.append(kt,Ft.timelines),s.push({instruction:Ft,player:He,element:kt}),Ft.queriedElements.forEach(In=>wo(a,In,[]).push(He)),Ft.preStyleProps.forEach((In,Kt)=>{if(In.size){let pt=l.get(Kt);pt||l.set(Kt,pt=new Set),In.forEach((Bn,Rr)=>pt.add(Rr))}}),Ft.postStyleProps.forEach((In,Kt)=>{let pt=c.get(Kt);pt||c.set(Kt,pt=new Set),In.forEach((Bn,Rr)=>pt.add(Rr))})});if(S.length){const ce=[];S.forEach(me=>{ce.push(function zK(n,t){return new Z(3505,!1)}())}),N.forEach(me=>me.destroy()),this.reportError(ce)}const J=new Map,Q=new Map;s.forEach(ce=>{const me=ce.element;i.has(me)&&(Q.set(me,me),this._beforeAnimationBuild(ce.player.namespaceId,ce.instruction,J))}),r.forEach(ce=>{const me=ce.element;this._getPreviousPlayers(me,!1,ce.namespaceId,ce.triggerName,null).forEach(He=>{wo(J,me,[]).push(He),He.destroy()})});const ke=g.filter(ce=>IL(ce,l,c)),$e=new Map;SL($e,this.driver,b,c,Pa).forEach(ce=>{IL(ce,l,c)&&ke.push(ce)});const ct=new Map;f.forEach((ce,me)=>{SL(ct,this.driver,new Set(ce),l,"!")}),ke.forEach(ce=>{const me=$e.get(ce),be=ct.get(ce);$e.set(ce,new Map([...Array.from(me?.entries()??[]),...Array.from(be?.entries()??[])]))});const st=[],vn=[],Ot={};s.forEach(ce=>{const{element:me,player:be,instruction:He}=ce;if(i.has(me)){if(u.has(me))return be.onDestroy(()=>zs(me,He.toStyles)),be.disabled=!0,be.overrideTotalTime(He.totalTime),void r.push(be);let kt=Ot;if(Q.size>1){let Vt=me;const xn=[];for(;Vt=Vt.parentNode;){const Ft=Q.get(Vt);if(Ft){kt=Ft;break}xn.push(Vt)}xn.forEach(Ft=>Q.set(Ft,kt))}const dn=this._buildAnimation(be.namespaceId,He,J,o,ct,$e);if(be.setRealPlayer(dn),kt===Ot)st.push(be);else{const Vt=this.playersByElement.get(kt);Vt&&Vt.length&&(be.parentPlayer=bl(Vt)),r.push(be)}}else Vc(me,He.fromStyles),be.onDestroy(()=>zs(me,He.toStyles)),vn.push(be),u.has(me)&&r.push(be)}),vn.forEach(ce=>{const me=o.get(ce.element);if(me&&me.length){const be=bl(me);ce.setRealPlayer(be)}}),r.forEach(ce=>{ce.parentPlayer?ce.syncPlayerEvents(ce.parentPlayer):ce.destroy()});for(let ce=0;ce!dn.destroyed);kt.length?UQ(this,me,kt):this.processLeaveNode(me)}return g.length=0,st.forEach(ce=>{this.players.push(ce),ce.onDone(()=>{ce.destroy();const me=this.players.indexOf(ce);this.players.splice(me,1)}),ce.play()}),st}elementContainsData(t,e){let i=!1;const r=e[Vo];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const l=!o||o==Op;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){const o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=wo(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Vc(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[Vo];if(g&&g.removedBeforeQueried)return new Sp(p.duration,p.delay);const y=m!==l,b=function HQ(n){const t=[];return xL(n,t),t}((i.get(m)||LQ).map(J=>J.getRealPlayer())).filter(J=>!!J.element&&J.element===m),w=o.get(m),_=s.get(m),N=eL(0,this._normalizer,0,p.keyframes,w,_),S=this._buildPlayer(p,N,b);if(p.subTimeline&&r&&d.add(m),y){const J=new pM(t,a,m);J.setRealPlayer(S),c.push(J)}return S});c.forEach(p=>{wo(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function zQ(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Bo(p,cL));const f=bl(h);return f.onDestroy(()=>{u.forEach(p=>th(p,cL)),zs(l,e.toStyles)}),d.forEach(p=>{wo(r,p,[]).push(f)}),f}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new Sp(t.duration,t.delay)}}class pM{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new Sp,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>YT(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){wo(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Tv(n){return n&&1===n.nodeType}function ML(n,t){const e=n.style.display;return n.style.display=t??"none",e}function SL(n,t,e,i,r){const o=[];e.forEach(l=>o.push(ML(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=t.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Vo]=RQ,s.push(c))}),n.set(c,u)});let a=0;return e.forEach(l=>ML(l,o[a++])),s}function EL(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const r=new Set(t),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{const l=s(a);1!==l&&e.get(l).push(a)}),e}function Bo(n,t){n.classList?.add(t)}function th(n,t){n.classList?.remove(t)}function UQ(n,t,e){bl(e).onDone(()=>n.processLeaveNode(t))}function xL(n,t){for(let e=0;er.add(o)):t.set(n,i),e.delete(n),!0}class Mv{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new jQ(t,e,i),this._timelineEngine=new OQ(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=rM(this._driver,o,l,[]);if(l.length)throw function xK(n,t){return new Z(3404,!1)}();a=function SQ(n,t,e){return new EQ(n,t,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[o,s]=tL(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=tL(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let GQ=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&zs(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(zs(this._element,this._initialStyles),this._endStyles&&(zs(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Vc(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Vc(this._element,this._endStyles),this._endStyles=null),zs(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function mM(n){let t=null;return n.forEach((e,i)=>{(function YQ(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class OL{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:mL(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class qQ{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return oL(t,e)}getParentElement(t){return ZT(t)}query(t,e,i){return sL(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof OL);(function JK(n,t){return 0===n||0===t})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function qK(n){return n.length?n[0]instanceof Map?n:n.map(t=>uL(t)):[]}(e).map(f=>wl(f));d=function XK(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,mL(n,a)))}}return t}(t,d,c);const h=function WQ(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=mM(t[0]),t.length>1&&(i=mM(t[t.length-1]))):t instanceof Map&&(e=mM(t)),e||i?new GQ(n,e,i):null}(t,d);return new OL(t,d,l,h)}}let KQ=(()=>{class n extends q2{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:ie.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?K2(e):e;return AL(this._renderer,null,i,"register",[r]),new QQ(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(F(Kf),F(Fn))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class QQ extends oK{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new ZQ(this._id,t,e||{},this._renderer)}}class ZQ{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return AL(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function AL(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const kL="@.disabled";let JQ=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new NL("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new XQ(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(F(Kf),F(Mv),F($t))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class NL{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==kL?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class XQ extends NL{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==kL?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function eZ(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function tZ(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}let nZ=(()=>{class n extends Mv{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(F(Fn),F(JT),F(cM),F(kc))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const PL=[{provide:q2,useClass:KQ},{provide:cM,useFactory:function iZ(){return new CQ}},{provide:Mv,useClass:nZ},{provide:Kf,useFactory:function rZ(n,t,e){return new JQ(n,t,e)},deps:[U_,Mv,$t]}],gM=[{provide:JT,useFactory:()=>new qQ},{provide:oN,useValue:"BrowserAnimations"},...PL],LL=[{provide:JT,useClass:aL},{provide:oN,useValue:"NoopAnimations"},...PL];let oZ=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?LL:gM}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:gM,imports:[TP]}),n})();class Lt{static equals(t,e,i){return i?this.resolveFieldData(t,i)===this.resolveFieldData(e,i):this.equalsByValue(t,e)}static equalsByValue(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var o,s,a,i=Array.isArray(t),r=Array.isArray(e);if(i&&r){if((s=t.length)!=e.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[o],e[o]))return!1;return!0}if(i!=r)return!1;var l=t instanceof Date,c=e instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==e.getTime();var u=t instanceof RegExp,d=e instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==e.toString();var h=Object.keys(t);if((s=h.length)!==Object.keys(e).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,h[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[a=h[o]],e[a]))return!1;return!0}return t!=t&&e!=e}static resolveFieldData(t,e){if(t&&e){if(this.isFunction(e))return e(t);if(-1==e.indexOf("."))return t[e];{let i=e.split("."),r=t;for(let o=0,s=i.length;o=t.length&&(i%=t.length,e%=t.length),t.splice(i,0,t.splice(e,1)[0]))}static insertIntoOrderedArray(t,e,i,r){if(i.length>0){let o=!1;for(let s=0;se){i.splice(s,0,t),o=!0;break}o||i.push(t)}else i.push(t)}static findIndexInList(t,e){let i=-1;if(e)for(let r=0;r-1&&(t=t.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),t}static isEmpty(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length}static isNotEmpty(t){return!this.isEmpty(t)}static compare(t,e,i,r=1){let o=-1;const s=this.isEmpty(t),a=this.isEmpty(e);return o=s&&a?0:s?r:a?-r:"string"==typeof t&&"string"==typeof e?t.localeCompare(e,i,{numeric:!0}):te?1:0,o}static sort(t,e,i=1,r,o=1){return(1===o?i:o)*Lt.compare(t,e,r,i)}static merge(t,e){if(null!=t||null!=e)return null!=t&&"object"!=typeof t||null!=e&&"object"!=typeof e?null!=t&&"string"!=typeof t||null!=e&&"string"!=typeof e?e||t:[t||"",e||""].join(" "):{...t||{},...e||{}}}}var RL=0;function yM(){return"pr_id_"+ ++RL}var gs=function sZ(){let n=[];const r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(((o,s)=>{let a=n.length>0?n[n.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+1;return n.push({key:o,value:l}),l})(o,a)))},clear:o=>{o&&((o=>{n=n.filter(s=>s.value!==o)})(r(o)),o.style.zIndex="")},getCurrent:()=>n.length>0?n[n.length-1].value:0}}();const FL=["*"];var Cl=(()=>(function(n){n[n.ACCEPT=0]="ACCEPT",n[n.REJECT=1]="REJECT",n[n.CANCEL=2]="CANCEL"}(Cl||(Cl={})),Cl))();let Dl=(()=>{class n{constructor(){this.requireConfirmationSource=new le,this.acceptConfirmationSource=new le,this.requireConfirmation$=this.requireConfirmationSource.asObservable(),this.accept=this.acceptConfirmationSource.asObservable()}confirm(e){return this.requireConfirmationSource.next(e),this}close(){return this.requireConfirmationSource.next(null),this}onAccept(){this.acceptConfirmationSource.next(null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),hr=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),jL=(()=>{class n{constructor(){this.filters={startsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return Lt.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==Lt.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===Lt.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r),s=Lt.removeAccents(e.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(e,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Lt.removeAccents(e.toString()).toLocaleLowerCase(r)==Lt.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(e,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Lt.removeAccents(e.toString()).toLocaleLowerCase(r)==Lt.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(e,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=e&&(e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1]),lt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i),gt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>i.getTime():e>i),gte:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i),is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>null==i||null!=e&&e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>null==i||null!=e&&e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>null==i||null!=e&&e.getTime()null==i||null!=e&&e.getTime()>i.getTime()}}filter(e,i,r,o,s){let a=[];if(e)for(let l of e)for(let c of i){let u=Lt.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(e,i){this.filters[e]=i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),aZ=(()=>{class n{constructor(){this.messageSource=new le,this.clearSource=new le,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),lZ=(()=>{class n{constructor(){this.clickSource=new le,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Tl=(()=>{class n{constructor(){this.ripple=!1,this.overlayOptions={},this.filterMatchModeOptions={text:[hr.STARTS_WITH,hr.CONTAINS,hr.NOT_CONTAINS,hr.ENDS_WITH,hr.EQUALS,hr.NOT_EQUALS],numeric:[hr.EQUALS,hr.NOT_EQUALS,hr.LESS_THAN,hr.LESS_THAN_OR_EQUAL_TO,hr.GREATER_THAN,hr.GREATER_THAN_OR_EQUAL_TO],date:[hr.DATE_IS,hr.DATE_IS_NOT,hr.DATE_BEFORE,hr.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new le,this.translationObserver=this.translationSource.asObservable()}getTranslation(e){return this.translation[e]}setTranslation(e){this.translation={...this.translation,...e},this.translationSource.next(this.translation)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),_M=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-header"]],ngContentSelectors:FL,decls:1,vars:0,template:function(e,i){1&e&&(Wr(),Ii(0))},encapsulation:2}),n})(),Ev=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-footer"]],ngContentSelectors:FL,decls:1,vars:0,template:function(e,i){1&e&&(Wr(),Ii(0))},encapsulation:2}),n})(),Fi=(()=>{class n{constructor(e){this.template=e}getType(){return this.name}}return n.\u0275fac=function(e){return new(e||n)(I(Ro))},n.\u0275dir=we({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),Do=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[mn]}),n})(),ja=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),G=(()=>{class n{static addClass(e,i){e&&i&&(e.classList?e.classList.add(i):e.className+=" "+i)}static addMultipleClasses(e,i){if(e&&i)if(e.classList){let r=i.trim().split(" ");for(let o=0;o{if(m)return"relative"===getComputedStyle(m).getPropertyValue("position")?m:r(m.parentElement)},o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=i.offsetHeight,a=i.getBoundingClientRect(),l=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),u=this.getViewport(),h=r(e)?.getBoundingClientRect()||{top:-1*l,left:-1*c};let f,p;a.top+s+o.height>u.height?(f=a.top-h.top-o.height,e.style.transformOrigin="bottom",a.top+f<0&&(f=-1*a.top)):(f=s+a.top-h.top,e.style.transformOrigin="top"),p=o.width>u.width?-1*(a.left-h.left):a.left-h.left+o.width>u.width?-1*(a.left-h.left+o.width-u.width):a.left-h.left,e.style.top=f+"px",e.style.left=p+"px"}static absolutePosition(e,i){const r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=i.offsetHeight,l=i.offsetWidth,c=i.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),h=this.getViewport();let f,p;c.top+a+o>h.height?(f=c.top+u-o,e.style.transformOrigin="bottom",f<0&&(f=u)):(f=a+c.top+u,e.style.transformOrigin="top"),p=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,e.style.top=f+"px",e.style.left=p+"px"}static getParents(e,i=[]){return null===e.parentNode?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let r=this.getParents(e);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}9!==a.nodeType&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=e.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=e.scrollTop,h=e.clientHeight,f=this.getOuterHeight(i);u<0?e.scrollTop=d+u:u+f>h&&(e.scrollTop=d+u-h+f)}static fadeIn(e,i){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),e.style.opacity=r},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,i){var r=Element.prototype;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(e,i)}static getOuterWidth(e,i){let r=e.offsetWidth;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(e,i){let r=e.offsetHeight;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let e=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||o.clientWidth,height:e.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(e){var i=e.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,i){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,i){if(this.isElement(i))i.appendChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+e;i.el.nativeElement.appendChild(e)}}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+e+" from "+i;i.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,r){e[i].apply(e,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||null===e.offsetParent}static isVisible(e){return e&&null!=e.offsetParent}static isExist(e){return null!==e&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,i){e&&document.activeElement!==e&&e.focus(i)}static getFocusableElements(e){let i=n.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),r=[];for(let o of i)(o.offsetWidth||o.offsetHeight||o.getClientRects().length)&&r.push(o);return r}static getNextFocusableElement(e,i=!1){const r=n.getFocusableElements(e);let o=0;if(r&&r.length>0){const s=r.indexOf(r[0].ownerDocument.activeElement);i?o=-1==s||0===s?r.length-1:s-1:-1!=s&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(e,i){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:const r=typeof e;if("string"===r)return document.querySelector(e);if("object"===r&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;const s=(a=e)&&a.constructor&&a.call&&a.apply?e():e;return s&&9===s.nodeType||this.isExist(s)?s:null}var a}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class zL{constructor(t,e=(()=>{})){this.element=t,this.listener=e}bindScrollListener(){this.scrollableParents=G.getScrollableParents(this.element);for(let t=0;t{class n{constructor(e,i,r){this.el=e,this.zone=i,this.config=r}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(e){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(G.removeClass(i,"p-ink-active"),!G.getHeight(i)&&!G.getWidth(i)){let a=Math.max(G.getOuterWidth(this.el.nativeElement),G.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=G.getOffset(this.el.nativeElement),o=e.pageX-r.left+document.body.scrollTop-G.getWidth(i)/2,s=e.pageY-r.top+document.body.scrollLeft-G.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",G.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&G.removeClass(a,"p-ink-active")},401)}getInk(){const e=this.el.nativeElement.children;for(let i=0;i{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[mn]}),n})();const cZ=["headerchkbox"],uZ=["filter"];function dZ(n,t){1&n&&ft(0)}function hZ(n,t){if(1&n&&(E(0,"div",7),Ii(1),M(2,dZ,1,0,"ng-container",8),x()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.headerTemplate)}}const VL=function(n){return{"p-checkbox-disabled":n}},fZ=function(n,t,e){return{"p-highlight":n,"p-focus":t,"p-disabled":e}},BL=function(n){return{"pi pi-check":n}};function pZ(n,t){if(1&n){const e=Ue();E(0,"div",12)(1,"div",13)(2,"input",14),oe("focus",function(){return de(e),he(D(2).onHeaderCheckboxFocus())})("blur",function(){return de(e),he(D(2).onHeaderCheckboxBlur())})("keydown.space",function(r){return de(e),he(D(2).toggleAll(r))}),x()(),E(3,"div",15,16),oe("click",function(r){return de(e),he(D(2).toggleAll(r))}),_e(5,"span",17),x()()}if(2&n){const e=D(2);v("ngClass",bt(5,VL,e.disabled||e.toggleAllDisabled)),C(2),v("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),C(1),v("ngClass",fl(7,fZ,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),C(2),v("ngClass",bt(11,BL,e.allChecked))}}function mZ(n,t){1&n&&ft(0)}const gZ=function(n){return{options:n}};function yZ(n,t){if(1&n&&(dt(0),M(1,mZ,1,0,"ng-container",18),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",bt(2,gZ,e.filterOptions))}}function _Z(n,t){if(1&n){const e=Ue();E(0,"div",20)(1,"input",21,22),oe("input",function(r){return de(e),he(D(3).onFilter(r))}),x(),_e(3,"span",23),x()}if(2&n){const e=D(3);C(1),v("value",e.filterValue||"")("disabled",e.disabled),Tt("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function vZ(n,t){1&n&&M(0,_Z,4,4,"div",19),2&n&&v("ngIf",D(2).filter)}function bZ(n,t){if(1&n&&(E(0,"div",7),M(1,pZ,6,13,"div",9),M(2,yZ,2,4,"ng-container",10),M(3,vZ,1,1,"ng-template",null,11,$n),x()),2&n){const e=Tn(4),i=D();C(1),v("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),C(1),v("ngIf",i.filterTemplate)("ngIfElse",e)}}function wZ(n,t){if(1&n&&(E(0,"span"),Ne(1),x()),2&n){const e=D().$implicit,i=D(2);C(1),Et(i.getOptionGroupLabel(e)||"empty")}}function CZ(n,t){1&n&&ft(0)}function DZ(n,t){1&n&&ft(0)}const vM=function(n){return{$implicit:n}};function TZ(n,t){if(1&n&&(E(0,"li",25),M(1,wZ,2,1,"span",3),M(2,CZ,1,0,"ng-container",18),x(),M(3,DZ,1,0,"ng-container",18)),2&n){const e=t.$implicit,i=D(2),r=Tn(8);C(1),v("ngIf",!i.groupTemplate),C(1),v("ngTemplateOutlet",i.groupTemplate)("ngTemplateOutletContext",bt(5,vM,e)),C(1),v("ngTemplateOutlet",r)("ngTemplateOutletContext",bt(7,vM,i.getOptionGroupChildren(e)))}}function MZ(n,t){if(1&n&&(dt(0),M(1,TZ,4,9,"ng-template",24),ht()),2&n){const e=D();C(1),v("ngForOf",e.optionsToRender)}}function SZ(n,t){1&n&&ft(0)}function EZ(n,t){if(1&n&&(dt(0),M(1,SZ,1,0,"ng-container",18),ht()),2&n){const e=D(),i=Tn(8);C(1),v("ngTemplateOutlet",i)("ngTemplateOutletContext",bt(2,vM,e.optionsToRender))}}const xZ=function(n){return{"p-highlight":n}};function IZ(n,t){if(1&n&&(E(0,"div",12)(1,"div",28),_e(2,"span",17),x()()),2&n){const e=D().$implicit,i=D(2);v("ngClass",bt(3,VL,i.disabled||i.isOptionDisabled(e))),C(1),v("ngClass",bt(5,xZ,i.isSelected(e))),C(1),v("ngClass",bt(7,BL,i.isSelected(e)))}}function OZ(n,t){if(1&n&&(E(0,"span"),Ne(1),x()),2&n){const e=D().$implicit,i=D(2);C(1),Et(i.getOptionLabel(e))}}function AZ(n,t){1&n&&ft(0)}const kZ=function(n,t){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":t}},NZ=function(n,t){return{$implicit:n,index:t}};function PZ(n,t){if(1&n){const e=Ue();E(0,"li",27),oe("click",function(r){const s=de(e).$implicit;return he(D(2).onOptionClick(r,s))})("dblclick",function(r){const s=de(e).$implicit;return he(D(2).onOptionDoubleClick(r,s))})("touchend",function(){const o=de(e).$implicit;return he(D(2).onOptionTouchEnd(o))})("keydown",function(r){const s=de(e).$implicit;return he(D(2).onOptionKeyDown(r,s))}),M(1,IZ,3,9,"div",9),M(2,OZ,2,1,"span",3),M(3,AZ,1,0,"ng-container",18),x()}if(2&n){const e=t.$implicit,i=t.index,r=D(2);v("ngClass",mi(8,kZ,r.isSelected(e),r.isOptionDisabled(e))),Tt("tabindex",r.disabled||r.isOptionDisabled(e)?null:"0")("aria-label",r.getOptionLabel(e))("aria-selected",r.isSelected(e)),C(1),v("ngIf",r.checkbox&&r.multiple),C(1),v("ngIf",!r.itemTemplate),C(1),v("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",mi(11,NZ,e,i))}}function LZ(n,t){1&n&&M(0,PZ,4,14,"li",26),2&n&&v("ngForOf",t.$implicit)}function RZ(n,t){if(1&n&&(dt(0),Ne(1),ht()),2&n){const e=D(2);C(1),Ki(" ",e.emptyFilterMessageLabel," ")}}function FZ(n,t){1&n&&ft(0,null,30)}function jZ(n,t){if(1&n&&(E(0,"li",29),M(1,RZ,2,1,"ng-container",10),M(2,FZ,2,0,"ng-container",8),x()),2&n){const e=D();C(1),v("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),C(1),v("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function zZ(n,t){if(1&n&&(dt(0),Ne(1),ht()),2&n){const e=D(2);C(1),Ki(" ",e.emptyMessageLabel," ")}}function VZ(n,t){1&n&&ft(0,null,31)}function BZ(n,t){if(1&n&&(E(0,"li",29),M(1,zZ,2,1,"ng-container",10),M(2,VZ,2,0,"ng-container",8),x()),2&n){const e=D();C(1),v("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),C(1),v("ngTemplateOutlet",e.emptyTemplate)}}function UZ(n,t){1&n&&ft(0)}function HZ(n,t){if(1&n&&(E(0,"div",32),Ii(1,1),M(2,UZ,1,0,"ng-container",8),x()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.footerTemplate)}}const $Z=[[["p-header"]],[["p-footer"]]],WZ=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},GZ=["p-header","p-footer"],YZ={provide:xr,useExisting:Ut(()=>UL),multi:!0};let UL=(()=>{class n{constructor(e,i,r,o){this.el=e,this.cd=i,this.filterService=r,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new re,this.onClick=new re,this.onDblClick=new re,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(e){this._options=e,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.filterBy&&(this.filterOptions={filter:e=>this.onFilter(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template}})}getOptionLabel(e){return this.optionLabel?Lt.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Lt.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Lt.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Lt.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Lt.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(e,i):this.onOptionClickMultiple(e,i):this.onOptionClickSingle(e,i),this.onClick.emit({originalEvent:e,option:i,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(e){this.disabled||this.isOptionDisabled(e)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:e,option:i,value:this.value})}onOptionClickSingle(e,i){let r=this.isSelected(i),o=!1;!this.optionTouched&&this.metaKeySelection?r?(e.metaKey||e.ctrlKey)&&(this.value=null,o=!0):(this.value=this.getOptionValue(i),o=!0):(this.value=r?null:this.getOptionValue(i),o=!0),o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickMultiple(e,i){let r=this.isSelected(i),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=e.metaKey||e.ctrlKey;r?(a?this.removeOption(i):this.value=[this.getOptionValue(i)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(i)],o=!0)}else r?this.removeOption(i):this.value=[...this.value||[],this.getOptionValue(i)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickCheckbox(e,i){this.disabled||this.readonly||(this.isSelected(i)?this.removeOption(i):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(i)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}removeOption(e){this.value=this.value.filter(i=>!Lt.equals(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value)for(let o of this.value)if(Lt.equals(o,r,this.dataKey)){i=!0;break}}else i=Lt.equals(this.value,r,this.dataKey);return i}get allChecked(){let e=this.optionsToRender;if(!e||0===e.length)return!1;{let i=0,r=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of e)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?i++:r++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?i++:r++;else{if(!c)return!1;o++}}return s===i||s===o||o&&s===o+r+i}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(ja.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(ja.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilter(e){this._filterValue=e.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=(this.filterBy||this.optionLabel||"label").split(","),i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),e,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this._options.filter(e=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(e),this._filterValue,this.filterLocale));else this._filteredOptions=null}resetFilter(){this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this._filterValue=null,this._filteredOptions=null}get toggleAllDisabled(){let e=this.optionsToRender;if(!e||0===e.length)return!0;for(let i of e)if(!this.isOptionDisabled(i))return!1;return!0}toggleAll(e){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),e.preventDefault())}checkAll(){let i=[];this.optionsToRender.forEach(r=>{if(this.group){let o=this.getOptionGroupChildren(r);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&i.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(r);(!o||o&&this.isSelected(r))&&i.push(this.getOptionValue(r))}}),this.value=i}uncheckAll(){let i=[];this.optionsToRender.forEach(r=>{this.group?r.items&&r.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&i.push(this.getOptionValue(o))}):this.isOptionDisabled(r)&&this.isSelected(r)&&i.push(this.getOptionValue(r))}),this.value=i}onOptionKeyDown(e,i){if(this.readonly)return;let r=e.currentTarget;switch(e.which){case 40:var o=this.findNextItem(r);o&&o.focus(),e.preventDefault();break;case 38:var s=this.findPrevItem(r);s&&s.focus(),e.preventDefault();break;case 13:this.onOptionClick(e,i),e.preventDefault()}}findNextItem(e){let i=e.nextElementSibling;return i?G.hasClass(i,"p-disabled")||G.isHidden(i)||G.hasClass(i,"p-listbox-item-group")?this.findNextItem(i):i:null}findPrevItem(e){let i=e.previousElementSibling;return i?G.hasClass(i,"p-disabled")||G.isHidden(i)||G.hasClass(i,"p-listbox-item-group")?this.findPrevItem(i):i:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(I(Dt),I(Rn),I(jL),I(Tl))},n.\u0275cmp=Me({type:n,selectors:[["p-listbox"]],contentQueries:function(e,i,r){if(1&e&&(Hn(r,_M,5),Hn(r,Ev,5),Hn(r,Fi,4)),2&e){let o;Ge(o=Ye())&&(i.headerFacet=o.first),Ge(o=Ye())&&(i.footerFacet=o.first),Ge(o=Ye())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Zt(cZ,5),Zt(uZ,5)),2&e){let r;Ge(r=Ye())&&(i.headerCheckboxViewChild=r.first),Ge(r=Ye())&&(i.filterViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterBy:"filterBy",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Pt([YZ])],ngContentSelectors:GZ,decls:12,vars:18,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-empty-message",4,"ngIf"],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],["filter",""],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(e,i){1&e&&(Wr($Z),E(0,"div",0),M(1,hZ,3,1,"div",1),M(2,bZ,5,3,"div",1),E(3,"div",0)(4,"ul",2),M(5,MZ,2,1,"ng-container",3),M(6,EZ,2,4,"ng-container",3),M(7,LZ,1,1,"ng-template",null,4,$n),M(9,jZ,3,3,"li",5),M(10,BZ,3,3,"li",5),x()(),M(11,HZ,3,1,"div",6),x()),2&e&&(Ht(i.styleClass),v("ngClass",bt(16,WZ,i.disabled))("ngStyle",i.style),C(1),v("ngIf",i.headerFacet||i.headerTemplate),C(1),v("ngIf",i.checkbox&&i.multiple&&i.showToggleAll||i.filter),C(1),Ht(i.listStyleClass),v("ngClass","p-listbox-list-wrapper")("ngStyle",i.listStyle),C(1),Tt("aria-multiselectable",i.multiple),C(1),v("ngIf",i.group),C(1),v("ngIf",!i.group),C(3),v("ngIf",i.hasFilter()&&i.isEmpty()),C(1),v("ngIf",!i.hasFilter()&&i.isEmpty()),C(1),v("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[li,qr,Wt,Kr,Zi,Ml],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),bM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[mn,Do,Vs,Do]}),n})();function qZ(n,t){1&n&&ft(0)}const KZ=function(n,t,e,i){return{"p-button-icon":!0,"p-button-icon-left":n,"p-button-icon-right":t,"p-button-icon-top":e,"p-button-icon-bottom":i}};function QZ(n,t){if(1&n&&_e(0,"span",4),2&n){const e=D();Ht(e.loading?"p-button-loading-icon "+e.loadingIcon:e.icon),v("ngClass",zd(4,KZ,"left"===e.iconPos&&e.label,"right"===e.iconPos&&e.label,"top"===e.iconPos&&e.label,"bottom"===e.iconPos&&e.label)),Tt("aria-hidden",!0)}}function ZZ(n,t){if(1&n&&(E(0,"span",5),Ne(1),x()),2&n){const e=D();Tt("aria-hidden",e.icon&&!e.label),C(1),Et(e.label)}}function JZ(n,t){if(1&n&&(E(0,"span",4),Ne(1),x()),2&n){const e=D();Ht(e.badgeClass),v("ngClass",e.badgeStyleClass()),C(1),Et(e.badge)}}const XZ=function(n,t,e,i,r){return{"p-button p-component":!0,"p-button-icon-only":n,"p-button-vertical":t,"p-disabled":e,"p-button-loading":i,"p-button-loading-label-only":r}},eJ=["*"],Uc={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"};let To=(()=>{class n{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1,this._internalClasses=Object.values(Uc)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get htmlElement(){return this.el.nativeElement}ngAfterViewInit(){G.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){const e=[Uc.button,Uc.component];return this.icon&&!this.label&&Lt.isEmpty(this.htmlElement.textContent)&&e.push(Uc.iconOnly),this.loading&&(e.push(Uc.disabled,Uc.loading),!this.icon&&this.label&&e.push(Uc.labelOnly)),e}setStyleClass(){const e=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}createLabel(){if(this.label){let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",e.appendChild(document.createTextNode(this.label)),this.htmlElement.appendChild(e)}}createIcon(){if(this.icon||this.loading){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&G.addClass(e,i);let r=this.getIconClass();r&&G.addMultipleClasses(e,r),this.htmlElement.insertBefore(e,this.htmlElement.firstChild)}}updateLabel(){let e=G.findSingle(this.htmlElement,".p-button-label");this.label?e?e.textContent=this.label:this.createLabel():e&&this.htmlElement.removeChild(e)}updateIcon(){let e=G.findSingle(this.htmlElement,".p-button-icon");this.icon||this.loading?e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIcon():e&&this.htmlElement.removeChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}ngOnDestroy(){this.initialized=!1}}return n.\u0275fac=function(e){return new(e||n)(I(Dt))},n.\u0275dir=we({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),n})(),HL=(()=>{class n{constructor(){this.type="button",this.iconPos="left",this.loading=!1,this.loadingIcon="pi pi-spinner pi-spin",this.onClick=new re,this.onFocus=new re,this.onBlur=new re}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-button"]],contentQueries:function(e,i,r){if(1&e&&Hn(r,Fi,4),2&e){let o;Ge(o=Ye())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:eJ,decls:6,vars:17,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[3,"ngClass","class",4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass"],[1,"p-button-label"]],template:function(e,i){1&e&&(Wr(),E(0,"button",0),oe("click",function(o){return i.onClick.emit(o)})("focus",function(o){return i.onFocus.emit(o)})("blur",function(o){return i.onBlur.emit(o)}),Ii(1),M(2,qZ,1,0,"ng-container",1),M(3,QZ,1,9,"span",2),M(4,ZZ,2,2,"span",3),M(5,JZ,2,4,"span",2),x()),2&e&&(Ht(i.styleClass),v("ngStyle",i.style)("disabled",i.disabled||i.loading)("ngClass",function Tk(n,t,e,i,r,o,s,a){const l=Dr()+n,c=se(),u=Lo(c,l,e,i,r,o);return cr(c,l+4,s)||u?ks(c,l+5,a?t.call(a,e,i,r,o,s):t(e,i,r,o,s)):Xf(c,l+5)}(11,XZ,i.icon&&!i.label,("top"===i.iconPos||"bottom"===i.iconPos)&&i.label,i.disabled||i.loading,i.loading,i.loading&&!i.icon&&i.label)),Tt("type",i.type)("aria-label",i.ariaLabel),C(2),v("ngTemplateOutlet",i.contentTemplate),C(1),v("ngIf",!i.contentTemplate&&(i.icon||i.loading)),C(1),v("ngIf",!i.contentTemplate&&i.label),C(1),v("ngIf",!i.contentTemplate&&i.badge))},dependencies:[li,Wt,Kr,Zi,Ml],encapsulation:2,changeDetection:0}),n})(),Zr=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[mn,Vs]}),n})();function Jr(n){return n instanceof Dt?n.nativeElement:n}function xv(n,t,e,i){return k(e)&&(i=e,e=void 0),i?xv(n,t,e).pipe(fe(r=>R(r)?i(...r):i(r))):new Se(r=>{WL(n,t,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function WL(n,t,e,i,r){let o;if(function oJ(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(t,e,r),o=()=>s.removeEventListener(t,e,r)}else if(function rJ(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(t,e),o=()=>s.off(t,e)}else if(function iJ(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(t,e),o=()=>s.removeListener(t,e)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}});let lJ=1;const cJ=Promise.resolve(),Iv={};function YL(n){return n in Iv&&(delete Iv[n],!0)}const qL={setImmediate(n){const t=lJ++;return Iv[t]=!0,cJ.then(()=>YL(t)&&n()),t},clearImmediate(n){YL(n)}},wM=new class dJ extends ms{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++r0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=qL.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(qL.clearImmediate(e),t.scheduled=void 0)}}),nh=new ms(G_);class fJ{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new pJ(t,this.durationSelector))}}class pJ extends es{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let e;try{const{durationSelector:r}=this;e=r(t)}catch(r){return this.destination.error(r)}const i=dc(e,new Wn(this));!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){const{value:t,hasValue:e,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function CM(n){return!R(n)&&n-parseFloat(n)+1>=0}function KL(n=0,t,e){let i=-1;return CM(t)?i=Number(t)<1?1:Number(t):Mi(t)&&(e=t),Mi(e)||(e=nh),new Se(r=>{const o=CM(n)?n:+n-e.now();return e.schedule(mJ,o,{index:0,period:i,subscriber:r})})}function mJ(n){const{index:t,period:e,subscriber:i}=n;if(i.next(t),!i.closed){if(-1===e)return i.complete();n.index=t+1,this.schedule(n,e)}}let DM;try{DM=typeof Intl<"u"&&Intl.v8BreakIterator}catch{DM=!1}let Ap,TM,ZL=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function sG(n){return n===tP}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!DM)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(F(b_))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function kp(n){return function gJ(){if(null==Ap&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ap=!0}))}finally{Ap=Ap||!1}return Ap}()?n:!!n.capture}function XL(n){if(function yJ(){if(null==TM){const n=typeof document<"u"?document.head:null;TM=!(!n||!n.createShadowRoot&&!n.attachShadow)}return TM}()){const t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Av(n){return n.composedPath?n.composedPath()[0]:n.target}let wJ=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new le,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(function QL(n,t=nh){return function hJ(n){return function(e){return e.lift(new fJ(n))}}(()=>KL(n,t))}(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(F(ZL),F($t),F(Fn,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),CJ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();function El(){}function yn(n,t,e){return function(r){return r.lift(new UJ(n,t,e))}}class UJ{constructor(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}call(t,e){return e.subscribe(new HJ(t,this.nextOrObserver,this.error,this.complete))}}class HJ extends ne{constructor(t,e,i,r){super(t),this._tapNext=El,this._tapError=El,this._tapComplete=El,this._tapError=i||El,this._tapComplete=r||El,k(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||El,this._tapError=e.error||El,this._tapComplete=e.complete||El)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}function rh(n,t=nh){return e=>e.lift(new $J(n,t))}class $J{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new WJ(t,this.dueTime,this.scheduler))}}class WJ extends ne{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(GJ,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function GJ(n){n.debouncedNext()}class KJ{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new le,this._typeaheadSubscription=ae.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new le,this.change=new le,t instanceof cp&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(yn(e=>this._pressedLetters.push(e)),rh(t),gn(()=>this._pressedLetters.length>0),fe(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(on[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof cp?this._items.toArray():this._items}}class nR extends KJ{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}function oX(n){const{subscriber:t,counter:e,period:i}=n;t.next(e),this.schedule({subscriber:t,counter:e+1,period:i},i)}function sn(n){return t=>t.lift(new sX(n))}class sX{constructor(t){this.notifier=t}call(t,e){const i=new aX(t),r=dc(this.notifier,new Wn(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class aX extends es{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function MM(...n){return function lX(){return nl(1)}()(Le(...n))}const rR=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})();function It(n){return t=>0===n?Y_():t.lift(new cX(n))}class cX{constructor(t){if(this.total=t,this.total<0)throw new rR}call(t,e){return e.subscribe(new uX(t,this.total))}}class uX extends ne{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}function SM(n,t,e){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];r?n.setProperty(i,r,e?.has(i)?"important":""):n.removeProperty(i)}return n}function oh(n,t){const e=t?"":"none";SM(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function sR(n,t,e){SM(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Nv(n,t){return t&&"none"!=t?n+" "+t:n}function aR(n){const t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function EM(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function xM(n){const t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function IM(n,t,e){const{top:i,bottom:r,left:o,right:s}=n;return e>=i&&e<=r&&t>=o&&t<=s}function Np(n,t,e){n.top+=t,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function lR(n,t,e,i){const{top:r,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*t,d=c*t;return i>r-d&&ia-u&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:xM(e)})})}handleScroll(t){const e=Av(t),i=this.positions.get(e);if(!i)return null;const r=i.scrollPosition;let o,s;if(e===this._document){const c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=e.scrollTop,s=e.scrollLeft;const a=r.top-o,l=r.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&e!==u&&e.contains(u)&&Np(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function uR(n){const t=n.cloneNode(!0),e=t.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;roh(i,e)))}constructor(t,e,i,r,o,s){this._config=e,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new le,this._pointerMoveSubscription=ae.EMPTY,this._pointerUpSubscription=ae.EMPTY,this._scrollSubscription=ae.EMPTY,this._resizeSubscription=ae.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new le,this.started=new le,this.released=new le,this.ended=new le,this.entered=new le,this.exited=new le,this.dropped=new le,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!f)return void this._endDragSequence(a);(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const u=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,d=this._activeTransform;d.x=c.x-u.x+this._passiveTransform.x,d.y=c.y-u.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new cR(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>Jr(i)),this._handles.forEach(i=>oh(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=Jr(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,Pv),e.addEventListener("touchstart",this._pointerDown,pR),e.addEventListener("dragstart",this._nativeDragStart,Pv)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?Jr(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),oh(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),oh(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){Pp(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const i=this._rootElement,r=i.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();r.insertBefore(s,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),sR(i,!1,OM),this._document.body.appendChild(r.replaceChild(o,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),r=Pp(e),o=!r&&0!==e.button,s=this._rootElement,a=Av(e),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=r?function nX(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}(e):function tX(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(e);if(a&&a.draggable&&"mousedown"===e.type&&e.preventDefault(),i||o||l||c)return;if(this._handles.length){const h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=xM(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,t,e);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){sR(this._rootElement,!0,OM),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),o=this._getDragDistance(r),s=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,t,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let r;if(i&&t){const o=t.matchSize?this._initialClientRect:null,s=t.viewContainer.createEmbeddedView(i,t.context);s.detectChanges(),r=gR(s,this._document),this._previewRef=s,t.matchSize?yR(r,o):r.style.transform=Lv(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=uR(this._rootElement),yR(r,this._initialClientRect),this._initialTransform&&(r.style.transform=this._initialTransform);return SM(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},OM),oh(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>r.classList.add(o)):r.classList.add(e)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);const e=function mX(n){const t=getComputedStyle(n),e=EM(t,"transition-property"),i=e.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=e.indexOf(i),o=EM(t,"transition-duration"),s=EM(t,"transition-delay");return aR(o[r])+aR(s[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=s=>{(!s||Av(s)===this._preview&&"transform"===s.propertyName)&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,1.5*e);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=gR(this._placeholderRef,this._document)):i=uR(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e,i){const r=e===this._rootElement?null:e,o=r?r.getBoundingClientRect():t,s=Pp(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:o.left-t.left+(s.pageX-o.left-a.left),y:o.top-t.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=Pp(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=i.pageX-e.left,o=i.pageY-e.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialClientRect,this._pickupPositionInElement):t;if("x"===this.lockAxis||"x"===e?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),u=a.top+s,d=a.bottom-(c-s);i=mR(i,a.left+o,a.right-(l-o)),r=mR(r,u,d)}return{x:i,y:r}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,oh(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,Pv),t.removeEventListener("touchstart",this._pointerDown,pR),t.removeEventListener("dragstart",this._nativeDragStart,Pv)}_applyRootElementTransform(t,e){const i=Lv(t,e),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Nv(i,this._initialTransform)}_applyPreviewTransform(t,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,r=Lv(t,e);this._preview.style.transform=Nv(r,i)}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(o>0&&(t+=o),s>0&&(t-=s)):t=0,r.height>i.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:Pp(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=Av(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Np(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=XL(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){const i=this._previewContainer||"global";if("parent"===i)return t;if("global"===i){const r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Jr(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}}function Lv(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function mR(n,t,e){return Math.max(t,Math.min(e,n))}function Pp(n){return"t"===n.type[0]}function gR(n,t){const e=n.rootNodes;if(1===e.length&&e[0].nodeType===t.ELEMENT_NODE)return e[0];const i=t.createElement("div");return e.forEach(r=>i.appendChild(r)),i}function yR(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=Lv(t.left,t.top)}function Lp(n,t){return Math.max(0,Math.min(t,n))}class bX{constructor(t,e){this._element=t,this._dragDropRegistry=e,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(t){this.withItems(t)}sort(t,e,i,r){const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,i,r);if(-1===s&&o.length>0)return null;const a="horizontal"===this.orientation,l=o.findIndex(g=>g.drag===t),c=o[s],d=c.clientRect,h=l>s?1:-1,f=this._getItemOffsetPx(o[l].clientRect,d,h),p=this._getSiblingOffsetPx(l,o,h),m=o.slice();return function vX(n,t,e){const i=Lp(t,n.length-1),r=Lp(e,n.length-1);if(i===r)return;const o=n[i],s=r{if(m[y]===g)return;const b=g.drag===t,w=b?f:p,_=b?t.getPlaceholderElement():g.drag.getRootElement();g.offset+=w,a?(_.style.transform=Nv(`translate3d(${Math.round(g.offset)}px, 0, 0)`,g.initialTransform),Np(g.clientRect,0,w)):(_.style.transform=Nv(`translate3d(0, ${Math.round(g.offset)}px, 0)`,g.initialTransform),Np(g.clientRect,w,0))}),this._previousSwap.overlaps=IM(d,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(t,e,i,r){const o=null==r||r<0?this._getItemIndexFromPointerPosition(t,e,i):r,s=this._activeDraggables,a=s.indexOf(t),l=t.getPlaceholderElement();let c=s[o];if(c===t&&(c=s[o+1]),!c&&(null==o||-1===o||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const u=c.getRootElement();u.parentElement.insertBefore(l,u),s.splice(o,0,t)}else Jr(this._element).appendChild(l),s.push(t);l.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables.forEach(t=>{const e=t.getRootElement();if(e){const i=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{Np(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const t="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:xM(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(t,e,i){const r="horizontal"===this.orientation;let o=r?e.left-t.left:e.top-t.top;return-1===i&&(o+=r?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,i){const r="horizontal"===this.orientation,o=e[t].clientRect,s=e[t+-1*i];let a=o[r?"width":"height"]*i;if(s){const l=r?"left":"top",c=r?"right":"bottom";-1===i?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,r="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const s=i[i.length-1].clientRect;return r?t>=s.right:e>=s.bottom}{const s=i[0].clientRect;return r?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,i,r){const o="horizontal"===this.orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>a!==t&&((!r||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(o?r.x:r.y)!==this._previousSwap.delta)&&(o?e>=Math.floor(l.left)&&e=Math.floor(l.top)&&i!0,this.sortPredicate=()=>!0,this.beforeStarted=new le,this.entered=new le,this.exited=new le,this.dropped=new le,this.sorted=new le,this.receivingStarted=new le,this.receivingStopped=new le,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=ae.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new le,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function rX(n=0,t=nh){return(!CM(n)||n<0)&&(n=0),(!t||"function"!=typeof t.schedule)&&(t=nh),new Se(e=>(e.add(t.schedule(oX,n,{subscriber:e,counter:0,period:n})),e))}(0,GL).pipe(sn(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=Jr(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new cR(i),this._sortStrategy=new bX(this.element,e),this._sortStrategy.withSortPredicate((s,a)=>this.sortPredicate(s,a,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,r,o,s,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>-1===t.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._sortStrategy.direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._sortStrategy.orientation=t,this}withScrollableParents(t){const e=Jr(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,r){if(this.sortingDisabled||!this._clientRect||!lR(this._clientRect,.05,e,i))return;const o=this._sortStrategy.sort(t,e,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,r=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||lR(s.clientRect,.05,t,e)&&([r,o]=function CX(n,t,e,i){const r=bR(t,i),o=wR(t,e);let s=0,a=0;if(r){const l=n.scrollTop;1===r?l>0&&(s=1):n.scrollHeight-l>n.clientHeight&&(s=2)}if(o){const l=n.scrollLeft;1===o?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,t,e),(r||o)&&(i=a))}),!r&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};r=bR(l,e),o=wR(l,t),i=window}i&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=i,(r||o)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const t=Jr(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=Jr(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_reset(){this._isDragging=!1;const t=Jr(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(t,e){return null!=this._clientRect&&IM(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(r=>r._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!IM(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const r=this._getShadowRoot().elementFromPoint(e,i);if(!r)return!1;const o=Jr(this.element);return r===o||o.contains(r)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=XL(Jr(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function bR(n,t){const{top:e,bottom:i,height:r}=n,o=.05*r;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}function wR(n,t){const{left:e,right:i,width:r}=n,o=.05*r;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}const Rv=kp({passive:!1,capture:!0});let DX=(()=>{class n{constructor(e,i){this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new le,this.pointerUp=new le,this.scroll=new le,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=i}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,Rv)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,Rv)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),1===this._activeDragInstances.length)){const r=i.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:Rv}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:Rv}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new Se(r=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&r.next(a)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),Cs(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(e){return new(e||n)(F($t),F(Fn))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const TX={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let AM=(()=>{class n{constructor(e,i,r,o){this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=o}createDrag(e,i=TX){return new _X(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new wX(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(e){return new(e||n)(F(Fn),F($t),F(wJ),F(DX))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),SR=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:[AM],imports:[CJ]}),n})(),LM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[mn,Zr,Do,Vs,SR,Do,SR]}),n})();const YX=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo=","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMiAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjY1NjIgMTZWMTUuMDE1NkwxNy45Mjk3IDE0Ljc5NjlWMTMuMzc1SDEyLjgyMDNWMTIuNTA3OEwxNy44MzU5IDQuNjI1SDE5LjQ2MDlWMTIuMTcxOUgyMS4wMzEyVjEzLjM3NUgxOS40NjA5VjE0Ljc5NjlMMjAuNzM0NCAxNS4wMTU2VjE2SDE2LjY1NjJaTTE0LjQ2MDkgMTIuMTcxOUgxNy45Mjk3VjYuODIwMzFMMTcuODgyOCA2LjgwNDY5TDE3LjcyNjYgNy4yMTg3NUwxNC40NjA5IDEyLjE3MTlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjQwNjIgMTYuMTY0MUMxNS43NjU2IDE2LjE2NDEgMTUuMTkwMSAxNi4wNDY5IDE0LjY3OTcgMTUuODEyNUMxNC4xNzQ1IDE1LjU3ODEgMTMuNzc4NiAxNS4yMzE4IDEzLjQ5MjIgMTQuNzczNEMxMy4yMDU3IDE0LjMwOTkgMTMuMDcwMyAxMy43MzcgMTMuMDg1OSAxMy4wNTQ3TDEzLjEwMTYgMTMuMDA3OEgxNC40OTIyQzE0LjQ5MjIgMTMuNjIyNCAxNC42NjkzIDE0LjEwMTYgMTUuMDIzNCAxNC40NDUzQzE1LjM4MjggMTQuNzg5MSAxNS44NDM4IDE0Ljk2MDkgMTYuNDA2MiAxNC45NjA5QzE3LjA1NzMgMTQuOTYwOSAxNy41NjI1IDE0LjczMTggMTcuOTIxOSAxNC4yNzM0QzE4LjI4MTIgMTMuODE1MSAxOC40NjA5IDEzLjE4NzUgMTguNDYwOSAxMi4zOTA2QzE4LjQ2MDkgMTEuNjU2MiAxOC4yNzg2IDExLjA1NzMgMTcuOTE0MSAxMC41OTM4QzE3LjU1NDcgMTAuMTI1IDE3LjA1NDcgOS44OTA2MiAxNi40MTQxIDkuODkwNjJDMTUuODA5OSA5Ljg5MDYyIDE1LjM2OTggOS45ODE3NyAxNS4wOTM4IDEwLjE2NDFDMTQuODIyOSAxMC4zNDY0IDE0LjYyNSAxMC42MjUgMTQuNSAxMUwxMy4yMTg4IDEwLjg2NzJMMTMuODc1IDQuNjI1SDE5Ljg4MjhWNi44NzVIMTguNzI2NkwxOC41NzgxIDUuOTkyMTlIMTUuMTc5N0wxNC44MTI1IDkuMTg3NUMxNC45Njg4IDkuMDY3NzEgMTUuMTM4IDguOTYzNTQgMTUuMzIwMyA4Ljg3NUMxNS41MDI2IDguNzgxMjUgMTUuNzAwNSA4LjcwNTczIDE1LjkxNDEgOC42NDg0NEMxNi4xMzI4IDguNTkxMTUgMTYuMzY5OCA4LjU1OTkgMTYuNjI1IDguNTU0NjlDMTcuMzIyOSA4LjU0OTQ4IDE3LjkyNDUgOC43MDMxMiAxOC40Mjk3IDkuMDE1NjJDMTguOTM0OSA5LjMyMjkyIDE5LjMyMjkgOS43NjU2MiAxOS41OTM4IDEwLjM0MzhDMTkuODY0NiAxMC45MTY3IDIwIDExLjU5MzggMjAgMTIuMzc1QzIwIDEzLjEzNTQgMTkuODYyIDEzLjc5OTUgMTkuNTg1OSAxNC4zNjcyQzE5LjMxNTEgMTQuOTM0OSAxOC45MTE1IDE1LjM3NzYgMTguMzc1IDE1LjY5NTNDMTcuODQzOCAxNi4wMDc4IDE3LjE4NzUgMTYuMTY0MSAxNi40MDYyIDE2LjE2NDFaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMSAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE3LjEyNSAxNi4xNjQxQzE2LjM4NTQgMTYuMTY0MSAxNS43MjQgMTUuOTg0NCAxNS4xNDA2IDE1LjYyNUMxNC41NjI1IDE1LjI2MDQgMTQuMTA2OCAxNC43MzE4IDEzLjc3MzQgMTQuMDM5MUMxMy40NDAxIDEzLjM0NjQgMTMuMjczNCAxMi41MDc4IDEzLjI3MzQgMTEuNTIzNFY5Ljk5MjE5QzEzLjI3MzQgOC43ODkwNiAxMy40NTMxIDcuNzc4NjUgMTMuODEyNSA2Ljk2MDk0QzE0LjE3NzEgNi4xMzgwMiAxNC42NzcxIDUuNTE1NjIgMTUuMzEyNSA1LjA5Mzc1QzE1Ljk1MzEgNC42NzE4OCAxNi42ODc1IDQuNDYwOTQgMTcuNTE1NiA0LjQ2MDk0QzE3LjkwMSA0LjQ2MDk0IDE4LjI4MzkgNC41MDUyMSAxOC42NjQxIDQuNTkzNzVDMTkuMDQ5NSA0LjY4MjI5IDE5LjM2NzIgNC43OTQyNyAxOS42MTcyIDQuOTI5NjlMMTkuMzIwMyA2LjA3ODEyQzE5LjA3NTUgNS45NTgzMyAxOC44MDczIDUuODYxOTggMTguNTE1NiA1Ljc4OTA2QzE4LjIyNCA1LjcxMDk0IDE3Ljg5MDYgNS42NzE4OCAxNy41MTU2IDUuNjcxODhDMTYuNzE4OCA1LjY3MTg4IDE2LjA4MzMgNS45NzM5NiAxNS42MDk0IDYuNTc4MTJDMTUuMTQwNiA3LjE3NzA4IDE0Ljg5MDYgOC4wODMzMyAxNC44NTk0IDkuMjk2ODhMMTQuODkwNiA5LjMyODEyQzE1LjE4MjMgOS4wNTcyOSAxNS41MzkxIDguODQzNzUgMTUuOTYwOSA4LjY4NzVDMTYuMzgyOCA4LjUyNjA0IDE2LjgzODUgOC40NDUzMSAxNy4zMjgxIDguNDQ1MzFDMTguMDA1MiA4LjQ0NTMxIDE4LjU5MzggOC42MDY3NyAxOS4wOTM4IDguOTI5NjlDMTkuNTkzOCA5LjI0NzQgMTkuOTc5MiA5LjY4NzUgMjAuMjUgMTAuMjVDMjAuNTI2IDEwLjgxMjUgMjAuNjY0MSAxMS40NTMxIDIwLjY2NDEgMTIuMTcxOUMyMC42NjQxIDEyLjk1ODMgMjAuNTE4MiAxMy42NTEgMjAuMjI2NiAxNC4yNUMxOS45MzQ5IDE0Ljg0OSAxOS41MjM0IDE1LjMxNzcgMTguOTkyMiAxNS42NTYyQzE4LjQ2MDkgMTUuOTk0OCAxNy44Mzg1IDE2LjE2NDEgMTcuMTI1IDE2LjE2NDFaTTE3LjEyNSAxNC45NjA5QzE3LjU0NjkgMTQuOTYwOSAxNy45MDYyIDE0LjgzODUgMTguMjAzMSAxNC41OTM4QzE4LjUgMTQuMzQ5IDE4LjcyNjYgMTQuMDE1NiAxOC44ODI4IDEzLjU5MzhDMTkuMDQ0MyAxMy4xNzE5IDE5LjEyNSAxMi42OTc5IDE5LjEyNSAxMi4xNzE5QzE5LjEyNSAxMS40MjE5IDE4LjkzNDkgMTAuODA0NyAxOC41NTQ3IDEwLjMyMDNDMTguMTc5NyA5LjgzNTk0IDE3LjY1ODkgOS41OTM3NSAxNi45OTIyIDkuNTkzNzVDMTYuNjQzMiA5LjU5Mzc1IDE2LjMyNTUgOS42NDMyMyAxNi4wMzkxIDkuNzQyMTlDMTUuNzU3OCA5LjgzNTk0IDE1LjUxMyA5Ljk3MTM1IDE1LjMwNDcgMTAuMTQ4NEMxNS4xMDE2IDEwLjMyMDMgMTQuOTM0OSAxMC41MjM0IDE0LjgwNDcgMTAuNzU3OFYxMS42NzE5QzE0LjgwNDcgMTIuNzI5MiAxNS4wMjM0IDEzLjU0MTcgMTUuNDYwOSAxNC4xMDk0QzE1LjkwMzYgMTQuNjc3MSAxNi40NTgzIDE0Ljk2MDkgMTcuMTI1IDE0Ljk2MDlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"],iee=new yT(document),ER=[...Array(6).keys()].map(n=>{const t=n+1;return{label:`Heading ${t}`,icon:Bs(YX[n]||""),id:`heading${t}`,attributes:{level:t}}}),RM={label:"Paragraph",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},xR=[{label:"List Ordered",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"}],aee=[{label:"AI Content",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K"),id:"aiContentPrompt"},{label:"AI Image",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg=="),id:"aiImagePrompt"},{label:"Blockquote",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:Bs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalRule"}];function Bs(n){return iee.bypassSecurityTrustUrl(n)}const Fv=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"},...ER,{label:"Table",icon:"table_view",id:"table"},...xR,...aee,RM],lee=[...ER,RM,...xR],cee=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}],dee={horizontalRule:!0,table:!0,image:!0,video:!0},hee=[...Fv.filter(n=>!dee[n.id])],IR=function({type:n,editor:t,range:e,suggestionKey:i,ItemsType:r}){const o={to:e.to+i.getState(t.view.state).query?.length,from:n===r.BLOCK?e.from:e.from+1};t.chain().deleteRange(o).run()},OR={duration:[250,0],interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},fee=["content"];function pee(n,t){1&n&&ft(0)}function mee(n,t){if(1&n&&(E(0,"div",10),M(1,pee,1,0,"ng-container",11),x()),2&n){const e=D(3);C(1),v("ngTemplateOutlet",e.headerTemplate)}}function gee(n,t){if(1&n&&(E(0,"span",15),Ne(1),x()),2&n){const e=D(4);C(1),Et(e.option("header"))}}const yee=function(){return{"p-dialog-header-icon p-dialog-header-close p-link":!0}};function _ee(n,t){if(1&n){const e=Ue();E(0,"button",16),oe("click",function(r){return de(e),he(D(4).close(r))})("keydown.enter",function(r){return de(e),he(D(4).close(r))}),_e(1,"span",17),x()}2&n&&v("ngClass",Qi(1,yee))}function vee(n,t){if(1&n&&(E(0,"div",10),M(1,gee,2,1,"span",12),E(2,"div",13),M(3,_ee,2,2,"button",14),x()()),2&n){const e=D(3);C(1),v("ngIf",e.option("header")),C(2),v("ngIf",e.closable)}}function bee(n,t){1&n&&_e(0,"i",1),2&n&&(Ht(D(3).option("icon")),v("ngClass","p-confirm-dialog-icon"))}function wee(n,t){1&n&&ft(0)}function Cee(n,t){if(1&n&&(E(0,"div",18),Ii(1),M(2,wee,1,0,"ng-container",11),x()),2&n){const e=D(3);C(2),v("ngTemplateOutlet",e.footerTemplate)}}function Dee(n,t){if(1&n){const e=Ue();E(0,"button",20),oe("click",function(){return de(e),he(D(4).reject())}),x()}if(2&n){const e=D(4);Ht(e.option("rejectButtonStyleClass")),v("icon",e.option("rejectIcon"))("label",e.rejectButtonLabel)("ngClass","p-confirm-dialog-reject"),Tt("aria-label",e.rejectAriaLabel)}}function Tee(n,t){if(1&n){const e=Ue();E(0,"button",20),oe("click",function(){return de(e),he(D(4).accept())}),x()}if(2&n){const e=D(4);Ht(e.option("acceptButtonStyleClass")),v("icon",e.option("acceptIcon"))("label",e.acceptButtonLabel)("ngClass","p-confirm-dialog-accept"),Tt("aria-label",e.acceptAriaLabel)}}function Mee(n,t){if(1&n&&(E(0,"div",18),M(1,Dee,1,6,"button",19),M(2,Tee,1,6,"button",19),x()),2&n){const e=D(3);C(1),v("ngIf",e.option("rejectVisible")),C(1),v("ngIf",e.option("acceptVisible"))}}const See=function(n){return{"p-dialog p-confirm-dialog p-component":!0,"p-dialog-rtl":n}},Eee=function(n,t){return{transform:n,transition:t}},xee=function(n){return{value:"visible",params:n}};function Iee(n,t){if(1&n){const e=Ue();E(0,"div",3),oe("@animation.start",function(r){return de(e),he(D(2).onAnimationStart(r))})("@animation.done",function(r){return de(e),he(D(2).onAnimationEnd(r))}),M(1,mee,2,1,"div",4),M(2,vee,4,2,"div",4),E(3,"div",5,6),M(5,bee,1,3,"i",7),_e(6,"span",8),x(),M(7,Cee,3,1,"div",9),M(8,Mee,3,2,"div",9),x()}if(2&n){const e=D(2);Ht(e.styleClass),v("ngClass",bt(11,See,e.rtl))("ngStyle",e.style)("@animation",bt(16,xee,mi(13,Eee,e.transformOptions,e.transitionOptions))),C(1),v("ngIf",e.headerTemplate),C(1),v("ngIf",!e.headerTemplate),C(3),v("ngIf",e.option("icon")),C(1),v("innerHTML",e.option("message"),ul),C(1),v("ngIf",e.footer||e.footerTemplate),C(1),v("ngIf",!e.footer&&!e.footerTemplate)}}function Oee(n,t){if(1&n&&(E(0,"div",1),M(1,Iee,9,18,"div",2),x()),2&n){const e=D();Ht(e.maskStyleClass),v("ngClass",e.getMaskClass()),C(1),v("ngIf",e.visible)}}const Aee=[[["p-footer"]]],kee=["p-footer"],Nee=Xd([ui({transform:"{{transform}}",opacity:0}),La("{{transition}}",ui({transform:"none",opacity:1}))]),Pee=Xd([La("{{transition}}",ui({transform:"{{transform}}",opacity:0}))]);let AR=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.confirmationService=r,this.zone=o,this.cd=s,this.config=a,this.acceptIcon="pi pi-check",this.acceptVisible=!0,this.rejectIcon="pi pi-times",this.rejectVisible=!0,this.closeOnEscape=!0,this.blockScroll=!0,this.closable=!0,this.autoZIndex=!0,this.baseZIndex=0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.focusTrap=!0,this.defaultFocus="accept",this.onHide=new re,this._position="center",this.transformOptions="scale(0.7)",this.id=yM(),this.subscription=this.confirmationService.requireConfirmation$.subscribe(l=>{l?l.key===this.key&&(this.confirmation=l,this.confirmationOptions={message:this.confirmation.message||this.message,icon:this.confirmation.icon||this.icon,header:this.confirmation.header||this.header,rejectVisible:null==this.confirmation.rejectVisible?this.rejectVisible:this.confirmation.rejectVisible,acceptVisible:null==this.confirmation.acceptVisible?this.acceptVisible:this.confirmation.acceptVisible,acceptLabel:this.confirmation.acceptLabel||this.acceptLabel,rejectLabel:this.confirmation.rejectLabel||this.rejectLabel,acceptIcon:this.confirmation.acceptIcon||this.acceptIcon,rejectIcon:this.confirmation.rejectIcon||this.rejectIcon,acceptButtonStyleClass:this.confirmation.acceptButtonStyleClass||this.acceptButtonStyleClass,rejectButtonStyleClass:this.confirmation.rejectButtonStyleClass||this.rejectButtonStyleClass,defaultFocus:this.confirmation.defaultFocus||this.defaultFocus,blockScroll:!1===this.confirmation.blockScroll||!0===this.confirmation.blockScroll?this.confirmation.blockScroll:this.blockScroll,closeOnEscape:!1===this.confirmation.closeOnEscape||!0===this.confirmation.closeOnEscape?this.confirmation.closeOnEscape:this.closeOnEscape,dismissableMask:!1===this.confirmation.dismissableMask||!0===this.confirmation.dismissableMask?this.confirmation.dismissableMask:this.dismissableMask},this.confirmation.accept&&(this.confirmation.acceptEvent=new re,this.confirmation.acceptEvent.subscribe(this.confirmation.accept)),this.confirmation.reject&&(this.confirmation.rejectEvent=new re,this.confirmation.rejectEvent.subscribe(this.confirmation.reject)),this.visible=!0):this.hide()})}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0),this.cd.markForCheck()}get position(){return this._position}set position(e){switch(this._position=e,e){case"top-left":case"bottom-left":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"top-right":case"bottom-right":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngOnInit(){this.breakpoints&&this.createStyle(),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.visible&&this.cd.markForCheck()})}option(e){const i=this.confirmationOptions||this;if(i.hasOwnProperty(e))return i[e]}onAnimationStart(e){if("visible"===e.toState){this.container=e.element,this.wrapper=this.container.parentElement,this.contentContainer=G.findSingle(this.container,".p-dialog-content"),this.container.setAttribute(this.id,""),this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.enableModality();const i=this.getElementToFocus();i&&i.focus()}}onAnimationEnd(e){"void"===e.toState&&this.onOverlayHide()}getElementToFocus(){switch(this.option("defaultFocus")){case"accept":default:return G.findSingle(this.container,".p-confirm-dialog-accept");case"reject":return G.findSingle(this.container,".p-confirm-dialog-reject");case"close":return G.findSingle(this.container,".p-dialog-header-close");case"none":return null}}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):G.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.wrapper&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}enableModality(){this.option("blockScroll")&&G.addClass(document.body,"p-overflow-hidden"),this.option("dismissableMask")&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)}))}disableModality(){this.maskVisible=!1,this.option("blockScroll")&&G.removeClass(document.body,"p-overflow-hidden"),this.dismissableMask&&this.unbindMaskClickListener(),this.container&&!this.cd.destroyed&&this.cd.detectChanges()}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let i in this.breakpoints)e+=`\n @media screen and (max-width: ${i}) {\n .p-dialog[${this.id}] {\n width: ${this.breakpoints[i]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}}close(e){this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(Cl.CANCEL),this.hide(Cl.CANCEL),e.preventDefault()}hide(e){this.onHide.emit(e),this.visible=!1,this.confirmation=null,this.confirmationOptions=null}moveOnTop(){this.autoZIndex&&(gs.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}getMaskClass(){let e={"p-dialog-mask p-component-overlay":!0,"p-dialog-mask-scrollblocker":this.blockScroll};return e[this.getPositionClass().toString()]=!0,e}getPositionClass(){const i=["left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find(r=>r===this.position);return i?`p-dialog-${i}`:""}bindGlobalListeners(){(this.option("closeOnEscape")&&this.closable||this.focusTrap&&!this.documentEscapeListener)&&(this.documentEscapeListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","keydown",i=>{if(27==i.which&&this.option("closeOnEscape")&&this.closable&&parseInt(this.container.style.zIndex)===gs.get(this.container)&&this.visible&&this.close(i),9===i.which&&this.focusTrap){i.preventDefault();let r=G.getFocusableElements(this.container);if(r&&r.length>0)if(r[0].ownerDocument.activeElement){let o=r.indexOf(r[0].ownerDocument.activeElement);i.shiftKey?-1==o||0===o?r[r.length-1].focus():r[o-1].focus():-1==o||o===r.length-1?r[0].focus():r[o+1].focus()}else r[0].focus()}}))}unbindGlobalListeners(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}onOverlayHide(){this.container&&this.autoZIndex&&gs.clear(this.container),this.disableModality(),this.unbindGlobalListeners(),this.container=null}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.restoreAppend(),this.onOverlayHide(),this.subscription.unsubscribe(),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.destroyStyle()}accept(){this.confirmation&&this.confirmation.acceptEvent&&this.confirmation.acceptEvent.emit(),this.hide(Cl.ACCEPT)}reject(){this.confirmation&&this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(Cl.REJECT),this.hide(Cl.REJECT)}get acceptButtonLabel(){return this.option("acceptLabel")||this.config.getTranslation(ja.ACCEPT)}get rejectButtonLabel(){return this.option("rejectLabel")||this.config.getTranslation(ja.REJECT)}}return n.\u0275fac=function(e){return new(e||n)(I(Dt),I(lr),I(Dl),I($t),I(Rn),I(Tl))},n.\u0275cmp=Me({type:n,selectors:[["p-confirmDialog"]],contentQueries:function(e,i,r){if(1&e&&(Hn(r,Ev,5),Hn(r,Fi,4)),2&e){let o;Ge(o=Ye())&&(i.footer=o.first),Ge(o=Ye())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&Zt(fee,5),2&e){let r;Ge(r=Ye())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",icon:"icon",message:"message",style:"style",styleClass:"styleClass",maskStyleClass:"maskStyleClass",acceptIcon:"acceptIcon",acceptLabel:"acceptLabel",acceptAriaLabel:"acceptAriaLabel",acceptVisible:"acceptVisible",rejectIcon:"rejectIcon",rejectLabel:"rejectLabel",rejectAriaLabel:"rejectAriaLabel",rejectVisible:"rejectVisible",acceptButtonStyleClass:"acceptButtonStyleClass",rejectButtonStyleClass:"rejectButtonStyleClass",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",blockScroll:"blockScroll",rtl:"rtl",closable:"closable",appendTo:"appendTo",key:"key",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",transitionOptions:"transitionOptions",focusTrap:"focusTrap",defaultFocus:"defaultFocus",breakpoints:"breakpoints",visible:"visible",position:"position"},outputs:{onHide:"onHide"},ngContentSelectors:kee,decls:1,vars:1,consts:[[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],[3,"ngClass","ngStyle","class",4,"ngIf"],[3,"ngClass","ngStyle"],["class","p-dialog-header",4,"ngIf"],[1,"p-dialog-content"],["content",""],[3,"ngClass","class",4,"ngIf"],[1,"p-confirm-dialog-message",3,"innerHTML"],["class","p-dialog-footer",4,"ngIf"],[1,"p-dialog-header"],[4,"ngTemplateOutlet"],["class","p-dialog-title",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title"],["type","button",3,"ngClass","click","keydown.enter"],[1,"pi","pi-times"],[1,"p-dialog-footer"],["type","button","pRipple","","pButton","",3,"icon","label","ngClass","class","click",4,"ngIf"],["type","button","pRipple","","pButton","",3,"icon","label","ngClass","click"]],template:function(e,i){1&e&&(Wr(Aee),M(0,Oee,2,4,"div",0)),2&e&&v("ngIf",i.maskVisible)},dependencies:[li,Wt,Kr,Zi,To,Ml],styles:[".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}\n"],encapsulation:2,data:{animation:[Mp("animation",[Ra("void => visible",[eh(Nee)]),Ra("visible => void",[eh(Pee)])])]},changeDetection:0}),n})(),kR=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[mn,Zr,Vs,Zr,Do]}),n})();function Ie(...n){const t=n.length;if(0===t)throw new Error("list of properties cannot be empty.");return e=>fe(function Lee(n,t){return i=>{let r=i;for(let o=0;oe?r[e]:null}return i}camelize(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,i)=>0===i?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")}titleCase(t){return`${t.charAt(0).toLocaleUpperCase()}${t.slice(1)}`}}$c.\u0275fac=function(t){return new(t||$c)},$c.\u0275prov=H({token:$c,factory:$c.\u0275fac});class Fee{getQueryParams(){const t=window.location.search.substring(1).split("&"),e=new Map;return t.forEach(i=>{const r=i.split("=");e.set(r[0],r[1])}),e}getQueryStringParam(t){let e=null;const r=new RegExp("[?&]"+t.replace(/[\[\]]/g,"\\$&")+"(=([^]*)|&|#|$)").exec(window.location.href);return r&&r[2]&&(e=decodeURIComponent(r[2].replace(/\+/g," "))),e}}class Mo{constructor(t){this.stringUtils=t,this.showLogs=!0,this.httpRequestUtils=new Fee,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(t,...e){e&&e.length>0?console.info(this.wrapMessage(t),e):console.info(this.wrapMessage(t))}error(t,...e){e&&e.length>0?console.error(this.wrapMessage(t),e):console.error(this.wrapMessage(t))}warn(t,...e){e&&e.length>0?console.warn(this.wrapMessage(t),e):console.warn(this.wrapMessage(t))}debug(t,...e){e&&e.length>0?console.debug(this.wrapMessage(t),e):console.debug(this.wrapMessage(t))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(t){return this.showLogs?t:this.getCaller()+">> "+t}getCaller(){let t="unknown";try{throw new Error}catch(e){t=this.cleanCaller(this.stringUtils.getLine(e.stack,4))}return t}cleanCaller(t){return t?t.trim().substr(3):"unknown"}}Mo.\u0275fac=function(t){return new(t||Mo)(F($c))},Mo.\u0275prov=H({token:Mo,factory:Mo.\u0275fac});class sh{constructor(t,e){this.loggerService=t,this.suppressAlerts=!1,this.locale=e;try{const i=window.location.search.substring(1);this.locale=this.checkQueryForUrl(i)}catch{this.loggerService.error("Could not set locale from URL.")}}checkQueryForUrl(t){let e=this.locale;if(t&&t.length){const i=t,r="locale=",o=i.indexOf(r);if(o>=0){let s=i.indexOf("&",o);s=-1!==s?s:i.indexOf("#",o),s=-1!==s?s:i.length,e=i.substring(o+r.length,s)}}return e}}sh.\u0275fac=function(t){return new(t||sh)(F(Mo),F(Ls))},sh.\u0275prov=H({token:sh,factory:sh.\u0275fac});class Us{constructor(t,e){this.loggerService=e,this.siteId="48190c8c-42c4-46af-8d1a-0cd5db894797",this.hideFireOn=!1,this.hideRulePushOptions=!1,this.authUser=t;try{let i=document.location.search.substring(1);""===i&&document.location.hash.indexOf("?")>=0&&(i=document.location.hash.substr(document.location.hash.indexOf("?")+1));const r=Us.parseQueryParam(i,"realmId");r&&(this.siteId=r,this.loggerService.debug("Site Id set to ",this.siteId));const o=Us.parseQueryParam(i,"hideFireOn");o&&(this.hideFireOn="true"===o||"1"===o,this.loggerService.debug("hideFireOn set to ",this.hideFireOn));const s=Us.parseQueryParam(i,"hideRulePushOptions");s&&(this.hideRulePushOptions="true"===s||"1"===s,this.loggerService.debug("hideRulePushOptions set to ",this.hideRulePushOptions)),this.configureUser(i,t)}catch(i){this.loggerService.error("Could not set baseUrl automatically.",i)}}static parseQueryParam(t,e){let i=-1,r=null;if(e+="=",t&&t.length&&(i=t.indexOf(e)),i>=0){let o=t.indexOf("&",i);o=-1!==o?o:t.length,r=t.substring(i+e.length,o)}return r}configureUser(t,e){e.suppressAlerts="true"===Us.parseQueryParam(t,"suppressAlerts")}}Us.\u0275fac=function(t){return new(t||Us)(F(sh),F(Mo))},Us.\u0275prov=H({token:Us,factory:Us.\u0275fac});class Rp{isIE11(){return"Netscape"===navigator.appName&&-1!==navigator.appVersion.indexOf("Trident")}}function ji(n){return function(e){const i=new zee(n),r=e.lift(i);return i.caught=r}}Rp.\u0275fac=function(t){return new(t||Rp)},Rp.\u0275prov=H({token:Rp,factory:Rp.\u0275fac});class zee{constructor(t){this.selector=t}call(t,e){return e.subscribe(new Vee(t,this.selector,this.caught))}}class Vee extends es{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let e;try{e=this.selector(t,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new Wn(this);this.add(i);const r=dc(e,i);r!==i&&this.add(r)}}}var Wc=(()=>(function(n){n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.FORBIDDEN=403]="FORBIDDEN",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.NO_CONTENT=204]="NO_CONTENT",n[n.SERVER_ERROR=500]="SERVER_ERROR",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"}(Wc||(Wc={})),Wc))();const Hee_1="Could not connect to server.";class FM{constructor(t,e,i,r,o){this.code=t,this.message=e,this.request=i,this.response=r,this.source=o}}class jM{constructor(t){this.resp=t;try{this.bodyJsonObject=t.body,this.headers=t.headers}catch{this.bodyJsonObject=null}}header(t){return this.headers.get(t)}get i18nMessagesMap(){return this.bodyJsonObject.i18nMessagesMap}get contentlets(){return this.bodyJsonObject.contentlets}get entity(){return this.bodyJsonObject.entity}get tempFiles(){return this.bodyJsonObject.tempFiles}get errorsMessages(){let t="";return this.bodyJsonObject.errors?this.bodyJsonObject.errors.forEach(e=>{t+=e.message}):t=this.bodyJsonObject.messages.toString(),t}get status(){return this.resp.status}get response(){return this.resp}existError(t){return this.bodyJsonObject.errors&&this.bodyJsonObject.errors.filter(e=>e.errorCode===t).length>0}}class Xr extends le{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ve;return this._value}next(t){super.next(this._value=t)}}const jv=(()=>{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})();class PR extends ne{notifyNext(t,e,i,r,o){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class Wee extends ne{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function LR(n,t,e,i,r=new Wee(n,e,i)){if(!r.closed)return t instanceof Se?t.subscribe(r):Be(t)(r)}const RR={};function zv(...n){let t,e;return Mi(n[n.length-1])&&(e=n.pop()),"function"==typeof n[n.length-1]&&(t=n.pop()),1===n.length&&R(n[0])&&(n=n[0]),il(n,e).lift(new Gee(t))}class Gee{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new Yee(t,this.resultSelector))}}class Yee extends PR{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(RR),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i{let e;try{e=n()}catch(r){return void t.error(r)}return(e?Ct(e):Y_()).subscribe(t)})}function ah(n=null){return t=>t.lift(new qee(n))}class qee{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Kee(t,this.defaultValue))}}class Kee extends ne{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function jR(n=Jee){return t=>t.lift(new Qee(n))}class Qee{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Zee(t,this.errorFactory))}}class Zee extends ne{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}}function Jee(){return new jv}function xl(n,t){const e=arguments.length>=2;return i=>i.pipe(n?gn((r,o)=>n(r,o,i)):z,It(1),e?ah(t):jR(()=>new jv))}function Vv(n,t){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new Xee(n,t,e))}}class Xee{constructor(t,e,i=!1){this.accumulator=t,this.seed=e,this.hasSeed=i}call(t,e){return e.subscribe(new ete(t,this.accumulator,this.seed,this.hasSeed))}}class ete extends ne{constructor(t,e,i,r){super(t),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let i;try{i=this.accumulator(this.seed,t,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function Fp(n){return function(e){return 0===n?Y_():e.lift(new tte(n))}}class tte{constructor(t){if(this.total=t,this.total<0)throw new rR}call(t,e){return e.subscribe(new nte(t,this.total))}}class nte extends ne{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(n?gn((r,o)=>n(r,o,i)):z,Fp(1),e?ah(t):jR(()=>new jv))}class rte{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new ote(t,this.predicate,this.inclusive))}}class ote extends ne{constructor(t,e,i){super(t),this.predicate=e,this.inclusive=i,this.index=0}_next(t){const e=this.destination;let i;try{i=this.predicate(t,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(t,i)}nextOrComplete(t,e){const i=this.destination;Boolean(e)?i.next(t):(this.inclusive&&i.next(t),i.complete())}}class ate{constructor(t){this.value=t}call(t,e){return e.subscribe(new lte(t,this.value))}}class lte extends ne{constructor(t,e){super(t),this.value=e}_next(t){this.destination.next(this.value)}}function zM(n){return t=>t.lift(new cte(n))}class cte{constructor(t){this.callback=t}call(t,e){return e.subscribe(new ute(t,this.callback))}}class ute extends ne{constructor(t,e){super(t),this.add(new ae(e))}}const Nt="primary",jp=Symbol("RouteTitle");class dte{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function lh(n){return new dte(n)}function hte(n,t,e){const i=e.path.split("/");if(i.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||i.lengthi[o]===r)}return n===t}function BR(n){return Array.prototype.concat.apply([],n)}function UR(n){return n.length>0?n[n.length-1]:null}function Ji(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function Il(n){return oD(n)?n:ep(n)?Ct(Promise.resolve(n)):Le(n)}const Bv=!1,pte={exact:function WR(n,t,e){if(!Yc(n.segments,t.segments)||!Uv(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!n.children[i]||!WR(n.children[i],t.children[i],e))return!1;return!0},subset:GR},HR={exact:function mte(n,t){return Hs(n,t)},subset:function gte(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>VR(n[e],t[e]))},ignored:()=>!0};function $R(n,t,e){return pte[e.paths](n.root,t.root,e.matrixParams)&&HR[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function GR(n,t,e){return YR(n,t,t.segments,e)}function YR(n,t,e,i){if(n.segments.length>e.length){const r=n.segments.slice(0,e.length);return!(!Yc(r,e)||t.hasChildren()||!Uv(r,e,i))}if(n.segments.length===e.length){if(!Yc(n.segments,e)||!Uv(n.segments,e,i))return!1;for(const r in t.children)if(!n.children[r]||!GR(n.children[r],t.children[r],i))return!1;return!0}{const r=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!!(Yc(n.segments,r)&&Uv(n.segments,r,i)&&n.children[Nt])&&YR(n.children[Nt],t,o,i)}}function Uv(n,t,e){return t.every((i,r)=>HR[e](n[r].parameters,i.parameters))}class Gc{constructor(t=new Rt([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=lh(this.queryParams)),this._queryParamMap}toString(){return vte.serialize(this)}}class Rt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Ji(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Hv(this)}}class zp{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=lh(this.parameters)),this._parameterMap}toString(){return QR(this)}}function Yc(n,t){return n.length===t.length&&n.every((e,i)=>e.path===t[i].path)}let Vp=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return new VM},providedIn:"root"}),n})();class VM{parse(t){const e=new xte(t);return new Gc(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Bp(t.root,!0)}`,i=function Cte(n){const t=Object.keys(n).map(e=>{const i=n[e];return Array.isArray(i)?i.map(r=>`${$v(e)}=${$v(r)}`).join("&"):`${$v(e)}=${$v(i)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams),r="string"==typeof t.fragment?`#${function bte(n){return encodeURI(n)}(t.fragment)}`:"";return`${e}${i}${r}`}}const vte=new VM;function Hv(n){return n.segments.map(t=>QR(t)).join("/")}function Bp(n,t){if(!n.hasChildren())return Hv(n);if(t){const e=n.children[Nt]?Bp(n.children[Nt],!1):"",i=[];return Ji(n.children,(r,o)=>{o!==Nt&&i.push(`${o}:${Bp(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function _te(n,t){let e=[];return Ji(n.children,(i,r)=>{r===Nt&&(e=e.concat(t(i,r)))}),Ji(n.children,(i,r)=>{r!==Nt&&(e=e.concat(t(i,r)))}),e}(n,(i,r)=>r===Nt?[Bp(n.children[Nt],!1)]:[`${r}:${Bp(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[Nt]?`${Hv(n)}/${e[0]}`:`${Hv(n)}/(${e.join("//")})`}}function qR(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $v(n){return qR(n).replace(/%3B/gi,";")}function BM(n){return qR(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Wv(n){return decodeURIComponent(n)}function KR(n){return Wv(n.replace(/\+/g,"%20"))}function QR(n){return`${BM(n.path)}${function wte(n){return Object.keys(n).map(t=>`;${BM(t)}=${BM(n[t])}`).join("")}(n.parameters)}`}const Dte=/^[^\/()?;=#]+/;function Gv(n){const t=n.match(Dte);return t?t[0]:""}const Tte=/^[^=?]+/,Ste=/^[^]+/;class xte{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Rt([],{}):new Rt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[Nt]=new Rt(t,e)),i}parseSegment(){const t=Gv(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Z(4009,Bv);return this.capture(t),new zp(Wv(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Gv(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Gv(this.remaining);r&&(i=r,this.capture(i))}t[Wv(e)]=Wv(i)}parseQueryParam(t){const e=function Mte(n){const t=n.match(Tte);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function Ete(n){const t=n.match(Ste);return t?t[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=KR(e),o=KR(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Gv(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Z(4010,Bv);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Nt);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[Nt]:new Rt([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Z(4011,Bv)}}function UM(n){return n.segments.length>0?new Rt([],{[Nt]:n}):n}function Yv(n){const t={};for(const i of Object.keys(n.children)){const o=Yv(n.children[i]);(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function Ite(n){if(1===n.numberOfChildren&&n.children[Nt]){const t=n.children[Nt];return new Rt(n.segments.concat(t.segments),t.children)}return n}(new Rt(n.segments,t))}function qc(n){return n instanceof Gc}function kte(n,t,e,i,r){if(0===e.length)return ch(t.root,t.root,t.root,i,r);const o=function XR(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new JR(!0,0,n);let t=0,e=!1;const i=n.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Ji(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new JR(e,t,i)}(e);return o.toRoot()?ch(t.root,t.root,new Rt([],{}),i,r):function s(l){const c=function Pte(n,t,e,i){if(n.isAbsolute)return new uh(t.root,!0,0);if(-1===i)return new uh(e,e===t.root,0);return function eF(n,t,e){let i=n,r=t,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Z(4005,!1);r=i.segments.length}return new uh(i,!1,r-o)}(e,i+(Up(n.commands[0])?0:1),n.numberOfDoubleDots)}(o,t,n.snapshot?._urlSegment,l),u=c.processChildren?$p(c.segmentGroup,c.index,o.commands):$M(c.segmentGroup,c.index,o.commands);return ch(t.root,c.segmentGroup,u,i,r)}(n.snapshot?._lastPathIndex)}function Up(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Hp(n){return"object"==typeof n&&null!=n&&n.outlets}function ch(n,t,e,i,r){let s,o={};i&&Ji(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=n===t?e:ZR(n,t,e);const a=UM(Yv(s));return new Gc(a,o,r)}function ZR(n,t,e){const i={};return Ji(n.children,(r,o)=>{i[o]=r===t?e:ZR(r,t,e)}),new Rt(n.segments,i)}class JR{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Up(i[0]))throw new Z(4003,!1);const r=i.find(Hp);if(r&&r!==UR(i))throw new Z(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class uh{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function $M(n,t,e){if(n||(n=new Rt([],{})),0===n.segments.length&&n.hasChildren())return $p(n,t,e);const i=function Rte(n,t,e){let i=0,r=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=n.segments[r],a=e[i];if(Hp(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!nF(l,c,s))return o;i+=2}else{if(!nF(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=$M(n.children[s],t,o))}),Ji(n.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new Rt(n.segments,r)}}function WM(n,t,e){const i=n.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[i]=WM(new Rt([],{}),0,e))}),t}function tF(n){const t={};return Ji(n,(e,i)=>t[i]=`${e}`),t}function nF(n,t,e){return n==e.path&&Hs(t,e.parameters)}const Wp="imperative";class $s{constructor(t,e){this.id=t,this.url=e}}class GM extends $s{constructor(t,e,i="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Kc extends $s{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class qv extends $s{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class iF extends $s{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=16}}class rF extends $s{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class jte extends $s{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class zte extends $s{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Vte extends $s{constructor(t,e,i,r,o){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Bte extends $s{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Ute extends $s{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Hte{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class $te{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class Wte{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Gte{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Yte{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class qte{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class oF{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let Qte=(()=>{class n{createUrlTree(e,i,r,o,s,a){return kte(e||i.root,r,o,s,a)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),Zte=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(t){return Qte.\u0275fac(t)},providedIn:"root"}),n})();class sF{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=YM(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){const e=YM(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=qM(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return qM(t,this._root).map(e=>e.value)}}function YM(n,t){if(n===t.value)return t;for(const e of t.children){const i=YM(n,e);if(i)return i}return null}function qM(n,t){if(n===t.value)return[t];for(const e of t.children){const i=qM(n,e);if(i.length)return i.unshift(t),i}return[]}class za{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function dh(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class aF extends sF{constructor(t,e){super(t),this.snapshot=e,KM(this,t)}toString(){return this.snapshot.toString()}}function lF(n,t){const e=function Jte(n,t){const s=new Kv([],{},{},"",{},Nt,t,null,n.root,-1,{});return new uF("",new za(s,[]))}(n,t),i=new Xr([new zp("",{})]),r=new Xr({}),o=new Xr({}),s=new Xr({}),a=new Xr(""),l=new hh(i,r,s,a,o,Nt,t,e.root);return l.snapshot=e.root,new aF(new za(l,[]),e)}class hh{constructor(t,e,i,r,o,s,a,l){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(fe(c=>c[jp]))??Le(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(fe(t=>lh(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(fe(t=>lh(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function cF(n,t="emptyOnly"){const e=n.pathFromRoot;let i=0;if("always"!==t)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function Xte(n){return n.reduce((t,e)=>({params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Kv{get title(){return this.data?.[jp]}constructor(t,e,i,r,o,s,a,l,c,u,d){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=lh(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=lh(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class uF extends sF{constructor(t,e){super(e),this.url=t,KM(this,e)}toString(){return dF(this._root)}}function KM(n,t){t.value._routerState=n,t.children.forEach(e=>KM(n,e))}function dF(n){const t=n.children.length>0?` { ${n.children.map(dF).join(", ")} } `:"";return`${n.value}${t}`}function QM(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Hs(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Hs(t.params,e.params)||n.params.next(e.params),function fte(n,t){if(n.length!==t.length)return!1;for(let e=0;eHs(e.parameters,t[i].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||ZM(n.parent,t.parent))}function Gp(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=t.value;const r=function tne(n,t,e){return t.children.map(i=>{for(const r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Gp(n,i,r);return Gp(n,i)})}(n,t,e);return new za(i,r)}{if(n.shouldAttach(t.value)){const o=n.retrieve(t.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Gp(n,a)),s}}const i=function nne(n){return new hh(new Xr(n.url),new Xr(n.params),new Xr(n.queryParams),new Xr(n.fragment),new Xr(n.data),n.outlet,n.component,n)}(t.value),r=t.children.map(o=>Gp(n,o));return new za(i,r)}}const JM="ngNavigationCancelingError";function hF(n,t){const{redirectTo:e,navigationBehaviorOptions:i}=qc(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=fF(!1,0,t);return r.url=e,r.navigationBehaviorOptions=i,r}function fF(n,t,e){const i=new Error("NavigationCancelingError: "+(n||""));return i[JM]=!0,i.cancellationCode=t,e&&(i.url=e),i}function pF(n){return mF(n)&&qc(n.url)}function mF(n){return n&&n[JM]}class ine{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Yp,this.attachRef=null}}let Yp=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new ine,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Qv=!1;let gF=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=Nt,this.activateEvents=new re,this.deactivateEvents=new re,this.attachEvents=new re,this.detachEvents=new re,this.parentContexts=tt(Yp),this.location=tt(Gr),this.changeDetector=tt(Rn),this.environmentInjector=tt(Os)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Z(4012,Qv);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Z(4012,Qv);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Z(4012,Qv);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Z(4013,Qv);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new rne(e,a,r.injector);if(i&&function one(n){return!!n.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Gi]}),n})();class rne{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===hh?this.route:t===Yp?this.childContexts:this.parent.get(t,e)}}let XM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["ng-component"]],standalone:!0,features:[Ps],decls:1,vars:0,template:function(e,i){1&e&&_e(0,"router-outlet")},dependencies:[gF],encapsulation:2}),n})();function yF(n,t){return n.providers&&!n._injector&&(n._injector=m_(n.providers,t,`Route: ${n.path}`)),n._injector??t}function t1(n){const t=n.children&&n.children.map(t1),e=t?{...n,children:t}:{...n};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Nt&&(e.component=XM),e}function Uo(n){return n.outlet||Nt}function _F(n,t){const e=n.filter(i=>Uo(i)===t);return e.push(...n.filter(i=>Uo(i)!==t)),e}function qp(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class une{constructor(t,e,i,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),QM(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const r=dh(e);t.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Ji(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=dh(t);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=dh(t);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(t,e,i){const r=dh(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new qte(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Gte(t.value.snapshot))}activateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(QM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),QM(a.route.value),this.activateChildRoutes(t,null,s.children)}else{const a=qp(r.snapshot),l=a?.get(Sc)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,i)}}class vF{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Zv{constructor(t,e){this.component=t,this.route=e}}function dne(n,t,e){const i=n._root;return Kp(i,t?t._root:null,e,[i.value])}function fh(n,t){const e=Symbol(),i=t.get(n,e);return i===e?"function"!=typeof n||function Mw(n){return null!==Qu(n)}(n)?t.get(n):n:i}function Kp(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=dh(t);return n.children.forEach(s=>{(function fne(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function pne(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!Yc(n.url,t.url);case"pathParamsOrQueryParamsChange":return!Yc(n.url,t.url)||!Hs(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ZM(n,t)||!Hs(n.queryParams,t.queryParams);default:return!ZM(n,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new vF(i)):(o.data=s.data,o._resolvedData=s._resolvedData),Kp(n,t,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Zv(a.outlet.component,s))}else s&&Qp(t,a,r),r.canActivateChecks.push(new vF(i)),Kp(n,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Ji(o,(s,a)=>Qp(s,e.getContext(a),r)),r}function Qp(n,t,e){const i=dh(n),r=n.value;Ji(i,(o,s)=>{Qp(o,r.component?t?t.children.getContext(s):null:t,e)}),e.canDeactivateChecks.push(new Zv(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Zp(n){return"function"==typeof n}function n1(n){return n instanceof jv||"EmptyError"===n?.name}const Jv=Symbol("INITIAL_VALUE");function ph(){return ci(n=>zv(n.map(t=>t.pipe(It(1),function kv(...n){const t=n[n.length-1];return Mi(t)?(n.pop(),e=>MM(n,e,t)):e=>MM(n,e)}(Jv)))).pipe(fe(t=>{for(const e of t)if(!0!==e){if(e===Jv)return Jv;if(!1===e||e instanceof Gc)return e}return!0}),gn(t=>t!==Jv),It(1)))}function bF(n){return pe(yn(t=>{if(qc(t))throw hF(0,t)}),fe(t=>!0===t))}const r1={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function wF(n,t,e,i,r){const o=o1(n,t,e);return o.matched?function Ane(n,t,e,i){const r=t.canMatch;return r&&0!==r.length?Le(r.map(s=>{const a=fh(s,n);return Il(function bne(n){return n&&Zp(n.canMatch)}(a)?a.canMatch(t,e):n.runInContext(()=>a(t,e)))})).pipe(ph(),bF()):Le(!0)}(i=yF(t,i),t,e).pipe(fe(s=>!0===s?o:{...r1})):Le(o)}function o1(n,t,e){if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?{...r1}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||hte)(e,n,t);if(!r)return{...r1};const o={};Ji(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Xv(n,t,e,i){if(e.length>0&&function Pne(n,t,e){return e.some(i=>eb(n,t,i)&&Uo(i)!==Nt)}(n,e,i)){const o=new Rt(t,function Nne(n,t,e,i){const r={};r[Nt]=i,i._sourceSegment=n,i._segmentIndexShift=t.length;for(const o of e)if(""===o.path&&Uo(o)!==Nt){const s=new Rt([],{});s._sourceSegment=n,s._segmentIndexShift=t.length,r[Uo(o)]=s}return r}(n,t,i,new Rt(e,n.children)));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function Lne(n,t,e){return e.some(i=>eb(n,t,i))}(n,e,i)){const o=new Rt(n.segments,function kne(n,t,e,i,r){const o={};for(const s of i)if(eb(n,e,s)&&!r[Uo(s)]){const a=new Rt([],{});a._sourceSegment=n,a._segmentIndexShift=t.length,o[Uo(s)]=a}return{...r,...o}}(n,t,e,i,n.children));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:e}}const r=new Rt(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function eb(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function CF(n,t,e,i){return!!(Uo(n)===i||i!==Nt&&eb(t,e,n))&&("**"===n.path||o1(t,n,e).matched)}function DF(n,t,e){return 0===t.length&&!n.children[e]}const tb=!1;class nb{constructor(t){this.segmentGroup=t||null}}class TF{constructor(t){this.urlTree=t}}function Jp(n){return bo(new nb(n))}function MF(n){return bo(new TF(n))}class zne{constructor(t,e,i,r,o){this.injector=t,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const t=Xv(this.urlTree.root,[],[],this.config).segmentGroup,e=new Rt(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,Nt).pipe(fe(o=>this.createUrlTree(Yv(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(ji(o=>{if(o instanceof TF)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof nb?this.noMatchError(o):o}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,Nt).pipe(fe(r=>this.createUrlTree(Yv(r),t.queryParams,t.fragment))).pipe(ji(r=>{throw r instanceof nb?this.noMatchError(r):r}))}noMatchError(t){return new Z(4002,tb)}createUrlTree(t,e,i){const r=UM(t);return new Gc(r,e,i)}expandSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(fe(o=>new Rt([],o))):this.expandSegment(t,i,e,i.segments,r,!0)}expandChildren(t,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return Ct(r).pipe(gl(o=>{const s=i.children[o],a=_F(e,o);return this.expandSegmentGroup(t,a,s,o).pipe(fe(l=>({segment:l,outlet:o})))}),Vv((o,s)=>(o[s.outlet]=s.segment,o),{}),zR())}expandSegment(t,e,i,r,o,s){return Ct(i).pipe(gl(a=>this.expandSegmentAgainstRoute(t,e,i,a,r,o,s).pipe(ji(c=>{if(c instanceof nb)return Le(null);throw c}))),xl(a=>!!a),ji((a,l)=>{if(n1(a))return DF(e,r,o)?Le(new Rt([],{})):Jp(e);throw a}))}expandSegmentAgainstRoute(t,e,i,r,o,s,a){return CF(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s):Jp(e):Jp(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?MF(o):this.lineralizeSegments(i,o).pipe(ri(s=>{const a=new Rt(s,{});return this.expandSegment(t,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=o1(e,r,o);if(!a)return Jp(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?MF(d):this.lineralizeSegments(r,d).pipe(ri(h=>this.expandSegment(t,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(t,e,i,r,o){return"**"===i.path?(t=yF(i,t),i.loadChildren?(i._loadedRoutes?Le({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(t,i)).pipe(fe(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new Rt(r,{})))):Le(new Rt(r,{}))):wF(e,i,r,t).pipe(ci(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(t=i._injector??t,i,r).pipe(ri(u=>{const d=u.injector??t,h=u.routes,{segmentGroup:f,slicedSegments:p}=Xv(e,a,l,h),m=new Rt(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(fe(w=>new Rt(a,w)));if(0===h.length&&0===p.length)return Le(new Rt(a,{}));const g=Uo(i)===o;return this.expandSegment(d,m,h,p,g?Nt:o,!0).pipe(fe(b=>new Rt(a.concat(b.segments),b.children)))})):Jp(e)))}getChildConfig(t,e,i){return e.children?Le({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?Le({routes:e._loadedRoutes,injector:e._loadedInjector}):function One(n,t,e,i){const r=t.canLoad;return void 0===r||0===r.length?Le(!0):Le(r.map(s=>{const a=fh(s,n);return Il(function gne(n){return n&&Zp(n.canLoad)}(a)?a.canLoad(t,e):n.runInContext(()=>a(t,e)))})).pipe(ph(),bF())}(t,e,i).pipe(ri(r=>r?this.configLoader.loadChildren(t,e).pipe(yn(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function Fne(n){return bo(fF(tb,3))}())):Le({routes:[],injector:t})}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Le(i);if(r.numberOfChildren>1||!r.children[Nt])return bo(new Z(4e3,tb));r=r.children[Nt]}}applyRedirectCommands(t,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreateUrlTree(t,e,i,r){const o=this.createSegmentGroup(t,e.root,i,r);return new Gc(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return Ji(t,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(t,e,i,r){const o=this.createSegments(t,e.segments,i,r);let s={};return Ji(e.children,(a,l)=>{s[l]=this.createSegmentGroup(t,a,i,r)}),new Rt(o,s)}createSegments(t,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,e,i){const r=i[e.path.substring(1)];if(!r)throw new Z(4001,tb);return r}findOrReturn(t,e){let i=0;for(const r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}}class Bne{}class $ne{constructor(t,e,i,r,o,s,a){this.injector=t,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const t=Xv(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,Nt).pipe(fe(e=>{if(null===e)return null;const i=new Kv([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Nt,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new za(i,e),o=new uF(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(t){const e=t.value,i=cF(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,e,i):this.processSegment(t,e,i,i.segments,r)}processChildren(t,e,i){return Ct(Object.keys(i.children)).pipe(gl(r=>{const o=i.children[r],s=_F(e,r);return this.processSegmentGroup(t,s,o,r)}),Vv((r,o)=>r&&o?(r.push(...o),r):null),function ite(n,t=!1){return e=>e.lift(new rte(n,t))}(r=>null!==r),ah(null),zR(),fe(r=>{if(null===r)return null;const o=EF(r);return function Wne(n){n.sort((t,e)=>t.value.outlet===Nt?-1:e.value.outlet===Nt?1:t.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(t,e,i,r,o){return Ct(e).pipe(gl(s=>this.processSegmentAgainstRoute(s._injector??t,s,i,r,o)),xl(s=>!!s),ji(s=>{if(n1(s))return DF(i,r,o)?Le([]):Le(null);throw s}))}processSegmentAgainstRoute(t,e,i,r,o){if(e.redirectTo||!CF(e,i,r,o))return Le(null);let s;if("**"===e.path){const a=r.length>0?UR(r).parameters:{},l=IF(i)+r.length;s=Le({snapshot:new Kv(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,OF(e),Uo(e),e.component??e._loadedComponent??null,e,xF(i),l,AF(e)),consumedSegments:[],remainingSegments:[]})}else s=wF(i,e,r,t).pipe(fe(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=IF(i)+l.length;return{snapshot:new Kv(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,OF(e),Uo(e),e.component??e._loadedComponent??null,e,xF(i),d,AF(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(ci(a=>{if(null===a)return Le(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;t=e._injector??t;const d=e._loadedInjector??t,h=function Gne(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=Xv(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(fe(g=>null===g?null:[new za(l,g)]));if(0===h.length&&0===p.length)return Le([new za(l,[])]);const m=Uo(e)===o;return this.processSegment(d,h,f,p,m?Nt:o).pipe(fe(g=>null===g?null:[new za(l,g)]))}))}}function Yne(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function EF(n){const t=[],e=new Set;for(const i of n){if(!Yne(i)){t.push(i);continue}const r=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):t.push(i)}for(const i of e){const r=EF(i.children);t.push(new za(i.value,r))}return t.filter(i=>!e.has(i))}function xF(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function IF(n){let t=n,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function OF(n){return n.data||{}}function AF(n){return n.resolve||{}}function kF(n){return"string"==typeof n.title||null===n.title}function s1(n){return ci(t=>{const e=n(t);return e?Ct(e).pipe(fe(()=>t)):Le(t)})}const mh=new Ce("ROUTES");let a1=(()=>{class n{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return Le(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Il(e.loadComponent()).pipe(fe(PF),yn(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),zM(()=>{this.componentLoaders.delete(e)})),r=new Gu(i,()=>new le).pipe(hc());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Le({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(fe(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=BR(l.get(mh,[],et.Self|et.Optional)));return{routes:c.map(t1),injector:l}}),zM(()=>{this.childrenLoaders.delete(i)})),s=new Gu(o,()=>new le).pipe(hc());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return Il(e()).pipe(fe(PF),ri(r=>r instanceof gk||Array.isArray(r)?Le(r):Ct(this.compiler.compileModuleAsync(r))))}}return n.\u0275fac=function(e){return new(e||n)(F(Mr),F(sN))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function PF(n){return function nie(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let rb=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new le,this.configLoader=tt(a1),this.environmentInjector=tt(Os),this.urlSerializer=tt(Vp),this.rootContexts=tt(Yp),this.navigationId=0,this.afterPreactivation=()=>Le(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new $te(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new Hte(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Xr({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Wp,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(gn(i=>0!==i.id),fe(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),ci(i=>{let r=!1,o=!1;return Le(i).pipe(yn(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),ci(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new iF(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Fs}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return LF(s.source)&&(e.browserUrlTree=s.extractedUrl),Le(s).pipe(ci(u=>{const d=this.transitions?.getValue();return this.events.next(new GM(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Fs:Promise.resolve(u)}),function Vne(n,t,e,i){return ci(r=>function jne(n,t,e,i,r){return new zne(n,t,e,i,r).apply()}(n,t,e,r.extractedUrl,i).pipe(fe(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),yn(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function Kne(n,t,e,i,r){return ri(o=>function Hne(n,t,e,i,r,o,s="emptyOnly"){return new $ne(n,t,e,i,r,s,o).recognize().pipe(ci(a=>null===a?function Une(n){return new Se(t=>t.error(n))}(new Bne):Le(a)))}(n,t,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(fe(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),yn(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new jte(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new GM(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=lF(d,this.rootComponentType).snapshot;return Le(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new iF(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Fs}}),yn(s=>{const a=new zte(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),fe(s=>i={...s,guards:dne(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function Cne(n,t){return ri(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?Le({...e,guardsResult:!0}):function Dne(n,t,e,i){return Ct(n).pipe(ri(r=>function Ine(n,t,e,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?Le(o.map(a=>{const l=qp(t)??r,c=fh(a,l);return Il(function vne(n){return n&&Zp(n.canDeactivate)}(c)?c.canDeactivate(n,t,e,i):l.runInContext(()=>c(n,t,e,i))).pipe(xl())})).pipe(ph()):Le(!0)}(r.component,r.route,e,t,i)),xl(r=>!0!==r,!0))}(s,i,r,n).pipe(ri(a=>a&&function mne(n){return"boolean"==typeof n}(a)?function Tne(n,t,e,i){return Ct(t).pipe(gl(r=>MM(function Sne(n,t){return null!==n&&t&&t(new Wte(n)),Le(!0)}(r.route.parent,i),function Mne(n,t){return null!==n&&t&&t(new Yte(n)),Le(!0)}(r.route,i),function xne(n,t,e){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>function hne(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(s)).filter(s=>null!==s).map(s=>FR(()=>Le(s.guards.map(l=>{const c=qp(s.node)??e,u=fh(l,c);return Il(function _ne(n){return n&&Zp(n.canActivateChild)}(u)?u.canActivateChild(i,n):c.runInContext(()=>u(i,n))).pipe(xl())})).pipe(ph())));return Le(o).pipe(ph())}(n,r.path,e),function Ene(n,t,e){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return Le(!0);const r=i.map(o=>FR(()=>{const s=qp(t)??e,a=fh(o,s);return Il(function yne(n){return n&&Zp(n.canActivate)}(a)?a.canActivate(t,n):s.runInContext(()=>a(t,n))).pipe(xl())}));return Le(r).pipe(ph())}(n,r.route,e))),xl(r=>!0!==r,!0))}(i,o,n,t):Le(a)),fe(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),yn(s=>{if(i.guardsResult=s.guardsResult,qc(s.guardsResult))throw hF(0,s.guardsResult);const a=new Vte(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),gn(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),s1(s=>{if(s.guards.canActivateChecks.length)return Le(s).pipe(yn(a=>{const l=new Bte(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ci(a=>{let l=!1;return Le(a).pipe(function Qne(n,t){return ri(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return Le(e);let o=0;return Ct(r).pipe(gl(s=>function Zne(n,t,e,i){const r=n.routeConfig,o=n._resolve;return void 0!==r?.title&&!kF(r)&&(o[jp]=r.title),function Jne(n,t,e,i){const r=function Xne(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return Le({});const o={};return Ct(r).pipe(ri(s=>function eie(n,t,e,i){const r=qp(t)??i,o=fh(n,r);return Il(o.resolve?o.resolve(t,e):r.runInContext(()=>o(t,e)))}(n[s],t,e,i).pipe(xl(),yn(a=>{o[s]=a}))),Fp(1),function ste(n){return t=>t.lift(new ate(n))}(o),ji(s=>n1(s)?Fs:bo(s)))}(o,n,t,i).pipe(fe(s=>(n._resolvedData=s,n.data=cF(n,e).resolve,r&&kF(r)&&(n.data[jp]=r.title),null)))}(s.route,i,n,t)),yn(()=>o++),Fp(1),ri(s=>o===r.length?Le(e):Fs))})}(e.paramsInheritanceStrategy,this.environmentInjector),yn({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),yn(a=>{const l=new Ute(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),s1(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(yn(u=>{l.component=u}),fe(()=>{})));for(const u of l.children)c.push(...a(u));return c};return zv(a(s.targetSnapshot.root)).pipe(ah(),It(1))}),s1(()=>this.afterPreactivation()),fe(s=>{const a=function ene(n,t,e){const i=Gp(n,t._root,e?e._root:void 0);return new aF(i,t)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),yn(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((n,t,e)=>fe(i=>(new une(t,i.targetRouterState,i.currentRouterState,e).activate(n),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),yn({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Kc(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),zM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),ji(s=>{if(o=!0,mF(s)){pF(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new qv(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),pF(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||LF(i.source)};e.scheduleNavigation(l,Wp,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new rF(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Fs}))}))}cancelNavigationTransition(e,i,r){const o=new qv(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function LF(n){return n!==Wp}let RF=(()=>{class n{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===Nt);return i}getResolvedTitleForRoute(e){return e.data[jp]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return tt(iie)},providedIn:"root"}),n})(),iie=(()=>{class n extends RF{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(e){return new(e||n)(F(MP))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),rie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return tt(sie)},providedIn:"root"}),n})();class oie{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let sie=(()=>{class n extends oie{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Ri(n)))(i||n)}}(),n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const ob=new Ce("",{providedIn:"root",factory:()=>({})});let lie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return tt(cie)},providedIn:"root"}),n})(),cie=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function uie(n){throw n}function die(n,t,e){return t.parse("/")}const hie={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},fie={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Or=(()=>{class n{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=tt(r$),this.isNgZoneEnabled=!1,this.options=tt(ob,{optional:!0})||{},this.errorHandler=this.options.errorHandler||uie,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||die,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=tt(lie),this.routeReuseStrategy=tt(rie),this.urlCreationStrategy=tt(Zte),this.titleStrategy=tt(RF),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=BR(tt(mh,{optional:!0})??[]),this.navigationTransitions=tt(rb),this.urlSerializer=tt(Vp),this.location=tt(GD),this.isNgZoneEnabled=tt($t)instanceof $t&&$t.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Gc,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=lF(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Wp,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(t1),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=qc(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Wp,null,i)}navigate(e,i={skipLocationChange:!1}){return function pie(n){for(let t=0;t{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class jF{}let yie=(()=>{class n{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(gn(e=>e instanceof Kc),gl(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=m_(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent?r.push(this.preloadConfig(s,o)):(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return Ct(r).pipe(nl())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):Le(null);const o=r.pipe(ri(s=>null===s?Le(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?Ct([o,this.loader.loadComponent(i)]).pipe(nl()):o})}}return n.\u0275fac=function(e){return new(e||n)(F(Or),F(sN),F(Os),F(jF),F(a1))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const c1=new Ce("");let zF=(()=>{class n{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof GM?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Kc&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof oF&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new oF(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(e){!function CO(){throw new Error("invalid")}()},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function Qc(n,t){return{\u0275kind:n,\u0275providers:t}}function BF(){const n=tt(Mr);return t=>{const e=n.get(kc);if(t!==e.components[0])return;const i=n.get(Or),r=n.get(UF);1===n.get(d1)&&i.initialNavigation(),n.get(HF,null,et.Optional)?.setUpPreloading(),n.get(c1,null,et.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const UF=new Ce("",{factory:()=>new le}),d1=new Ce("",{providedIn:"root",factory:()=>1});const HF=new Ce("");function Cie(n){return Qc(0,[{provide:HF,useExisting:yie},{provide:jF,useExisting:n}])}const $F=new Ce("ROUTER_FORROOT_GUARD"),Die=[GD,{provide:Vp,useClass:VM},Or,Yp,{provide:hh,useFactory:function VF(n){return n.routerState.root},deps:[Or]},a1,[]];function Tie(){return new fN("Router",Or)}let WF=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[Die,[],{provide:mh,multi:!0,useValue:e},{provide:$F,useFactory:xie,deps:[[Or,new Vf,new Bf]]},{provide:ob,useValue:i||{}},i?.useHash?{provide:Pc,useClass:Y$}:{provide:Pc,useClass:RN},{provide:c1,useFactory:()=>{const n=tt(aG),t=tt($t),e=tt(ob),i=tt(rb),r=tt(Vp);return e.scrollOffset&&n.setOffset(e.scrollOffset),new zF(r,i,n,t,e)}},i?.preloadingStrategy?Cie(i.preloadingStrategy).\u0275providers:[],{provide:fN,multi:!0,useFactory:Tie},i?.initialNavigation?Iie(i):[],[{provide:GF,useFactory:BF},{provide:rN,multi:!0,useExisting:GF}]]}}static forChild(e){return{ngModule:n,providers:[{provide:mh,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(F($F,8))},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[XM]}),n})();function xie(n){return"guarded"}function Iie(n){return["disabled"===n.initialNavigation?Qc(3,[{provide:dp,multi:!0,useFactory:()=>{const t=tt(Or);return()=>{t.setUpLocationChangeListener()}}},{provide:d1,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?Qc(2,[{provide:d1,useValue:0},{provide:dp,multi:!0,deps:[Mr],useFactory:t=>{const e=t.get(W$,Promise.resolve());return()=>e.then(()=>new Promise(r=>{const o=t.get(Or),s=t.get(UF);(function i(r){t.get(Or).events.pipe(gn(s=>s instanceof Kc||s instanceof qv||s instanceof rF),fe(s=>s instanceof Kc||s instanceof qv&&(0===s.code||1===s.code)&&null),gn(s=>null!==s),It(1)).subscribe(()=>{r()})})(()=>{r(!0)}),t.get(rb).afterPreactivation=()=>(r(!0),s.closed?Le(void 0):s),o.initialNavigation()}))}}]).\u0275providers:[]]}const GF=new Ce("");class Gt{constructor(t,e,i){this.loggerService=t,this.router=e,this.http=i,this.httpErrosSubjects=[]}request(t){t.method||(t.method="GET");const e=this.getRequestOpts(t),i=t.body;return this.http.request(e).pipe(gn(r=>r.type===An.Response),fe(r=>{try{return r.body}catch{return r}}),ji((r,o)=>{if(r){if(this.emitHttpError(r.status),r.status===Wc.SERVER_ERROR||r.status===Wc.FORBIDDEN)throw r.statusText&&r.statusText.indexOf("ECONNREFUSED")>=0?new FM(1,Hee_1,e,r,i):new FM(3,r.error.message,e,r,i);if(r.status===Wc.NOT_FOUND)throw this.loggerService.error("Could not execute request: 404 path not valid.",t.url),new FM(2,r.headers.get("error-message"),e,r,i)}return null}))}requestView(t){let e;return t.method||(t.method="GET"),e=this.getRequestOpts(t),this.http.request(e).pipe(gn(i=>i.type===An.Response),fe(i=>i.body&&i.body.errors&&i.body.errors.length>0?this.handleRequestViewErrors(i):new jM(i)),ji(i=>(this.emitHttpError(i.status),bo(this.handleResponseHttpErrors(i)))))}subscribeToHttpError(t){return this.httpErrosSubjects[t]||(this.httpErrosSubjects[t]=new le),this.httpErrosSubjects[t].asObservable()}handleRequestViewErrors(t){return 401===t.status&&this.router.navigate(["/public/login"]),new jM(t)}handleResponseHttpErrors(t){return 401===t.status&&this.router.navigate(["/public/login"]),t}emitHttpError(t){this.httpErrosSubjects[t]&&this.httpErrosSubjects[t].next()}getRequestOpts(t){const e=this.getHttpHeaders(t.headers),i=this.getHttpParams(t.params),r=this.getFixedUrl(t.url);return"POST"===t.method||"PUT"===t.method||"PATCH"===t.method||"DELETE"===t.method?new ka(t.method,r,t.body||null,{headers:e,params:i}):new ka(t.method,r,{headers:e,params:i})}getHttpHeaders(t){let e=this.getDefaultRequestHeaders();return t&&Object.keys(t).length&&(Object.keys(t).forEach(i=>{e=e.set(i,t[i])}),"multipart/form-data"===t["Content-Type"]&&(e=e.delete("Content-Type"))),e}getFixedUrl(t){return t?.startsWith("api")?`/${t}`:(t?t.split("/")[0]:"").match(/v[1-9]/g)?`/api/${t}`:t}getHttpParams(t){if(t&&Object.keys(t).length){let e=new ps;return Object.keys(t).forEach(i=>{e=e.set(i,t[i])}),e}return null}getDefaultRequestHeaders(){return(new Qr).set("Accept","*/*").set("Content-Type","application/json")}}Gt.\u0275fac=function(t){return new(t||Gt)(F(Mo),F(Or),F(ur))},Gt.\u0275prov=H({token:Gt,factory:Gt.\u0275fac});class em{constructor(){this.data=new le}get showDialog$(){return this.data.asObservable()}open(t){this.data.next(t)}}em.\u0275fac=function(t){return new(t||em)},em.\u0275prov=H({token:em,factory:em.\u0275fac,providedIn:"root"});class yh{constructor(t){this.router=t}goToMain(){this.router.navigate(["/c"])}goToLogin(t){this.router.navigate(["/public/login"],t)}goToURL(t){this.router.navigate([t])}isPublicUrl(t){return t.startsWith("/public")}isFromCoreUrl(t){return t.startsWith("/fromCore")}isRootUrl(t){return"/"===t}gotoPortlet(t){this.router.navigate([`c/${t.replace(" ","_")}`])}goToForgotPassword(){this.router.navigate(["/public/forgotPassword"])}goToNotLicensed(){this.router.navigate(["c/notLicensed"])}}yh.\u0275fac=function(t){return new(t||yh)(F(Or))},yh.\u0275prov=H({token:yh,factory:yh.\u0275fac});class Zc{constructor(t,e){this.coreWebService=t,this.loggerService=e,this.configParamsSubject=new Xr(null),this.configUrl="v1/appconfiguration",this.loadConfig()}getConfig(){return this.configParamsSubject.asObservable().pipe(gn(t=>!!t))}loadConfig(){this.loggerService.debug("Loading configuration on: ",this.configUrl),this.coreWebService.requestView({url:this.configUrl}).pipe(Ie("entity")).subscribe(t=>{this.loggerService.debug("Configuration Loaded!",t);const e={colors:t.config.colors,emailRegex:t.config.emailRegex,license:t.config.license,logos:t.config.logos,menu:t.menu,paginatorLinks:t.config["dotcms.paginator.links"],paginatorRows:t.config["dotcms.paginator.rows"],releaseInfo:{buildDate:t.config.releaseInfo?.buildDate,version:t.config.releaseInfo?.version},websocket:{websocketReconnectTime:t.config.websocket["dotcms.websocket.reconnect.time"],disabledWebsockets:t.config.websocket["dotcms.websocket.disable"]}};return this.configParamsSubject.next(e),this.loggerService.debug("this.configParams",e),t})}getTimeZones(){return this.coreWebService.requestView({url:this.configUrl}).pipe(Ie("entity","config","timezones"),fe(t=>t.sort((e,i)=>e.label>i.label?1:e.label{this.connect()},0)}destroy(){this._open.complete(),this._close.complete(),this._message.complete(),this._error.complete()}}var sb=(()=>(function(n){n[n.NORMAL_CLOSE_CODE=1e3]="NORMAL_CLOSE_CODE",n[n.GO_AWAY_CODE=1001]="GO_AWAY_CODE"}(sb||(sb={})),sb))();class qF extends YF{constructor(t,e){if(super(e),this.url=t,this.dataStream=new le,!new RegExp("wss?://").test(t))throw new Error("Invalid url provided ["+t+"]")}connect(){this.errorThrown=!1,this.loggerService.debug("Connecting with Web socket",this.url);try{this.socket=new WebSocket(this.url),this.socket.onopen=t=>{this.loggerService.debug("Web socket connected",this.url),this._open.next(t)},this.socket.onmessage=t=>{this._message.next(JSON.parse(t.data))},this.socket.onclose=t=>{this.errorThrown||(t.code===sb.NORMAL_CLOSE_CODE?(this._close.next(t),this._message.complete()):this._error.next(t))},this.socket.onerror=t=>{this.errorThrown=!0,this._error.next(t)}}catch(t){this.loggerService.debug("Web EventsSocket connection error",t),this._error.next(t)}}close(){this.socket&&3!==this.socket.readyState&&this.socket.close()}}class Rie extends YF{constructor(t,e,i){super(e),this.url=t,this.coreWebService=i,this.isClosed=!1,this.isAlreadyOpen=!1}connect(){this.connectLongPooling()}close(){this.loggerService.info("destroying long polling"),this.isClosed=!0,this.isAlreadyOpen=!1,this._close.next()}getLastCallback(t){return this.lastCallback=t.length>0?t[t.length-1].creationDate+1:this.lastCallback,this.lastCallback}connectLongPooling(t){this.isClosed=!1,this.loggerService.info("Starting long polling connection"),this.coreWebService.requestView({url:this.url,params:t?{lastCallBack:t}:{}}).pipe(Ie("entity"),It(1)).subscribe(e=>{this.loggerService.debug("new Events",e),this.triggerOpen(),e instanceof Array?e.forEach(i=>{this._message.next(i)}):this._message.next(e),this.isClosed||this.connectLongPooling(this.getLastCallback(e))},e=>{this.loggerService.info("A error occur connecting through long polling"),this._error.next(e)})}triggerOpen(){this.isAlreadyOpen||(this._open.next(!0),this.isAlreadyOpen=!0)}}class Fie{constructor(t,e){this.url=t,this.useSSL=e}getWebSocketURL(){return`${this.getWebSocketProtocol()}://${this.url}`}getLongPoolingURL(){return`${this.getHttpProtocol()}://${this.url}`}getWebSocketProtocol(){return this.useSSL?"wss":"ws"}getHttpProtocol(){return this.useSSL?"https":"http"}}var eo=(()=>(function(n){n[n.NONE=0]="NONE",n[n.CONNECTING=1]="CONNECTING",n[n.RECONNECTING=2]="RECONNECTING",n[n.CONNECTED=3]="CONNECTED",n[n.CLOSED=4]="CLOSED"}(eo||(eo={})),eo))();class _h{constructor(t,e,i,r){this.dotEventsSocketURL=t,this.dotcmsConfigService=e,this.loggerService=i,this.coreWebService=r,this.status=eo.NONE,this._message=new le,this._open=new le}connect(){return this.init().pipe(yn(()=>{this.status=eo.CONNECTING,this.connectProtocol()}))}destroy(){this.protocolImpl&&(this.loggerService.debug("Closing socket"),this.status=eo.CLOSED,this.protocolImpl.close())}messages(){return this._message.asObservable()}open(){return this._open.asObservable()}isConnected(){return this.status===eo.CONNECTED}init(){return this.dotcmsConfigService.getConfig().pipe(Ie("websocket"),yn(t=>{this.webSocketConfigParams=t,this.protocolImpl=this.isWebSocketsBrowserSupport()&&!t.disabledWebsockets?this.getWebSocketProtocol():this.getLongPollingProtocol()}))}connectProtocol(){this.protocolImpl.open$().subscribe(()=>{this.status=eo.CONNECTED,this._open.next(!0)}),this.protocolImpl.error$().subscribe(()=>{this.shouldTryWithLongPooling()?(this.loggerService.info("Error connecting with Websockets, trying again with long polling"),this.protocolImpl.destroy(),this.protocolImpl=this.getLongPollingProtocol(),this.connectProtocol()):setTimeout(()=>{this.status=this.getAfterErrorStatus(),this.protocolImpl.connect()},this.webSocketConfigParams.websocketReconnectTime)}),this.protocolImpl.close$().subscribe(t=>{this.status=eo.CLOSED}),this.protocolImpl.message$().subscribe(t=>this._message.next(t),t=>this.loggerService.debug("Error in the System Events service: "+t.message),()=>this.loggerService.debug("Completed")),this.protocolImpl.connect()}getAfterErrorStatus(){return this.status===eo.CONNECTING?eo.CONNECTING:eo.RECONNECTING}shouldTryWithLongPooling(){return this.isWebSocketProtocol()&&this.status!==eo.CONNECTED&&this.status!==eo.RECONNECTING}getWebSocketProtocol(){return new qF(this.dotEventsSocketURL.getWebSocketURL(),this.loggerService)}getLongPollingProtocol(){return new Rie(this.dotEventsSocketURL.getLongPoolingURL(),this.loggerService,this.coreWebService)}isWebSocketsBrowserSupport(){return"WebSocket"in window||"MozWebSocket"in window}isWebSocketProtocol(){return this.protocolImpl instanceof qF}}_h.\u0275fac=function(t){return new(t||_h)(F(Fie),F(Zc),F(Mo),F(Gt))},_h.\u0275prov=H({token:_h,factory:_h.\u0275fac});class Ol{constructor(t,e){this.dotEventsSocket=t,this.loggerService=e,this.subjects=[]}destroy(){this.dotEventsSocket.destroy(),this.messagesSub.unsubscribe()}start(){this.loggerService.debug("start DotcmsEventsService",this.dotEventsSocket.isConnected()),this.dotEventsSocket.isConnected()||(this.loggerService.debug("Connecting with socket"),this.messagesSub=this.dotEventsSocket.connect().pipe(ci(()=>this.dotEventsSocket.messages())).subscribe(({event:t,payload:e})=>{this.subjects[t]||(this.subjects[t]=new le),this.subjects[t].next(e.data)},t=>{this.loggerService.debug("Error in the System Events service: "+t.message)},()=>{this.loggerService.debug("Completed")}))}subscribeTo(t){return this.subjects[t]||(this.subjects[t]=new le),this.subjects[t].asObservable()}subscribeToEvents(t){const e=new le;return t.forEach(i=>{this.subscribeTo(i).subscribe(r=>{e.next({data:r,name:i})})}),e.asObservable()}open(){return this.dotEventsSocket.open()}}Ol.\u0275fac=function(t){return new(t||Ol)(F(_h),F(Mo))},Ol.\u0275prov=H({token:Ol,factory:Ol.\u0275fac});var tm=(()=>(function(n){n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL"}(tm||(tm={})),tm))(),nm=(()=>(function(n){n.FULFILLED="fulfilled",n.REJECTED="rejected"}(nm||(nm={})),nm))(),ab=(()=>(function(n){n.EDIT="EDIT_MODE",n.PREVIEW="PREVIEW_MODE",n.LIVE="ADMIN_MODE"}(ab||(ab={})),ab))();class jie{constructor(t){this._params=t}get params(){return this._params}get layout(){return this._params.layout}get page(){return this._params.page}get containers(){return this._params.containers}get containerMap(){return Object.keys(this.containers).reduce((t,e)=>({...t,[e]:this.containers[e].container}),{})}get site(){return this._params.site}get template(){return this._params.template}get canCreateTemplate(){return this._params.canCreateTemplate}get viewAs(){return this._params.viewAs}get numberContents(){return this._params.numberContents}set numberContents(t){this._params.numberContents=t}}getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-20"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-30"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-50"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-70");const im="variantName";var am,Yn=(()=>(function(n){n.INIT="INIT",n.LOADING="LOADING",n.LOADED="LOADED",n.SAVING="SAVING",n.IDLE="IDLE"}(Yn||(Yn={})),Yn))();class Xc{constructor(t,e){this.coreWebService=t,this.dotcmsEventsService=e,this.country="",this.lang="",this._auth$=new le,this._logout$=new le,this._loginAsUsersList$=new le,this.urls={changePassword:"v1/changePassword",getAuth:"v1/authentication/logInUser",loginAs:"v1/users/loginas",logout:"v1/logout",logoutAs:"v1/users/logoutas",recoverPassword:"v1/forgotpassword",serverInfo:"v1/loginform",userAuth:"v1/authentication",current:"/api/v1/users/current/"},e.subscribeTo("SESSION_DESTROYED").subscribe(()=>{this.logOutUser(),this.clearExperimentPersistence()}),e.subscribeTo("SESSION_LOGOUT").subscribe(()=>{this.clearExperimentPersistence()})}get auth$(){return this._auth$.asObservable()}get logout$(){return this._logout$.asObservable()}get auth(){return this._auth}get loginAsUsersList$(){return this._loginAsUsersList$.asObservable()}get isLogin$(){return this.auth&&this.auth.user?Le(!0):this.loadAuth().pipe(fe(t=>!!t&&!!t.user))}getCurrentUser(){return this.coreWebService.request({url:this.urls.current}).pipe(fe(t=>t))}loadAuth(){return this.coreWebService.requestView({url:this.urls.getAuth}).pipe(Ie("entity"),yn(t=>{t.user&&this.setAuth(t)}),fe(t=>this.getFullAuth(t)))}changePassword(t,e){const i=JSON.stringify({password:t,token:e});return this.coreWebService.requestView({body:i,method:"POST",url:this.urls.changePassword}).pipe(Ie("entity"))}getLoginFormInfo(t,e){return this.setLanguage(t),this.coreWebService.requestView({body:{messagesKey:e,language:this.lang,country:this.country},method:"POST",url:this.urls.serverInfo}).pipe(Ie("bodyJsonObject"))}loginAs(t){return this.coreWebService.requestView({body:{password:t.password,userId:t.user.userId},method:"POST",url:this.urls.loginAs}).pipe(fe(e=>{if(!e.entity.loginAs)throw e.errorsMessages;return this.setAuth({loginAsUser:t.user,user:this._auth.user}),e}),Ie("entity","loginAs"))}loginUser({login:t,password:e,rememberMe:i,language:r,backEndLogin:o}){return this.setLanguage(r),this.coreWebService.requestView({body:{userId:t,password:e,rememberMe:i,language:this.lang,country:this.country,backEndLogin:o},method:"POST",url:this.urls.userAuth}).pipe(fe(s=>(this.setAuth({loginAsUser:null,user:s.entity}),this.coreWebService.subscribeToHttpError(Wc.UNAUTHORIZED).subscribe(()=>{this.logOutUser()}),s.entity)))}logoutAs(){return this.coreWebService.requestView({method:"PUT",url:`${this.urls.logoutAs}`}).pipe(fe(t=>(this.setAuth({loginAsUser:null,user:this._auth.user}),t.entity.logoutAs)))}recoverPassword(t){return this.coreWebService.requestView({body:{userId:t},method:"POST",url:this.urls.recoverPassword}).pipe(Ie("entity"))}watchUser(t){this.auth&&t(this.auth),this.auth$.subscribe(e=>{e.user&&t(e)})}setAuth(t){this._auth=this.getFullAuth(t),this._auth$.next(this.getFullAuth(t)),t.user?this.dotcmsEventsService.start():this._logout$.next()}setLanguage(t){if(void 0!==t&&""!==t){const e=t.split("_");this.lang=e[0],this.country=e[1]}else this.lang="",this.country=""}logOutUser(){window.location.href=`/dotAdmin/logout?r=${(new Date).getTime()}`}getFullAuth(t){const e=!!t.loginAsUser||!!Object.keys(t.loginAsUser||{}).length;return{...t,isLoginAs:e}}clearExperimentPersistence(){sessionStorage.removeItem(im)}}Xc.\u0275fac=function(t){return new(t||Xc)(F(Gt),F(Ol))},Xc.\u0275prov=H({token:Xc,factory:Xc.\u0275fac});class rm{constructor(t,e,i,r){this.router=e,this.coreWebService=i,this._menusChange$=new le,this._portletUrlSource$=new le,this._currentPortlet$=new le,this.urlMenus="v1/CORE_WEB/menu",this.portlets=new Map,t.watchUser(this.loadMenus.bind(this)),r.subscribeTo("UPDATE_PORTLET_LAYOUTS").subscribe(this.loadMenus.bind(this))}get currentPortletId(){return this._currentPortletId}get currentMenu(){return this.menus}get menusChange$(){return this._menusChange$.asObservable()}get portletUrl$(){return this._portletUrlSource$.asObservable()}get firstPortlet(){const t=this.portlets.entries().next().value;return t?t[0]:null}addPortletURL(t,e){this.portlets.set(t.replace(" ","_"),e)}getPortletURL(t){return this.portlets.get(t)}goToPortlet(t){this.router.gotoPortlet(t),this._currentPortletId=t}isPortlet(t){let e=this.getPortletId(t);return e.indexOf("?")>=0&&(e=e.substr(0,e.indexOf("?"))),this.portlets.has(e)}setCurrentPortlet(t){let e=this.getPortletId(t);e.indexOf("?")>=0&&(e=e.substr(0,e.indexOf("?"))),this._currentPortletId=e,this._currentPortlet$.next(e)}get currentPortlet$(){return this._currentPortlet$}setMenus(t){if(this.menus=t,this.menus.length){this.portlets=new Map;for(let e=0;e{this.setMenus(t.entity)},t=>this._menusChange$.error(t))}getPortletId(t){const e=t.split("/");return e[e.length-1]}}rm.\u0275fac=function(t){return new(t||rm)(F(Xc),F(yh),F(Gt),F(Ol))},rm.\u0275prov=H({token:rm,factory:rm.\u0275fac});class om{constructor(t,e,i,r){this.coreWebService=i,this.loggerService=r,this.events=["SAVE_SITE","PUBLISH_SITE","UPDATE_SITE_PERMISSIONS","UN_ARCHIVE_SITE","UPDATE_SITE","ARCHIVE_SITE"],this._switchSite$=new le,this._refreshSites$=new le,this.urls={currentSiteUrl:"v1/site/currentSite",sitesUrl:"v1/site",switchSiteUrl:"v1/site/switch"},e.subscribeToEvents(["ARCHIVE_SITE","UPDATE_SITE"]).subscribe(o=>this.eventResponse(o)),e.subscribeToEvents(this.events).subscribe(({data:o})=>this.siteEventsHandler(o)),e.subscribeToEvents(["SWITCH_SITE"]).subscribe(({data:o})=>this.setCurrentSite(o)),t.watchUser(()=>this.loadCurrentSite())}eventResponse({name:t,data:e}){this.loggerService.debug("Capturing Site event",t,e),e.identifier===this.selectedSite.identifier&&("ARCHIVE_SITE"===t?this.switchToDefaultSite().pipe(It(1),ci(r=>this.switchSite(r))).subscribe():this.loadCurrentSite())}siteEventsHandler(t){this._refreshSites$.next(t)}get refreshSites$(){return this._refreshSites$.asObservable()}get switchSite$(){return this._switchSite$.asObservable()}get currentSite(){return this.selectedSite}switchToDefaultSite(){return this.coreWebService.requestView({method:"PUT",url:"v1/site/switch"}).pipe(Ie("entity"))}getSiteById(t){return this.coreWebService.requestView({url:`/api/content/render/false/query/+contentType:host%20+identifier:${t}`}).pipe(Ie("contentlets"),fe(e=>e[0]))}switchSiteById(t){return this.loggerService.debug("Applying a Site Switch"),this.getSiteById(t).pipe(ci(e=>e?this.switchSite(e):Le(null)),It(1))}switchSite(t){return this.loggerService.debug("Applying a Site Switch",t.identifier),this.coreWebService.requestView({method:"PUT",url:`${this.urls.switchSiteUrl}/${t.identifier}`}).pipe(It(1),yn(()=>this.setCurrentSite(t)),fe(()=>t))}getCurrentSite(){return Cs(this.selectedSite?Le(this.selectedSite):this.requestCurrentSite(),this.switchSite$)}requestCurrentSite(){return this.coreWebService.requestView({url:this.urls.currentSiteUrl}).pipe(Ie("entity"))}setCurrentSite(t){this.selectedSite=t,this._switchSite$.next({...t})}loadCurrentSite(){this.getCurrentSite().pipe(It(1)).subscribe(t=>{this.setCurrentSite(t)})}}om.\u0275fac=function(t){return new(t||om)(F(Xc),F(Ol),F(Gt),F(Mo))},om.\u0275prov=H({token:om,factory:om.\u0275fac,providedIn:"root"});class eu{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}eu.\u0275fac=function(t){return new(t||eu)},eu.\u0275prov=H({token:eu,factory:eu.\u0275fac});class vh{storeValue(t,e){localStorage.setItem(t,e)}getValue(t){return localStorage.getItem(t)}clearValue(t){localStorage.removeItem(t)}clear(){localStorage.clear()}}vh.\u0275fac=function(t){return new(t||vh)},vh.\u0275prov=H({token:vh,factory:vh.\u0275fac});class sm{}sm.\u0275fac=function(t){return new(t||sm)},sm.\u0275mod=Xe({type:sm}),sm.\u0275inj=lt({providers:[vh]});let f1=((am=class{constructor(t){this.iconPath=t.iconPath}displayErrorMessage(t){this.displayMessage("Error",t,"error")}displaySuccessMessage(t){this.displayMessage("Success",t,"success")}displayInfoMessage(t){this.displayMessage("Info",t,"info")}displayMessage(t,e,i){let r;return r=new Notification(i,{body:e,icon:this.iconPath+"/"+i+".png"}),r}}).\u0275prov=H({token:am,factory:am.\u0275fac}),am);f1=function Vie(n,t,e,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,t,e,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(t,e,o):s(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o}([jy("config"),function Bie(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)}("design:paramtypes",[eu])],f1);class lm{}lm.\u0275fac=function(t){return new(t||lm)},lm.\u0275mod=Xe({type:lm}),lm.\u0275inj=lt({providers:[eu,f1]});class cm{constructor(t){this._http=t}request(t){t.method||(t.method="GET");const e={params:new ps};return t.params&&Object.keys(t.params).forEach(i=>{e.params=e.params.set(i,t.params[i])}),this._http.request(new ka(t.method,t.url,t.body,{params:e.params})).pipe(gn(i=>i.type===An.Response),fe(i=>{try{return i.body}catch{return i}}))}requestView(t){t.method||(t.method="GET");const e={headers:new Qr,params:new ps};return t.params&&Object.keys(t.params).forEach(i=>{e.params=e.params.set(i,t.params[i])}),this._http.request(new ka(t.method,t.url,t.body,{params:e.params})).pipe(gn(i=>i.type===An.Response),fe(i=>new jM(i)))}subscribeTo(t){return Le({error:t})}}function JF(n,t){return n.replace(/{(\d+)}/g,(e,i)=>typeof t[i]<"u"?t[i]:e)}cm.\u0275fac=function(t){return new(t||cm)(F(ur))},cm.\u0275prov=H({token:cm,factory:cm.\u0275fac});class um{constructor(){this.display=!1}show(){this.display=!0}hide(){this.display=!1}}um.\u0275fac=function(t){return new(t||um)},um.\u0275prov=H({token:um,factory:um.\u0275fac,providedIn:"root"});class bh{constructor(t){this.coreWebService=t,this.currentUsersUrl="v1/users/current/",this.userPermissionsUrl="v1/permissions/_bypermissiontype?userid={0}",this.porletAccessUrl="v1/portlet/{0}/_doesuserhaveaccess"}getCurrentUser(){return this.coreWebService.request({url:this.currentUsersUrl}).pipe(fe(t=>t))}getUserPermissions(t,e=[],i=[]){let r=e.length?`${this.userPermissionsUrl}&permission={1}`:this.userPermissionsUrl;r=i.length?`${r}&permissiontype={2}`:r;const o=JF(r,[t,e.join(","),i.join(",")]);return this.coreWebService.requestView({url:o}).pipe(It(1),Ie("entity"))}hasAccessToPortlet(t){return this.coreWebService.requestView({url:this.porletAccessUrl.replace("{0}",t)}).pipe(It(1),Ie("entity","response"))}}bh.\u0275fac=function(t){return new(t||bh)(F(Gt))},bh.\u0275prov=H({token:bh,factory:bh.\u0275fac});class dm{constructor(t,e){this.coreWebService=t,this.currentUser=e,this.bundleUrl="api/bundle/getunsendbundles/userid",this.addToBundleUrl="/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle"}getBundles(){return this.currentUser.getCurrentUser().pipe(ri(t=>this.coreWebService.requestView({url:`${this.bundleUrl}/${t.userId}`}).pipe(Ie("bodyJsonObject","items"))))}addToBundle(t,e){return this.coreWebService.request({body:`assetIdentifier=${t}&bundleName=${e.name}&bundleSelect=${e.id}`,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"POST",url:this.addToBundleUrl}).pipe(fe(i=>i))}}dm.\u0275fac=function(t){return new(t||dm)(F(Gt),F(bh))},dm.\u0275prov=H({token:dm,factory:dm.\u0275fac});const ej=n=>{const t=parseInt(n,0);if(t)return t;try{return JSON.parse(n)}catch{return n}};class wh{setItem(t,e){let i;i="object"==typeof e?JSON.stringify(e):e,localStorage.setItem(t,i)}getItem(t){const e=localStorage.getItem(t);return ej(e)}removeItem(t){localStorage.removeItem(t)}clear(){localStorage.clear()}listen(t){return xv(window,"storage").pipe(gn(({key:e})=>e===t),fe(e=>ej(e.newValue)))}}wh.\u0275fac=function(t){return new(t||wh)},wh.\u0275prov=H({token:wh,factory:wh.\u0275fac,providedIn:"root"});class zi{constructor(t,e){this.http=t,this.dotLocalstorageService=e,this.messageMap={},this.MESSAGES_LOCALSTORAGE_KEY="dotMessagesKeys",this.BUILDATE_LOCALSTORAGE_KEY="buildDate"}init(t){if(t&&(this.dotLocalstorageService.getItem(this.BUILDATE_LOCALSTORAGE_KEY)!==t?.buildDate||t.language))this.getAll(t.language||"default"),t.buildDate&&this.dotLocalstorageService.setItem(this.BUILDATE_LOCALSTORAGE_KEY,t.buildDate);else{const e=this.dotLocalstorageService.getItem(this.MESSAGES_LOCALSTORAGE_KEY);e?this.messageMap=e:this.getAll(t?.language||"default")}}get(t,...e){return this.messageMap[t]?e.length?JF(this.messageMap[t],e):this.messageMap[t]:t}getAll(t){this.http.get(this.geti18nURL(t)).pipe(It(1),Ie("entity")).subscribe(e=>{this.messageMap=e,this.dotLocalstorageService.setItem(this.MESSAGES_LOCALSTORAGE_KEY,this.messageMap)})}geti18nURL(t){return`/api/v2/languages/${t||"default"}/keys`}}zi.\u0275fac=function(t){return new(t||zi)(F(ur),F(wh))},zi.\u0275prov=H({token:zi,factory:zi.\u0275fac,providedIn:"root"});class hm{constructor(t,e){this.confirmationService=t,this.dotMessageService=e,this.alertModel=null,this.confirmModel=null,this._confirmDialogOpened$=new le}get confirmDialogOpened$(){return this._confirmDialogOpened$.asObservable()}confirm(t){t.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),reject:this.dotMessageService.get("dot.common.dialog.reject"),...t.footerLabel},this.confirmModel=t,setTimeout(()=>{this.confirmationService.confirm(t),this._confirmDialogOpened$.next(!0)},0)}alert(t){t.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),...t.footerLabel},this.alertModel=t,setTimeout(()=>{this._confirmDialogOpened$.next(!0)},0)}alertAccept(t){this.alertModel.accept&&this.alertModel.accept(t),this.alertModel=null}alertReject(t){this.alertModel.reject&&this.alertModel.reject(t),this.alertModel=null}clearConfirm(){this.confirmModel=null}}hm.\u0275fac=function(t){return new(t||hm)(F(Dl),F(zi))},hm.\u0275prov=H({token:hm,factory:hm.\u0275fac});class Ch{constructor(t){this.http=t}getFiltered(t,e,i=!1){return this.http.get(`/api/v1/containers/?filter=${t}&perPage=${e}&system=${i}`).pipe(Ie("entity"))}}function qie(n,t,e){return 0===e?[t]:(n.push(t),n)}Ch.\u0275fac=function(t){return new(t||Ch)(F(ur))},Ch.\u0275prov=H({token:Ch,factory:Ch.\u0275fac});class fm{constructor(t){this.coreWebService=t}getContentType(t){return this.coreWebService.requestView({url:`v1/contenttype/id/${t}`}).pipe(It(1),Ie("entity"))}getContentTypes({filter:t="",page:e=40,type:i=""}){return this.coreWebService.requestView({url:`/api/v1/contenttype?filter=${t}&orderby=name&direction=ASC&per_page=${e}${i?`&type=${i}`:""}`}).pipe(Ie("entity"))}getAllContentTypes(){return this.getBaseTypes().pipe(Cf(t=>t),gn(t=>!this.isRecentContentType(t))).pipe(function Kie(){return function Yie(n,t){return arguments.length>=2?function(i){return pe(Vv(n,t),Fp(1),ah(t))(i)}:function(i){return pe(Vv((r,o,s)=>n(r,o,s+1)),Fp(1))(i)}}(qie,[])}())}filterContentTypes(t="",e=""){return this.coreWebService.requestView({body:{filter:{types:e,query:t},orderBy:"name",direction:"ASC",perPage:40},method:"POST",url:"/api/v1/contenttype/_filter"}).pipe(Ie("entity"))}getUrlById(t){return this.getBaseTypes().pipe(Cf(e=>e),Ie("types"),Cf(e=>e),gn(e=>e.variable.toLocaleLowerCase()===t),Ie("action"))}isContentTypeInMenu(t){return this.getUrlById(t).pipe(fe(e=>!!e),ah(!1))}saveCopyContentType(t,e){return this.coreWebService.requestView({body:{...e},method:"POST",url:`/api/v1/contenttype/${t}/_copy`}).pipe(Ie("entity"))}isRecentContentType(t){return t.name.startsWith("RECENT")}getBaseTypes(){return this.coreWebService.requestView({url:"v1/contenttype/basetypes"}).pipe(Ie("entity"))}}fm.\u0275fac=function(t){return new(t||fm)(F(Gt))},fm.\u0275prov=H({token:fm,factory:fm.\u0275fac});class pm{constructor(){this.contentTypeInfoCollection=[{clazz:"com.dotcms.contenttype.model.type.ImmutableSimpleContentType",icon:"event_note",label:"content"},{clazz:"com.dotcms.contenttype.model.type.ImmutableWidgetContentType",icon:"settings",label:"widget"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFileAssetContentType",icon:"insert_drive_file",label:"fileasset"},{clazz:"com.dotcms.contenttype.model.type.ImmutableDotAssetContentType",icon:"file_copy",label:"dotasset"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePageContentType",icon:"description",label:"htmlpage"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePersonaContentType",icon:"person",label:"persona"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFormContentType",icon:"format_list_bulleted",label:"form"},{clazz:"com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType",icon:"format_strikethrough",label:"vanity_url"},{clazz:"com.dotcms.contenttype.model.type.ImmutableKeyValueContentType",icon:"public",label:"key_value"},{clazz:"com.dotcms.contenttype.model.type.ImmutableSimpleContentType",icon:"fa fa-newspaper-o",label:"content_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableWidgetContentType",icon:"fa fa-cog",label:"widget_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFileAssetContentType",icon:"fa fa-file-o",label:"fileasset_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableDotAssetContentType",icon:"fa fa-files-o",label:"dotasset_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePageContentType",icon:"fa fa-file-text-o",label:"htmlpage_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePersonaContentType",icon:"fa fa-user",label:"persona_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFormContentType",icon:"fa fa-list",label:"form_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType",icon:"fa fa-map-signs",label:"vanity_url_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableKeyValueContentType",icon:"fa fa-globe",label:"key_value_old"}]}getIcon(t){return this.getItem(t,"icon")}getClazz(t){return this.getItem(t,"clazz")}getLabel(t){return this.getItem(t,"label")}getItem(t,e){let i,r=!1;if(t.indexOf("_old")>0&&(r=!0,t=t.replace("_old","")),t){t=this.getTypeName(t);for(let o=0;or.lift(function Qie({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:e,scheduler:i}){let r,s,o=0,a=!1,l=!1;return function(u){let d;o++,!r||a?(a=!1,r=new K_(n,t,i),d=r.subscribe(this),s=u.subscribe({next(h){r.next(h)},error(h){a=!0,r.error(h)},complete(){l=!0,s=void 0,r.complete()}}),l&&(s=void 0)):d=r.subscribe(this),this.add(()=>{o--,d.unsubscribe(),d=void 0,s&&!l&&e&&0===o&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}gm.\u0275fac=function(t){return new(t||gm)(F(Gt))},gm.\u0275prov=H({token:gm,factory:gm.\u0275fac});class ym{constructor(t){this.http=t}copyInPage(t){const e={...t,personalization:t?.personalization||"dot:default"};return this.http.put("/api/v1/page/copyContent",e).pipe(tj(),Ie("entity"))}}ym.\u0275fac=function(t){return new(t||ym)(F(ur))},ym.\u0275prov=H({token:ym,factory:ym.\u0275fac,providedIn:"root"});class _m{constructor(t){this.coreWebService=t}postData(t,e){return this.coreWebService.requestView({body:e,method:"POST",url:`${t}`}).pipe(Ie("entity"))}putData(t,e){return this.coreWebService.requestView({body:e,method:"PUT",url:`${t}`}).pipe(Ie("entity"))}getDataById(t,e,i="entity"){return this.coreWebService.requestView({url:`${t}/id/${e}`}).pipe(Ie(i))}delete(t,e){return this.coreWebService.requestView({method:"DELETE",url:`${t}/${e}`}).pipe(Ie("entity"))}}_m.\u0275fac=function(t){return new(t||_m)(F(Gt))},_m.\u0275prov=H({token:_m,factory:_m.\u0275fac});class vm{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:["api","content","respectFrontendRoles/false","render/false","query/+contentType:previewDevice +live:true +deleted:false +working:true","limit/40/orderby/title"].join("/")}).pipe(Ie("contentlets"))}}vm.\u0275fac=function(t){return new(t||vm)(F(Gt))},vm.\u0275prov=H({token:vm,factory:vm.\u0275fac});class Ua{setVariationId(t){sessionStorage.setItem(im,t)}getVariationId(){return sessionStorage.getItem(im)||"DEFAULT"}removeVariantId(){sessionStorage.removeItem(im)}}Ua.\u0275fac=function(t){return new(t||Ua)},Ua.\u0275prov=H({token:Ua,factory:Ua.\u0275fac});class bm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}save(t,e){const i={method:"POST",body:e,url:`v1/page/${t}/content`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Ie("entity"))}whatChange(t,e){return this.coreWebService.requestView({url:`v1/page/${t}/render/versions?langId=${e}`}).pipe(Ie("entity"))}}bm.\u0275fac=function(t){return new(t||bm)(F(Gt),F(Ua))},bm.\u0275prov=H({token:bm,factory:bm.\u0275fac});var cb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(cb||(cb={})),cb))();class wm{constructor(t){this.coreWebService=t,this._paginationPerPage=40,this._offset="0",this._url="/api/content/_search",this._defaultQueryParams={"+languageId":"1","+deleted":"false","+working":"true"},this._sortField="modDate",this._sortOrder=cb.DESC,this._extraParams=new Map(Object.entries(this._defaultQueryParams))}get(t){this.setBaseParams(t);const e=this.getESQuery(t,this.getObjectFromMap(this._extraParams));return this.coreWebService.requestView({body:JSON.stringify(e),method:"POST",url:this._url}).pipe(Ie("entity"),It(1))}setExtraParams(t,e){null!=e&&this._extraParams.set(t,e.toString())}getESQuery(t,e){return{query:`${t.query} ${JSON.stringify(e).replace(/["{},]/g," ")}`,sort:`${this._sortField||""} ${this._sortOrder||""}`,limit:this._paginationPerPage,offset:this._offset}}setBaseParams(t){this._extraParams.clear(),this._paginationPerPage=t.itemsPerPage||this._paginationPerPage,this._sortField=t.sortField||this._sortField,this._sortOrder=t.sortOrder||this._sortOrder,this._offset=t.offset||this._offset,t.lang&&this.setExtraParams("+languageId",t.lang);let e=t.filter||"";e&&e.indexOf(" ")>0&&(e=`'${e.replace(/'/g,"\\'")}'`),e&&this.setExtraParams("+title",`${e}*`)}getObjectFromMap(t){return Array.from(t).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}}wm.\u0275fac=function(t){return new(t||wm)(F(Gt))},wm.\u0275prov=H({token:wm,factory:wm.\u0275fac});class Dh{constructor(){this.subject=new le}listen(t){return this.subject.asObservable().pipe(gn(e=>e.name===t))}notify(t,e){this.subject.next({name:t,data:e})}}Dh.\u0275fac=function(t){return new(t||Dh)},Dh.\u0275prov=H({token:Dh,factory:Dh.\u0275fac});class Cm{constructor(){this.data=new le}get showDialog$(){return this.data.asObservable()}open(t){this.data.next(t)}}Cm.\u0275fac=function(t){return new(t||Cm)},Cm.\u0275prov=H({token:Cm,factory:Cm.\u0275fac});class Dm{constructor(t){this.coreWebService=t}get(t){return this.coreWebService.requestView({url:t?`v2/languages?contentInode=${t}`:"v2/languages"}).pipe(Ie("entity"))}}Dm.\u0275fac=function(t){return new(t||Dm)(F(Gt))},Dm.\u0275prov=H({token:Dm,factory:Dm.\u0275fac});const Xie=[{icon:"tune",titleKey:"com.dotcms.repackage.javax.portlet.title.rules",url:"/rules"},{icon:"cloud_upload",titleKey:"com.dotcms.repackage.javax.portlet.title.publishing-queue",url:"/c/publishing-queue"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.site-search",url:"/c/site-search"},{icon:"person",titleKey:"com.dotcms.repackage.javax.portlet.title.personas",url:"/c/c_Personas"},{icon:"update",titleKey:"com.dotcms.repackage.javax.portlet.title.time-machine",url:"/c/time-machine"},{icon:"device_hub",titleKey:"com.dotcms.repackage.javax.portlet.title.workflow-schemes",url:"/c/workflow-schemes"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.es-search",url:"/c/es-search"},{icon:"business",titleKey:"Forms-and-Form-Builder",url:"/forms"},{icon:"apps",titleKey:"com.dotcms.repackage.javax.portlet.title.apps",url:"/apps"},{icon:"integration_instructions",titleKey:"com.dotcms.repackage.javax.portlet.title.velocity",url:"/c/velocity_playground"}];class Tm{constructor(t){this.coreWebService=t,this.unlicenseData=new Xr({icon:"",titleKey:"",url:""}),this.licenseURL="v1/appconfiguration"}isEnterprise(){return this.getLicense().pipe(fe(t=>t.level>=200))}canAccessEnterprisePortlet(t){return this.isEnterprise().pipe(It(1),fe(e=>{const i=this.checksIfEnterpriseUrl(t);return!i||i&&e}))}checksIfEnterpriseUrl(t){const e=Xie.filter(i=>0===t.indexOf(i.url));return e.length&&this.unlicenseData.next(...e),!!e.length}getLicense(){return this.license?Le(this.license):this.coreWebService.requestView({url:this.licenseURL}).pipe(Ie("entity","config","license"),yn(t=>{this.setLicense(t)}))}updateLicense(){this.coreWebService.requestView({url:this.licenseURL}).pipe(Ie("entity","config","license")).subscribe(t=>{this.setLicense(t)})}setLicense(t){this.license={...t}}}Tm.\u0275fac=function(t){return new(t||Tm)(F(Gt))},Tm.\u0275prov=H({token:Tm,factory:Tm.\u0275fac});class Mm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}save(t,e){const i={body:e,method:"POST",url:`v1/page/${t}/layout`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Ie("entity"),fe(o=>new jie(o)))}}Mm.\u0275fac=function(t){return new(t||Mm)(F(Gt),F(Ua))},Mm.\u0275prov=H({token:Mm,factory:Mm.\u0275fac});class Sm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}checkPermission(t){return this.coreWebService.requestView({body:{...t},method:"POST",url:"v1/page/_check-permission"}).pipe(Ie("entity"))}get({viewAs:t,mode:e,url:i},r){const o=this.getOptionalViewAsParams(t,e);return this.coreWebService.requestView({url:`v1/page/render/${i?.replace(/^\//,"")}`,params:{...r,...o}}).pipe(Ie("entity"))}getOptionalViewAsParams(t={},e=ab.PREVIEW){return{...this.getPersonaParam(t.persona),...this.getDeviceParam(t.device),...this.getLanguageParam(t.language),...this.getModeParam(e),variantName:this.dotSessionStorageService.getVariationId()}}getModeParam(t){return t?{mode:t}:{}}getPersonaParam(t){return t?{"com.dotmarketing.persona.id":t.identifier||""}:{}}getDeviceParam(t){return t?{device_inode:t.inode}:{}}getLanguageParam(t){return t?{language_id:t.toString()}:{}}}Sm.\u0275fac=function(t){return new(t||Sm)(F(Gt),F(Ua))},Sm.\u0275prov=H({token:Sm,factory:Sm.\u0275fac});class Em{constructor(t){this.coreWebService=t}getPages(t=""){return this.coreWebService.requestView({url:`/api/v1/page/types?filter=${t}`}).pipe(It(1),Ie("entity"))}}Em.\u0275fac=function(t){return new(t||Em)(F(Gt))},Em.\u0275prov=H({token:Em,factory:Em.\u0275fac});class xm{constructor(t){this.http=t}getByUrl(t){return this.http.post("/api/v1/page/actions",{host_id:t.host_id,language_id:t.language_id,url:t.url,renderMode:t.renderMode}).pipe(Ie("entity"))}}xm.\u0275fac=function(t){return new(t||xm)(F(ur))},xm.\u0275prov=H({token:xm,factory:xm.\u0275fac});class Im{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}personalized(t,e){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"POST",url:"/api/v1/personalization/pagepersonas",params:{variantName:i},body:{pageId:t,personaTag:e}}).pipe(Ie("entity"))}despersonalized(t,e){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"DELETE",url:`/api/v1/personalization/pagepersonas/page/${t}/personalization/${e}`,params:{variantName:i}}).pipe(Ie("entity"))}}Im.\u0275fac=function(t){return new(t||Im)(F(Gt),F(Ua))},Im.\u0275prov=H({token:Im,factory:Im.\u0275fac});class Om{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"content/respectFrontendRoles/false/render/false/query/+contentType:persona +live:true +deleted:false +working:true"}).pipe(Ie("contentlets"))}}Om.\u0275fac=function(t){return new(t||Om)(F(Gt))},Om.\u0275prov=H({token:Om,factory:Om.\u0275fac});class Am{constructor(t){this.http=t}getKey(t){return this.http.get("/api/v1/configuration/config",{params:{keys:t}}).pipe(It(1),Ie("entity",t))}getKeys(t){return this.http.get("/api/v1/configuration/config",{params:{keys:t.join()}}).pipe(It(1),Ie("entity"))}getKeyAsList(t){return this.http.get("/api/v1/configuration/config",{params:{keys:`list:${t}`}}).pipe(It(1),Ie("entity",t))}getFeatureFlag(t){return this.getKey(t).pipe(fe(e=>"true"===e))}getFeatureFlags(t){return this.getKeys(t).pipe(fe(e=>Object.keys(e).reduce((i,r)=>(i[r]="true"===e[r],i),{})))}}Am.\u0275fac=function(t){return new(t||Am)(F(ur))},Am.\u0275prov=H({token:Am,factory:Am.\u0275fac,providedIn:"root"});class km{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"/api/v1/pushpublish/filters/"}).pipe(Ie("entity"))}}km.\u0275fac=function(t){return new(t||km)(F(Gt))},km.\u0275prov=H({token:km,factory:km.\u0275fac});class Nm{constructor(t,e){this.dotMessageService=t,this.coreWebService=e}get(t,e){return this.coreWebService.requestView({url:`/api/v1/roles/${t}/rolehierarchyanduserroles?roleHierarchyForAssign=${e}`}).pipe(Ie("entity"),fe(this.processRolesResponse.bind(this)))}search(){return this.coreWebService.requestView({url:"/api/v1/roles/_search"}).pipe(Ie("entity"),fe(this.processRolesResponse.bind(this)))}processRolesResponse(t){return t.filter(e=>"anonymous"!==e.roleKey).map(e=>("CMS Anonymous"===e.roleKey?e.name=this.dotMessageService.get("current-user"):e.user&&(e.name=`${e.name}`),e))}}Nm.\u0275fac=function(t){return new(t||Nm)(F(zi),F(Gt))},Nm.\u0275prov=H({token:Nm,factory:Nm.\u0275fac});class Th{constructor(t){this.http=t,this.BASE_SITE_URL="/api/v1/site",this.params={archived:!1,live:!0,system:!0},this.defaultPerpage=10}set searchParam(t){this.params=t}getSites(t="*",e){return this.http.get(this.siteURL(t,e)).pipe(Ie("entity"))}siteURL(t,e){const r=`filter=${t}&perPage=${e||this.defaultPerpage}&${this.getQueryParams()}`;return`${this.BASE_SITE_URL}?${r}`}getQueryParams(){return Object.keys(this.params).map(t=>`${t}=${this.params[t]}`).join("&")}}Th.\u0275fac=function(t){return new(t||Th)(F(ur))},Th.\u0275prov=H({token:Th,factory:Th.\u0275fac,providedIn:"root"});class Pm{constructor(t){this.coreWebService=t}setSelectedFolder(t){return this.coreWebService.requestView({body:{path:t},method:"PUT",url:"/api/v1/browser/selectedfolder"}).pipe(It(1))}}Pm.\u0275fac=function(t){return new(t||Pm)(F(Gt))},Pm.\u0275prov=H({token:Pm,factory:Pm.\u0275fac});class Lm{constructor(t){this.coreWebService=t}getSuggestions(t){return this.coreWebService.requestView({url:"v1/tags"+(t?`?name=${t}`:"")}).pipe(Ie("bodyJsonObject"),fe(e=>Object.entries(e).map(([i,r])=>r)))}}Lm.\u0275fac=function(t){return new(t||Lm)(F(Gt))},Lm.\u0275prov=H({token:Lm,factory:Lm.\u0275fac});class Rm{constructor(t){this.coreWebService=t}get(t){return this.coreWebService.requestView({url:"v1/themes/id/"+t}).pipe(Ie("entity"))}}function nj(n,t,e,i,r,o,s){try{var a=n[o](s),l=a.value}catch(c){return void e(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function tu(n){return function(){var t=this,e=arguments;return new Promise(function(i,r){var o=n.apply(t,e);function s(l){nj(o,i,r,s,a,"next",l)}function a(l){nj(o,i,r,s,a,"throw",l)}s(void 0)})}}Rm.\u0275fac=function(t){return new(t||Rm)(F(Gt))},Rm.\u0275prov=H({token:Rm,factory:Rm.\u0275fac});const tre={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};class Mh{uploadFile({file:t,maxSize:e,signal:i}){return"string"==typeof t?this.uploadFileByURL(t,i):this.uploadBinaryFile({file:t,maxSize:e,signal:i})}uploadFileByURL(t,e){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:e,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:t})}).then(function(){var r=tu(function*(o){if(200===o.status)return(yield o.json()).tempFiles[0];throw{message:(yield o.json()).message,status:o.status}});return function(o){return r.apply(this,arguments)}}()).catch(r=>{const{message:o,response:s}=r,a="string"==typeof s?JSON.parse(s):s;throw this.errorHandler(a||{message:o},r.status)})}uploadBinaryFile({file:t,maxSize:e,signal:i}){let r="/api/v1/temp";r+=e?`?maxFileLength=${e}`:"";const o=new FormData;return o.append("file",t),fetch(r,{method:"POST",signal:i,headers:{Origin:window.location.hostname},body:o}).then(function(){var s=tu(function*(a){if(200===a.status)return(yield a.json()).tempFiles[0];throw{message:(yield a.json()).message,status:a.status}});return function(a){return s.apply(this,arguments)}}()).catch(s=>{throw this.errorHandler(JSON.parse(s.response),s.status)})}errorHandler(t,e){let i="";try{i=t.message||t.errors[0].message}catch{i=tre[e||500]}return{message:i,status:500|e}}}Mh.\u0275fac=function(t){return new(t||Mh)},Mh.\u0275prov=H({token:Mh,factory:Mh.\u0275fac,providedIn:"root"});class Fm{constructor(t){this.coreWebService=t}bringBack(t){return this.coreWebService.requestView({method:"PUT",url:`/api/v1/versionables/${t}/_bringback`}).pipe(Ie("entity"))}}Fm.\u0275fac=function(t){return new(t||Fm)(F(Gt))},Fm.\u0275prov=H({token:Fm,factory:Fm.\u0275fac});var nu=(()=>(function(n){n.NEW="NEW",n.DESTROY="DESTROY",n.PUBLISH="PUBLISH",n.EDIT="EDIT"}(nu||(nu={})),nu))();class jm{constructor(t){this.coreWebService=t}fireTo(t,e,i){return this.coreWebService.requestView({body:i,method:"PUT",url:`v1/workflow/actions/${e}/fire?inode=${t}&indexPolicy=WAIT_FOR`}).pipe(Ie("entity"))}bulkFire(t){return this.coreWebService.requestView({body:t,method:"PUT",url:"/api/v1/workflow/contentlet/actions/bulk/fire"}).pipe(Ie("entity"))}newContentlet(t,e){return this.request({contentType:t,data:e,action:nu.NEW})}publishContentlet(t,e,i){return this.request({contentType:t,data:e,action:nu.PUBLISH,individualPermissions:i})}saveContentlet(t){return this.request({data:t,action:nu.EDIT})}deleteContentlet(t){return this.request({data:t,action:nu.DESTROY})}publishContentletAndWaitForIndex(t,e,i){return this.publishContentlet(t,{...e,indexPolicy:"WAIT_FOR"},i)}request({contentType:t,data:e,action:i,individualPermissions:r}){const o=t?{contentType:t,...e}:e;return this.coreWebService.requestView({method:"PUT",url:`v1/workflow/actions/default/fire/${i}${e.inode?`?inode=${e.inode}`:""}`,body:r?{contentlet:o,individualPermissions:r}:{contentlet:o}}).pipe(It(1),Ie("entity"))}}jm.\u0275fac=function(t){return new(t||jm)(F(Gt))},jm.\u0275prov=H({token:jm,factory:jm.\u0275fac});class zm{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"v1/workflow/schemes"}).pipe(Ie("entity"))}getSystem(){return this.get().pipe(ci(t=>t.filter(e=>e.system)),It(1))}}zm.\u0275fac=function(t){return new(t||zm)(F(Gt))},zm.\u0275prov=H({token:zm,factory:zm.\u0275fac});class Vm{constructor(t){this.coreWebService=t}getByWorkflows(t=[]){return this.coreWebService.requestView({method:"POST",url:"/api/v1/workflow/schemes/actions/NEW",body:{schemes:t.map(this.getWorkFlowId)}}).pipe(Ie("entity"))}getByInode(t,e){return this.coreWebService.requestView({url:`v1/workflow/contentlet/${t}/actions${e?`?renderMode=${e}`:""}`}).pipe(Ie("entity"))}getWorkFlowId(t){return t&&t.id}}Vm.\u0275fac=function(t){return new(t||Vm)(F(Gt))},Vm.\u0275prov=H({token:Vm,factory:Vm.\u0275fac});var ub=(()=>(function(n){n[n.ASC=1]="ASC",n[n.DESC=-1]="DESC"}(ub||(ub={})),ub))();class Xi{constructor(t){this.coreWebService=t,this.links={},this.paginationPerPage=40,this._extraParams=new Map}get url(){return this._url}set url(t){this._url!==t&&(this.links={},this._url=t)}get filter(){return this._filter}set filter(t){this._filter!==t&&(this.links={},this._filter=t)}set searchParam(t){this._searchParam!==t&&(this.links=t.length>0?{}:this.links,this._searchParam=t)}get searchParam(){return this._searchParam}setExtraParams(t,e){null!=e&&(this.extraParams.set(t,e.toString()),this.links={})}deleteExtraParams(t){this.extraParams.delete(t)}resetExtraParams(){this.extraParams.clear()}get extraParams(){return this._extraParams}get sortField(){return this._sortField}set sortField(t){this._sortField!==t&&(this.links={},this._sortField=t)}get sortOrder(){return this._sortOrder}set sortOrder(t){this._sortOrder!==t&&(this.links={},this._sortOrder=t)}get(t){const e={...this.getParams(),...this.getObjectFromMap(this.extraParams)},i=this.sanitizeQueryParams(t,e);return this.coreWebService.requestView({params:e,url:i||this.url}).pipe(fe(r=>(this.setLinks(r.header(Xi.LINK_HEADER_NAME)),this.paginationPerPage=parseInt(r.header(Xi.PAGINATION_PER_PAGE_HEADER_NAME),10),this.currentPage=parseInt(r.header(Xi.PAGINATION_CURRENT_PAGE_HEADER_NAME),10),this.maxLinksPage=parseInt(r.header(Xi.PAGINATION_MAX_LINK_PAGES_HEADER_NAME),10),this.totalRecords=parseInt(r.header(Xi.PAGINATION_TOTAL_ENTRIES_HEADER_NAME),10),r.entity)),It(1))}getLastPage(){return this.get(this.links.last)}getFirstPage(){return this.get(this.links.first)}getPage(t=1){const e=this.links["x-page"]?this.links["x-page"].replace("pageValue",String(t)):void 0;return this.get(e)}getCurrentPage(){return this.getPage(this.currentPage)}getNextPage(){return this.get(this.links.next)}getPrevPage(){return this.get(this.links.prev)}getWithOffset(t){const e=this.getPageFromOffset(t);return this.getPage(e)}getPageFromOffset(t){return parseInt(String(t/this.paginationPerPage),10)+1}setLinks(t){(t?.split(",")||[]).forEach(i=>{const r=i.split(";"),o=r[0].substring(1,r[0].length-1),s=r[1].split("="),a=s[1].substring(1,s[1].length-1);this.links[a]=o.trim()})}getParams(){const t=new Map;return this.filter&&t.set("filter",this.filter),this.searchParam&&t.set("searchParam",this.searchParam),this.sortField&&t.set("orderby",this.sortField),this.sortOrder&&t.set("direction",ub[this.sortOrder]),this.paginationPerPage&&t.set("per_page",String(this.paginationPerPage)),this.getObjectFromMap(t)}getObjectFromMap(t){return Array.from(t).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}sanitizeQueryParams(t="",e){const i=t?.split("?"),r=i[0],o=i[1];if(!o)return t;const s=new URLSearchParams(o);for(const a in e)s.delete(a);return s.toString()?`${r}?${s.toString()}`:r}}Xi.LINK_HEADER_NAME="Link",Xi.PAGINATION_PER_PAGE_HEADER_NAME="X-Pagination-Per-Page",Xi.PAGINATION_CURRENT_PAGE_HEADER_NAME="X-Pagination-Current-Page",Xi.PAGINATION_MAX_LINK_PAGES_HEADER_NAME="X-Pagination-Link-Pages",Xi.PAGINATION_TOTAL_ENTRIES_HEADER_NAME="X-Pagination-Total-Entries",Xi.\u0275fac=function(t){return new(t||Xi)(F(Gt))},Xi.\u0275prov=H({token:Xi,factory:Xi.\u0275fac});class Bm{constructor(t){this.http=t,this.seoToolsUrl="assets/seo/page-tools.json"}get(){return this.http.get(this.seoToolsUrl).pipe(Ie("pageTools"))}}function fr(n){this.content=n}Bm.\u0275fac=function(t){return new(t||Bm)(F(ur))},Bm.\u0275prov=H({token:Bm,factory:Bm.\u0275fac}),fr.prototype={constructor:fr,find:function(n){for(var t=0;t>1}},fr.from=function(n){if(n instanceof fr)return n;var t=[];if(n)for(var e in n)t.push(e,n[e]);return new fr(t)};const ij=fr;function rj(n,t,e){for(let i=0;;i++){if(i==n.childCount||i==t.childCount)return n.childCount==t.childCount?null:e;let r=n.child(i),o=t.child(i);if(r!=o){if(!r.sameMarkup(o))return e;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)e++;return e}if(r.content.size||o.content.size){let s=rj(r.content,o.content,e+1);if(null!=s)return s}e+=r.nodeSize}else e+=r.nodeSize}}function oj(n,t,e,i){for(let r=n.childCount,o=t.childCount;;){if(0==r||0==o)return r==o?null:{a:e,b:i};let s=n.child(--r),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:e,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ct&&!1!==i(l,r+a,o||null,s)&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,e-u),i,r+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,i,r){let o="",s=!0;return this.nodesBetween(t,e,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(t,l)-l,e-l),s=!i):a.isLeaf?(r?o+="function"==typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),s=!i):!s&&a.isBlock&&(o+=i,s=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,i=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(i)&&(r[r.length-1]=e.withText(e.text+i.text),o=1);ot)for(let o=0,s=0;st&&((se)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),i.push(a),r+=a.nodeSize),s=l}return new ue(i,r)}cutByIndex(t,e){return t==e?ue.empty:0==t&&e==this.content.length?this:new ue(this.content.slice(t,e))}replaceChild(t,e){let i=this.content[t];if(i==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-i.nodeSize;return r[t]=e,new ue(r,o)}addToStart(t){return new ue([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ue(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let i=0,r=0;;i++){let s=r+this.child(i).nodeSize;if(s>=t)return s==t||e>0?db(i+1,s):db(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return ue.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new ue(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ue.empty;let e,i=0;for(let r=0;r{class n{constructor(e,i){this.type=e,this.attrs=i}addToSet(e){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=e.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=e.slice()),r||i.push(this),i}removeFromSet(e){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})();class fb extends Error{}class De{constructor(t,e,i){this.content=t,this.openStart=e,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let i=aj(this.content,t+this.openStart,e);return i&&new De(i,this.openStart,this.openEnd)}removeBetween(t,e){return new De(sj(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return De.empty;let i=e.openStart||0,r=e.openEnd||0;if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new De(ue.fromJSON(t,e.content),i,r)}static maxOpen(t,e=!0){let i=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new De(t,i,r)}}function sj(n,t,e){let{index:i,offset:r}=n.findIndex(t),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(e);if(r==t||o.isText){if(a!=e&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(sj(o.content,t-r-1,e-r-1)))}function aj(n,t,e,i){let{index:r,offset:o}=n.findIndex(t),s=n.maybeChild(r);if(o==t||s.isText)return i&&!i.canReplace(r,r,e)?null:n.cut(0,t).append(e).append(n.cut(t));let a=aj(s.content,t-o-1,e);return a&&n.replaceChild(r,s.copy(a))}function nre(n,t,e){if(e.openStart>n.depth)throw new fb("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new fb("Inconsistent open depths");return lj(n,t,e,0)}function lj(n,t,e,i){let r=n.index(i),o=n.node(i);if(r==t.index(i)&&i=0;o--)r=t.node(o).copy(ue.from(r));return{start:r.resolveNoCache(n.openStart+e),end:r.resolveNoCache(r.content.size-n.openEnd-e)}}(e,n);return ru(o,uj(n,s,a,t,i))}{let s=n.parent,a=s.content;return ru(s,a.cut(0,n.parentOffset).append(e.content).append(a.cut(t.parentOffset)))}}return ru(o,pb(n,t,i))}function cj(n,t){if(!t.type.compatibleContent(n.type))throw new fb("Cannot join "+t.type.name+" onto "+n.type.name)}function m1(n,t,e){let i=n.node(e);return cj(i,t.node(e)),i}function iu(n,t){let e=t.length-1;e>=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function Um(n,t,e,i){let r=(t||n).node(e),o=0,s=t?t.index(e):r.childCount;n&&(o=n.index(e),n.depth>e?o++:n.textOffset&&(iu(n.nodeAfter,i),o++));for(let a=o;ar&&m1(n,t,r+1),s=i.depth>r&&m1(e,i,r+1),a=[];return Um(null,n,r,a),o&&s&&t.index(r)==e.index(r)?(cj(o,s),iu(ru(o,uj(n,t,e,i,r+1)),a)):(o&&iu(ru(o,pb(n,t,r+1)),a),Um(t,e,r,a),s&&iu(ru(s,pb(e,i,r+1)),a)),Um(i,null,r,a),new ue(a)}function pb(n,t,e){let i=[];return Um(null,n,e,i),n.depth>e&&iu(ru(m1(n,t,e+1),pb(n,t,e+1)),i),Um(t,null,e,i),new ue(i)}De.empty=new De(ue.empty,0,0);class Hm{constructor(t,e,i){this.pos=t,this.path=e,this.parentOffset=i,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(e);return i?t.child(e).cut(i):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let i=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!e||e(this.node(i))))return new mb(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let i=[],r=0,o=e;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(i.push(s,a,r+l),!c||(s=s.child(a),s.isText))break;o=c-1,r+=l+1}return new Hm(e,i,o)}static resolveCached(t,e){for(let r=0;rt&&this.nodesBetween(t,e,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),dj(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,i=ue.empty,r=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(let l=r;le.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(e=>e.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,i)}let r=ue.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,i)}}Gs.prototype.text=void 0;class gb extends Gs{constructor(t,e,i,r){if(super(t,e,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):dj(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new gb(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new gb(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function dj(n,t){for(let e=n.length-1;e>=0;e--)t=n[e].type.name+"("+t+")";return t}class ou{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let i=new sre(t,e);if(null==i.next)return ou.empty;let r=hj(i);i.next&&i.err("Unexpected trailing text");let o=function fre(n){let t=Object.create(null);return function e(i){let r=[];i.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||r.push([a,c=[]]),-1==c.indexOf(u)&&c.push(u)})})});let o=t[i.join(",")]=new ou(i.indexOf(n.length-1)>-1);for(let s=0;sl.concat(o(c,a)),[]);if("seq"!=s.type){if("star"==s.type){let l=e();return i(a,l),r(o(s.expr,l),l),[i(l)]}if("plus"==s.type){let l=e();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}if("opt"==s.type)return[i(a)].concat(o(s.expr,a));if("range"==s.type){let l=a;for(let c=0;cl.to=a)}}(r));return function pre(n,t){for(let e=0,i=[n];ec.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(i){t.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(i.next[s].next);return o}).join("\n")}}ou.empty=new ou(!0);class sre{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function hj(n){let t=[];do{t.push(are(n))}while(n.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function are(n){let t=[];do{t.push(lre(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function lre(n){let t=function dre(n){if(n.eat("(")){let t=hj(n);return n.eat(")")||n.err("Missing closing paren"),t}if(!/\W/.test(n.next)){let t=function ure(n,t){let e=n.nodeTypes,i=e[t];if(i)return[i];let r=[];for(let o in e){let s=e[o];s.groups.indexOf(t)>-1&&r.push(s)}return 0==r.length&&n.err("No node type or group '"+t+"' found"),r}(n,n.next).map(e=>(null==n.inline?n.inline=e.isInline:n.inline!=e.isInline&&n.err("Mixing inline and block content"),{type:"name",value:e}));return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);for(;;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else{if(!n.eat("{"))break;t=cre(n,t)}return t}function fj(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let t=Number(n.next);return n.pos++,t}function cre(n,t){let e=fj(n),i=e;return n.eat(",")&&(i="}"!=n.next?fj(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:i,expr:t}}function pj(n,t){return t-n}function mj(n,t){let e=[];return function i(r){let o=n[r];if(1==o.length&&!o[0].term)return i(o[0].to);e.push(r);for(let s=0;s-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;ei[o]=new yb(o,e,s));let r=e.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}}class mre{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class _b{constructor(t,e,i,r){this.name=t,this.rank=e,this.schema=i,this.spec=r,this.attrs=_j(r.attrs),this.excluded=null;let o=gj(this.attrs);this.instance=o?new kn(this,o):null}create(t=null){return!t&&this.instance?this.instance:new kn(this,yj(this.attrs,t))}static compile(t,e){let i=Object.create(null),r=0;return t.forEach((o,s)=>i[o]=new _b(o,r++,e,s)),i}removeFromSet(t){for(var e=0;e-1}}class gre{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=ij.from(t.nodes),e.marks=ij.from(t.marks||{}),this.nodes=yb.compile(this.spec.nodes,this),this.marks=_b.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=i[s]||(i[s]=ou.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?vj(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(let r in this.marks){let o=this.marks[r],s=o.spec.excludes;o.excluded=null==s?[o]:""==s?[]:vj(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,i,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof yb))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,i,r)}text(t,e){let i=this.nodes.text;return new gb(i,i.defaultAttrs,t,kn.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return Gs.fromJSON(this,t)}markFromJSON(t){return kn.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function vj(n,t){let e=[];for(let i=0;i-1)&&e.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return e}class Sh{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(i=>{i.tag?this.tags.push(i):i.style&&this.styles.push(i)}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let r=t.nodes[i.node];return r.contentMatch.matchType(r)})}parse(t,e={}){let i=new Dj(this,e,!1);return i.addAll(t,e.from,e.to),i.finish()}parseSlice(t,e={}){let i=new Dj(this,e,!0);return i.addAll(t,e.from,e.to),De.maxOpen(i.finish())}matchTag(t,e,i){for(let r=i?this.tags.indexOf(i)+1:0;rt.length&&(61!=a.charCodeAt(t.length)||a.slice(t.length+1)!=e))){if(s.getAttrs){let l=s.getAttrs(e);if(!1===l)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let e=[];function i(r){let o=null==r.priority?50:r.priority,s=0;for(;s{i(s=Tj(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in t.nodes){let o=t.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=Tj(s)),s.node||s.ignore||s.mark||(s.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Sh(t,Sh.schemaRules(t)))}}const bj={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},yre={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},wj={ol:!0,ul:!0};function Cj(n,t,e){return null!=t?(t?1:0)|("full"===t?2:0):n&&"pre"==n.whitespace?3:-5&e}class wb{constructor(t,e,i,r,o,s,a){this.type=t,this.attrs=e,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=kn.none,this.stashMarks=[],this.match=s||(4&a?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(ue.from(t));if(!e){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let e=ue.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(ue.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,i=this.pendingMarks;e{s.clearMark(a)&&(i=a.addToSet(i))}):e=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(e),!1!==s.consuming)break;o=s}return[e,i]}addElementByRule(t,e,i){let r,o,s;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(s=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;"string"==typeof e.contentElement?l=t.querySelector(e.contentElement):"function"==typeof e.contentElement?l=e.contentElement(t):e.contentElement&&(l=e.contentElement),this.findAround(t,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,e,i){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,s=null==i?null:t.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,i=o,!s.length)||o.solid)break}if(!e)return!1;this.sync(i);for(let r=0;rthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let i=this.nodes[e].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),i=this.options.context,r=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),o=(r?0:1)-(i?i.depth+1:0),s=(a,l)=>{for(;a>=0;a--){let c=e[a];if(""==c){if(a==e.length-1||0==a)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||0==l&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;l--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let i=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let e in this.parser.schema.nodes){let i=this.parser.schema.nodes[e];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(t){let e=function Cre(n,t){for(let e=0;e=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let s=r.popFromStashMark(t);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==e)break}}}function vre(n,t){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,t)}function Tj(n){let t={};for(let e in n)t[e]=n[e];return t}function wre(n,t){let e=t.schema.nodes;for(let i in e){let r=e[i];if(!r.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l{if(o.length||s.marks.length){let a=0,l=0;for(;a=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,e,i={}){let r=this.marks[t.type.name];return r&&Ys.renderSpec(_1(i),r(t,e))}static renderSpec(t,e,i=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r=e[0],o=r.indexOf(" ");o>0&&(i=r.slice(0,o),r=r.slice(o+1));let s,a=i?t.createElementNS(i,r):t.createElement(r),l=e[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){c=2;for(let u in l)if(null!=l[u]){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:h,contentDOM:f}=Ys.renderSpec(t,d,i);if(a.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Ys(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=Mj(t.nodes);return e.text||(e.text=i=>i.text),e}static marksFromSchema(t){return Mj(t.marks)}}function Mj(n){let t={};for(let e in n){let i=n[e].spec.toDOM;i&&(t[e]=i)}return t}function _1(n){return n.document||window.document}const Ej=Math.pow(2,16);function Dre(n,t){return n+t*Ej}function xj(n){return 65535&n}class v1{constructor(t,e,i){this.pos=t,this.delInfo=e,this.recover=i}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class Ho{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&Ho.empty)return Ho.empty}recover(t){let e=0,i=xj(t);if(!this.inverted)for(let r=0;rt)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(t<=d){let f=l+r+((c?t==l?-1:t==d?1:e:e)<0?0:u);if(i)return f;let p=t==(e<0?l:d)?null:Dre(a/3,t-l),m=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(m|=8),new v1(f,m,p)}r+=u-c}return i?t+r:new v1(t+r,0,null)}touches(t,e){let i=0,r=xj(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*r)return!0;i+=this.ranges[a+s]-c}return!1}forEach(t){let e=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?i-r-1:void 0)}}invert(){let t=new Eh;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let i=this.from;io&&ls.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,r),e.openStart,e.openEnd);return _i.fromReplace(t,this.from,this.to,o)}invert(){return new qs(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new Al(e.pos,i.pos,this.mark)}merge(t){return t instanceof Al&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Al(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Al(e.from,e.to,t.markFromJSON(e.mark))}}Vi.jsonID("addMark",Al);class qs extends Vi{constructor(t,e,i){super(),this.from=t,this.to=e,this.mark=i}apply(t){let e=t.slice(this.from,this.to),i=new De(w1(e.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),e.openStart,e.openEnd);return _i.fromReplace(t,this.from,this.to,i)}invert(){return new Al(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new qs(e.pos,i.pos,this.mark)}merge(t){return t instanceof qs&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new qs(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new qs(e.from,e.to,t.markFromJSON(e.mark))}}Vi.jsonID("removeMark",qs);class kl extends Vi{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return _i.fail("No node at mark step's position");let i=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return _i.fromReplace(t,this.pos,this.pos+1,new De(ue.from(i),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let i=this.mark.addToSet(e.marks);if(i.length==e.marks.length){for(let r=0;ri.pos?null:new Bi(e.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Bi(e.from,e.to,e.gapFrom,e.gapTo,De.fromJSON(t,e.slice),e.insert,!!e.structure)}}function C1(n,t,e){let i=n.resolve(t),r=e-t,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function xre(n,t,e){return(0==t||n.canReplace(t,n.childCount))&&(e==n.childCount||n.canReplace(0,e))}function Ih(n){let e=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let i=n.depth;;--i){let r=n.$from.node(i),o=n.$from.index(i),s=n.$to.indexAfter(i);if(io;c--,u--){let d=r.node(c),h=r.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=i&&i[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=i&&i[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function Nl(n,t){let e=n.resolve(t),i=e.index();return Nj(e.nodeBefore,e.nodeAfter)&&e.parent.canReplace(i,i+1)}function Nj(n,t){return!(!n||!t||n.isLeaf||!n.canAppend(t))}function Pj(n,t,e=-1){let i=n.resolve(t);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):e>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&Nj(o,s)&&i.node(r).canReplace(a,a+1))return t;if(0==r)break;t=e<0?i.before(r):i.after(r)}}function Lj(n,t,e){let i=n.resolve(t);if(!e.content.size)return t;let r=e.content;for(let o=0;o=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),c=i.node(s),u=!1;if(1==o)u=c.canReplace(l,l,r);else{let d=c.contentMatchAt(l).findWrapping(r.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return 0==a?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function T1(n,t,e=t,i=De.empty){if(t==e&&!i.size)return null;let r=n.resolve(t),o=n.resolve(e);return Rj(r,o,i)?new pr(t,e,i):new zre(r,o,i).fit()}function Rj(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}Vi.jsonID("replaceAround",Bi);class zre{constructor(t,e,i){this.$from=t,this.$to=e,this.unplaced=i,this.frontier=[],this.placed=ue.empty;for(let r=0;r<=t.depth;r++){let o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=ue.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(t<0?this.$to:i.doc.resolve(t));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new De(o,s,a);return t>-1?new Bi(i.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||i.pos!=this.$to.pos?new pr(i.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){t=i;break}e=o.content}for(let e=1;e<=2;e++)for(let i=1==e?t:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=M1(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let u,{type:l,match:c}=this.frontier[a],d=null;if(1==e&&(s?c.matchType(s.type)||(d=c.fillBefore(ue.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(2==e&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=M1(t,e);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new De(t,e+1,Math.max(i,r.size+e>=t.size-i?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=M1(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new De(Wm(t,e-1,1),e-1,o?e-1:i)}else this.unplaced=new De(Wm(t,e,1),e,i)}placeNodes({sliceDepth:t,frontierDepth:e,parent:i,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let m=0;m1||0==l||m.content.size)&&(d=g,u.push(Fj(m.mark(h.allowedMarks(m.marks)),1==c?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=Gm(this.placed,e,ue.from(u)),this.frontier[e].match=d,p&&f<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(t){e:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:i,type:r}=this.frontier[e],o=e=0;a--){let{match:l,type:c}=this.frontier[a],u=S1(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:e,fit:s,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Gm(this.placed,e.depth,e.fit)),t=e.move;for(let i=e.depth+1;i<=t.depth;i++){let r=t.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(i));this.openFrontierNode(r.type,r.attrs,o)}return t}openFrontierNode(t,e=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Gm(this.placed,this.depth,ue.from(t.create(e,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(ue.empty,!0);e.childCount&&(this.placed=Gm(this.placed,this.frontier.length,e))}}function Wm(n,t,e){return 0==t?n.cutByIndex(e,n.childCount):n.replaceChild(0,n.firstChild.copy(Wm(n.firstChild.content,t-1,e)))}function Gm(n,t,e){return 0==t?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(Gm(n.lastChild.content,t-1,e)))}function M1(n,t){for(let e=0;e1&&(i=i.replaceChild(0,Fj(i.firstChild,t-1,1==i.childCount?e-1:0))),t>0&&(i=n.type.contentMatch.fillBefore(i).append(i),e<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(ue.empty,!0)))),n.copy(i)}function S1(n,t,e,i,r){let o=n.node(t),s=r?n.indexAfter(t):n.index(t);if(s==o.childCount&&!e.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function Vre(n,t,e){for(let i=e;ii){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(ue.empty,!0))}return n}function zj(n,t){let e=[];for(let r=Math.min(n.depth,t.depth);r>=0;r--){let o=n.start(r);if(ot.pos+(t.depth-r)||n.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==n.depth&&r==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&e.push(r)}return e}class Oh extends Vi{constructor(t,e,i){super(),this.pos=t,this.attr=e,this.value=i}apply(t){let e=t.nodeAt(this.pos);if(!e)return _i.fail("No node at attribute step's position");let i=Object.create(null);for(let o in e.attrs)i[o]=e.attrs[o];i[this.attr]=this.value;let r=e.type.create(i,null,e.marks);return _i.fromReplace(t,this.pos,this.pos+1,new De(ue.from(r),0,e.isLeaf?0:1))}getMap(){return Ho.empty}invert(t){return new Oh(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Oh(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new Oh(e.pos,e.attr,e.value)}}Vi.jsonID("attr",Oh);let Ah=class extends Error{};Ah=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(Ah.prototype=Object.create(Error.prototype)).constructor=Ah,Ah.prototype.name="TransformError";class E1{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Eh}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Ah(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,i=De.empty){let r=T1(this.doc,t,e,i);return r&&this.step(r),this}replaceWith(t,e,i){return this.replace(t,e,new De(ue.from(i),0,0))}delete(t,e){return this.replace(t,e,De.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,i){return function Ure(n,t,e,i){if(!i.size)return n.deleteRange(t,e);let r=n.doc.resolve(t),o=n.doc.resolve(e);if(Rj(r,o,i))return n.step(new pr(t,e,i));let s=zj(r,n.doc.resolve(e));0==s[s.length-1]&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let h=r.depth,f=r.pos-1;h>0;h--,f--){let p=r.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?a=h:r.before(h)==f&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=i.openStart;for(let h=i.content,f=0;;f++){let p=h.firstChild;if(c.push(p),f==i.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let f=c[h].type,p=Bre(f);if(p&&r.node(l).type!=f)u=h;else if(p||!f.isTextblock)break}for(let h=i.openStart;h>=0;h--){let f=(h+u+1)%(i.openStart+1),p=c[f];if(p)for(let m=0;m=0&&(n.replace(t,e,i),!(n.steps.length>d));h--){let f=s[h];f<0||(t=r.before(f),e=o.after(f))}}(this,t,e,i),this}replaceRangeWith(t,e,i){return function Hre(n,t,e,i){if(!i.isInline&&t==e&&n.doc.resolve(t).parent.content.size){let r=function jre(n,t,e){let i=n.resolve(t);if(i.parent.canReplaceWith(i.index(),i.index(),e))return t;if(0==i.parentOffset)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,e))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,e))return i.after(r+1);if(o0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return n.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(t-i.start(s)==i.depth-s&&e>i.end(s)&&r.end(s)-e!=r.depth-s)return n.delete(i.before(s),e);n.delete(t,e)}(this,t,e),this}lift(t,e){return function Ire(n,t,e){let{$from:i,$to:r,depth:o}=t,s=i.before(o+1),a=r.after(o+1),l=s,c=a,u=ue.empty,d=0;for(let p=o,m=!1;p>e;p--)m||i.index(p)>0?(m=!0,u=ue.from(i.node(p).copy(u)),d++):l--;let h=ue.empty,f=0;for(let p=o,m=!1;p>e;p--)m||r.after(p+1)=0;s--){if(i.size){let a=e[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=ue.from(e[s].type.create(e[s].attrs,i))}let r=t.start,o=t.end;n.step(new Bi(r,o,r,o,new De(i,0,0),e.length,!0))}(this,t,e),this}setBlockType(t,e=t,i,r=null){return function Nre(n,t,e,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(t,e,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&function Pre(n,t,e){let i=n.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,e)}(n.doc,n.mapping.slice(o).map(a),i)){n.clearIncompatible(n.mapping.slice(o).map(a,1),i);let l=n.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return n.step(new Bi(c,u,c+1,u-1,new De(ue.from(i.create(r,null,s.marks)),0,0),1,!0)),!1}})}(this,t,e,i,r),this}setNodeMarkup(t,e,i=null,r){return function Lre(n,t,e,i,r){let o=n.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);let s=e.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(t,t+o.nodeSize,s);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);n.step(new Bi(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new De(ue.from(s),0,0),1,!0))}(this,t,e,i,r),this}setNodeAttribute(t,e,i){return this.step(new Oh(t,e,i)),this}addNodeMark(t,e){return this.step(new kl(t,e)),this}removeNodeMark(t,e){if(!(e instanceof kn)){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(i.marks)))return this}return this.step(new xh(t,e)),this}split(t,e=1,i){return function Rre(n,t,e=1,i){let r=n.doc.resolve(t),o=ue.empty,s=ue.empty;for(let a=r.depth,l=r.depth-e,c=e-1;a>l;a--,c--){o=ue.from(r.node(a).copy(o));let u=i&&i[c];s=ue.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new pr(t,t,new De(o.append(s),e,e),!0))}(this,t,e,i),this}addMark(t,e,i){return function Mre(n,t,e,i){let s,a,r=[],o=[];n.doc.nodesBetween(t,e,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let h=Math.max(c,t),f=Math.min(c+l.nodeSize,e),p=i.addToSet(d);for(let m=0;mn.step(l)),o.forEach(l=>n.step(l))}(this,t,e,i),this}removeMark(t,e,i){return function Sre(n,t,e,i){let r=[],o=0;n.doc.nodesBetween(t,e,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof _b){let u,c=s.marks;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,e);for(let u=0;un.step(new qs(s.from,s.to,s.style)))}(this,t,e,i),this}clearIncompatible(t,e,i){return function Ere(n,t,e,i=e.contentMatch){let r=n.doc.nodeAt(t),o=[],s=t+1;for(let a=0;a=0;a--)n.step(o[a])}(this,t,e,i),this}}const x1=Object.create(null);class ot{constructor(t,e,i){this.$anchor=t,this.$head=e,this.ranges=i||[new Vj(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e=0;o--){let s=e<0?kh(t.node(0),t.node(o),t.before(o+1),t.index(o),e,i):kh(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,i);if(s)return s}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Eo(t.node(0))}static atStart(t){return kh(t,t,0,0,1)||new Eo(t)}static atEnd(t){return kh(t,t,t.content.size,t.childCount,-1)||new Eo(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=x1[e.type];if(!i)throw new RangeError(`No selection type ${e.type} defined`);return i.fromJSON(t,e)}static jsonID(t,e){if(t in x1)throw new RangeError("Duplicate use of selection JSON ID "+t);return x1[t]=e,e.prototype.jsonID=t,e}getBookmark(){return it.between(this.$anchor,this.$head).getBookmark()}}ot.prototype.visible=!0;class Vj{constructor(t,e){this.$from=t,this.$to=e}}let Bj=!1;function Uj(n){!Bj&&!n.parent.inlineContent&&(Bj=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class it extends ot{constructor(t,e=t){Uj(t),Uj(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let i=t.resolve(e.map(this.head));if(!i.parent.inlineContent)return ot.near(i);let r=t.resolve(e.map(this.anchor));return new it(r.parent.inlineContent?r:i,i)}replace(t,e=De.empty){if(super.replace(t,e),e==De.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof it&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Db(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new it(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,i=e){let r=t.resolve(e);return new this(r,i==e?r:t.resolve(i))}static between(t,e,i){let r=t.pos-e.pos;if((!i||r)&&(i=r>=0?1:-1),!e.parent.inlineContent){let o=ot.findFrom(e,i,!0)||ot.findFrom(e,-i,!0);if(!o)return ot.near(e,i);e=o.$head}return t.parent.inlineContent||(0==r||(t=(ot.findFrom(t,-i,!0)||ot.findFrom(t,i,!0)).$anchor).posnew Eo(n)};function kh(n,t,e,i,r,o=!1){if(t.inlineContent)return it.create(n,e);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let a=t.child(s);if(a.isAtom){if(!o&&Qe.isSelectable(a))return Qe.create(n,e-(r<0?a.nodeSize:0))}else{let l=kh(n,a,e+r,r<0?a.childCount:0,r,o);if(l)return l}e+=a.nodeSize*r}return null}function Hj(n,t,e){let i=n.steps.length-1;if(i{null==s&&(s=u)}),n.setSelection(ot.near(n.doc.resolve(s),e)))}class Gre extends E1{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return kn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let i=this.selection;return e&&(t=t.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||kn.none))),i.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,i){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==i&&(i=e),i=i??e,!t)return this.deleteRange(e,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(e);o=i==e?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(e,i,r.text(t,o)),this.selection.empty||this.setSelection(ot.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Gj(n,t){return t&&n?n.bind(t):n}class Ym{constructor(t,e,i){this.name=t,this.init=Gj(e.init,i),this.apply=Gj(e.apply,i)}}const Yre=[new Ym("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new Ym("selection",{init:(n,t)=>n.selection||ot.atStart(t.doc),apply:n=>n.selection}),new Ym("storedMarks",{init:n=>n.storedMarks||null,apply:(n,t,e,i)=>i.selection.$cursor?n.storedMarks:null}),new Ym("scrollToSelection",{init:()=>0,apply:(n,t)=>n.scrolledIntoView?t+1:t})];class O1{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Yre.slice(),e&&e.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new Ym(i.key,i.spec.state,i))})}}class Nh{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let i=0;ii.toJSON())),t&&"object"==typeof t)for(let i in t){if("doc"==i||"selection"==i)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[i],o=r.spec.state;o&&o.toJSON&&(e[i]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,i){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new O1(t.schema,t.plugins),o=new Nh(r);return r.fields.forEach(s=>{if("doc"==s.name)o.doc=Gs.fromJSON(t.schema,e.doc);else if("selection"==s.name)o.selection=ot.fromJSON(o.doc,e.selection);else if("storedMarks"==s.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(e,a))return void(o[s.name]=c.fromJSON.call(l,t,e[a],o))}o[s.name]=s.init(t,o)}}),o}}function Yj(n,t,e){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(t):"handleDOMEvents"==i&&(r=Yj(r,t,{})),e[i]=r}return e}class qt{constructor(t){this.spec=t,this.props={},t.props&&Yj(t.props,this,this.props),this.key=t.key?t.key.key:qj("plugin")}getState(t){return t[this.key]}}const A1=Object.create(null);function qj(n){return n in A1?n+"$"+ ++A1[n]:(A1[n]=0,n+"$")}class an{constructor(t="key"){this.key=qj(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}function xo(n){if(null==n)return window;if("[object Window]"!==n.toString()){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function su(n){return n instanceof xo(n).Element||n instanceof Element}function $o(n){return n instanceof xo(n).HTMLElement||n instanceof HTMLElement}function k1(n){return!(typeof ShadowRoot>"u")&&(n instanceof xo(n).ShadowRoot||n instanceof ShadowRoot)}var au=Math.max,Mb=Math.min,Ph=Math.round;function N1(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Kj(){return!/^((?!chrome|android).)*safari/i.test(N1())}function Lh(n,t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=n.getBoundingClientRect(),r=1,o=1;t&&$o(n)&&(r=n.offsetWidth>0&&Ph(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&Ph(i.height)/n.offsetHeight||1);var a=(su(n)?xo(n):window).visualViewport,l=!Kj()&&e,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function P1(n){var t=xo(n);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ks(n){return n?(n.nodeName||"").toLowerCase():null}function Pl(n){return((su(n)?n.ownerDocument:n.document)||window.document).documentElement}function L1(n){return Lh(Pl(n)).left+P1(n).scrollLeft}function $a(n){return xo(n).getComputedStyle(n)}function R1(n){var t=$a(n);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function Zre(n,t,e){void 0===e&&(e=!1);var i=$o(t),r=$o(t)&&function Qre(n){var t=n.getBoundingClientRect(),e=Ph(t.width)/n.offsetWidth||1,i=Ph(t.height)/n.offsetHeight||1;return 1!==e||1!==i}(t),o=Pl(t),s=Lh(n,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==Ks(t)||R1(o))&&(a=function Kre(n){return n!==xo(n)&&$o(n)?function qre(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):P1(n)}(t)),$o(t)?((l=Lh(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=L1(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function F1(n){var t=Lh(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function Sb(n){return"html"===Ks(n)?n:n.assignedSlot||n.parentNode||(k1(n)?n.host:null)||Pl(n)}function Qj(n){return["html","body","#document"].indexOf(Ks(n))>=0?n.ownerDocument.body:$o(n)&&R1(n)?n:Qj(Sb(n))}function qm(n,t){var e;void 0===t&&(t=[]);var i=Qj(n),r=i===(null==(e=n.ownerDocument)?void 0:e.body),o=xo(i),s=r?[o].concat(o.visualViewport||[],R1(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(qm(Sb(s)))}function Jre(n){return["table","td","th"].indexOf(Ks(n))>=0}function Zj(n){return $o(n)&&"fixed"!==$a(n).position?n.offsetParent:null}function Km(n){for(var t=xo(n),e=Zj(n);e&&Jre(e)&&"static"===$a(e).position;)e=Zj(e);return e&&("html"===Ks(e)||"body"===Ks(e)&&"static"===$a(e).position)?t:e||function Xre(n){var t=/firefox/i.test(N1());if(/Trident/i.test(N1())&&$o(n)&&"fixed"===$a(n).position)return null;var r=Sb(n);for(k1(r)&&(r=r.host);$o(r)&&["html","body"].indexOf(Ks(r))<0;){var o=$a(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(n)||t}var to="top",Wo="bottom",Go="right",no="left",j1="auto",Qm=[to,Wo,Go,no],Rh="start",Zm="end",Jj="viewport",Jm="popper",Xj=Qm.reduce(function(n,t){return n.concat([t+"-"+Rh,t+"-"+Zm])},[]),e3=[].concat(Qm,[j1]).reduce(function(n,t){return n.concat([t,t+"-"+Rh,t+"-"+Zm])},[]),doe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function hoe(n){var t=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){t.set(o.name,o)}),n.forEach(function(o){e.has(o.name)||r(o)}),i}function poe(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}var t3={placement:"bottom",modifiers:[],strategy:"absolute"};function n3(){for(var n=arguments.length,t=new Array(n),e=0;e=0?"x":"y"}function r3(n){var l,t=n.reference,e=n.element,i=n.placement,r=i?Qs(i):null,o=i?Fh(i):null,s=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2;switch(r){case to:l={x:s,y:t.y-e.height};break;case Wo:l={x:s,y:t.y+t.height};break;case Go:l={x:t.x+t.width,y:a};break;case no:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?z1(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Rh:l[c]=l[c]-(t[u]/2-e[u]/2);break;case Zm:l[c]=l[c]+(t[u]/2-e[u]/2)}}return l}const boe={name:"popperOffsets",enabled:!0,phase:"read",fn:function voe(n){var t=n.state;t.modifiersData[n.name]=r3({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var woe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function o3(n){var t,e=n.popper,i=n.popperRect,r=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,h=s.x,f=void 0===h?0:h,p=s.y,m=void 0===p?0:p,g="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),w=no,_=to,N=window;if(c){var S=Km(e),J="clientHeight",Q="clientWidth";S===xo(e)&&"static"!==$a(S=Pl(e)).position&&"absolute"===a&&(J="scrollHeight",Q="scrollWidth"),(r===to||(r===no||r===Go)&&o===Zm)&&(_=Wo,m-=(d&&S===N&&N.visualViewport?N.visualViewport.height:S[J])-i.height,m*=l?1:-1),r!==no&&(r!==to&&r!==Wo||o!==Zm)||(w=Go,f-=(d&&S===N&&N.visualViewport?N.visualViewport.width:S[Q])-i.width,f*=l?1:-1)}var st,vt=Object.assign({position:a},c&&woe),ct=!0===u?function Coe(n,t){var i=n.y,r=t.devicePixelRatio||1;return{x:Ph(n.x*r)/r||0,y:Ph(i*r)/r||0}}({x:f,y:m},xo(e)):{x:f,y:m};return f=ct.x,m=ct.y,Object.assign({},vt,l?((st={})[_]=b?"0":"",st[w]=y?"0":"",st.transform=(N.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",st):((t={})[_]=b?m+"px":"",t[w]=y?f+"px":"",t.transform="",t))}const Toe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function Doe(n){var t=n.state,e=n.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,l=void 0===a||a,c={placement:Qs(t.placement),variation:Fh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,o3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,o3(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},s3={name:"applyStyles",enabled:!0,phase:"write",fn:function Moe(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!$o(o)||!Ks(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function Soe(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],o=t.attributes[i]||{},a=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]).reduce(function(l,c){return l[c]="",l},{});!$o(r)||!Ks(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}},requires:["computeStyles"]},Ioe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function xoe(n){var t=n.state,i=n.name,r=n.options.offset,o=void 0===r?[0,0]:r,s=e3.reduce(function(u,d){return u[d]=function Eoe(n,t,e){var i=Qs(n),r=[no,to].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},t,{placement:n})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[no,Go].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,t.rects,o),u},{}),a=s[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}};var Ooe={left:"right",right:"left",bottom:"top",top:"bottom"};function xb(n){return n.replace(/left|right|bottom|top/g,function(t){return Ooe[t]})}var Aoe={start:"end",end:"start"};function a3(n){return n.replace(/start|end/g,function(t){return Aoe[t]})}function l3(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&k1(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function V1(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function c3(n,t,e){return t===Jj?V1(function koe(n,t){var e=xo(n),i=Pl(n),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Kj();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+L1(n),y:l}}(n,e)):su(t)?function Poe(n,t){var e=Lh(n,!1,"fixed"===t);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(t,e):V1(function Noe(n){var t,e=Pl(n),i=P1(n),r=null==(t=n.ownerDocument)?void 0:t.body,o=au(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=au(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+L1(n),l=-i.scrollTop;return"rtl"===$a(r||e).direction&&(a+=au(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Pl(n)))}function d3(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function h3(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}function Xm(n,t){void 0===t&&(t={});var i=t.placement,r=void 0===i?n.placement:i,o=t.strategy,s=void 0===o?n.strategy:o,a=t.boundary,l=void 0===a?"clippingParents":a,c=t.rootBoundary,u=void 0===c?Jj:c,d=t.elementContext,h=void 0===d?Jm:d,f=t.altBoundary,p=void 0!==f&&f,m=t.padding,g=void 0===m?0:m,y=d3("number"!=typeof g?g:h3(g,Qm)),w=n.rects.popper,_=n.elements[p?h===Jm?"reference":Jm:h],N=function Roe(n,t,e,i){var r="clippingParents"===t?function Loe(n){var t=qm(Sb(n)),i=["absolute","fixed"].indexOf($a(n).position)>=0&&$o(n)?Km(n):n;return su(i)?t.filter(function(r){return su(r)&&l3(r,i)&&"body"!==Ks(r)}):[]}(n):[].concat(t),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=c3(n,c,i);return l.top=au(u.top,l.top),l.right=Mb(u.right,l.right),l.bottom=Mb(u.bottom,l.bottom),l.left=au(u.left,l.left),l},c3(n,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(su(_)?_:_.contextElement||Pl(n.elements.popper),l,u,s),S=Lh(n.elements.reference),J=r3({reference:S,element:w,strategy:"absolute",placement:r}),Q=V1(Object.assign({},w,J)),ke=h===Jm?Q:S,$e={top:N.top-ke.top+y.top,bottom:ke.bottom-N.bottom+y.bottom,left:N.left-ke.left+y.left,right:ke.right-N.right+y.right},vt=n.modifiersData.offset;if(h===Jm&&vt){var ct=vt[r];Object.keys($e).forEach(function(st){var vn=[Go,Wo].indexOf(st)>=0?1:-1,Ot=[to,Wo].indexOf(st)>=0?"y":"x";$e[st]+=ct[Ot]*vn})}return $e}const Voe={name:"flip",enabled:!0,phase:"main",fn:function zoe(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,f=e.flipVariations,p=void 0===f||f,m=e.allowedAutoPlacements,g=t.options.placement,y=Qs(g),w=l||(y!==g&&p?function joe(n){if(Qs(n)===j1)return[];var t=xb(n);return[a3(n),t,a3(t)]}(g):[xb(g)]),_=[g].concat(w).reduce(function(Ft,nr){return Ft.concat(Qs(nr)===j1?function Foe(n,t){void 0===t&&(t={});var r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=void 0===l?e3:l,u=Fh(t.placement),d=u?a?Xj:Xj.filter(function(p){return Fh(p)===u}):Qm,h=d.filter(function(p){return c.indexOf(p)>=0});0===h.length&&(h=d);var f=h.reduce(function(p,m){return p[m]=Xm(n,{placement:m,boundary:r,rootBoundary:o,padding:s})[Qs(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}(t,{placement:nr,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):nr)},[]),N=t.rects.reference,S=t.rects.popper,J=new Map,Q=!0,ke=_[0],$e=0;$e<_.length;$e++){var vt=_[$e],ct=Qs(vt),st=Fh(vt)===Rh,vn=[to,Wo].indexOf(ct)>=0,Ot=vn?"width":"height",ce=Xm(t,{placement:vt,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),me=vn?st?Go:no:st?Wo:to;N[Ot]>S[Ot]&&(me=xb(me));var be=xb(me),He=[];if(o&&He.push(ce[ct]<=0),a&&He.push(ce[me]<=0,ce[be]<=0),He.every(function(Ft){return Ft})){ke=vt,Q=!1;break}J.set(vt,He)}if(Q)for(var dn=function(nr){var lo=_.find(function(In){var Kt=J.get(In);if(Kt)return Kt.slice(0,nr).every(function(pt){return pt})});if(lo)return ke=lo,"break"},Vt=p?3:1;Vt>0&&"break"!==dn(Vt);Vt--);t.placement!==ke&&(t.modifiersData[i]._skip=!0,t.placement=ke,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function eg(n,t,e){return au(n,Mb(t,e))}const $oe={name:"preventOverflow",enabled:!0,phase:"main",fn:function Hoe(n){var t=n.state,e=n.options,i=n.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,f=void 0===h||h,p=e.tetherOffset,m=void 0===p?0:p,g=Xm(t,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=Qs(t.placement),b=Fh(t.placement),w=!b,_=z1(y),N=function Boe(n){return"x"===n?"y":"x"}(_),S=t.modifiersData.popperOffsets,J=t.rects.reference,Q=t.rects.popper,ke="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,$e="number"==typeof ke?{mainAxis:ke,altAxis:ke}:Object.assign({mainAxis:0,altAxis:0},ke),vt=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ct={x:0,y:0};if(S){if(o){var st,vn="y"===_?to:no,Ot="y"===_?Wo:Go,ce="y"===_?"height":"width",me=S[_],be=me+g[vn],He=me-g[Ot],kt=f?-Q[ce]/2:0,dn=b===Rh?J[ce]:Q[ce],Vt=b===Rh?-Q[ce]:-J[ce],xn=t.elements.arrow,Ft=f&&xn?F1(xn):{width:0,height:0},nr=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},lo=nr[vn],In=nr[Ot],Kt=eg(0,J[ce],Ft[ce]),pt=w?J[ce]/2-kt-Kt-lo-$e.mainAxis:dn-Kt-lo-$e.mainAxis,Bn=w?-J[ce]/2+kt+Kt+In+$e.mainAxis:Vt+Kt+In+$e.mainAxis,Rr=t.elements.arrow&&Km(t.elements.arrow),lc=null!=(st=vt?.[_])?st:0,Hu=me+Bn-lc,sy=eg(f?Mb(be,me+pt-lc-(Rr?"y"===_?Rr.clientTop||0:Rr.clientLeft||0:0)):be,me,f?au(He,Hu):He);S[_]=sy,ct[_]=sy-me}if(a){var ay,el=S[N],uc="y"===N?"height":"width",ly=el+g["x"===_?to:no],$u=el-g["x"===_?Wo:Go],cy=-1!==[to,no].indexOf(y),hw=null!=(ay=vt?.[N])?ay:0,fw=cy?ly:el-J[uc]-Q[uc]-hw+$e.altAxis,pw=cy?el+J[uc]+Q[uc]-hw-$e.altAxis:$u,mw=f&&cy?function Uoe(n,t,e){var i=eg(n,t,e);return i>e?e:i}(fw,el,pw):eg(f?fw:ly,el,f?pw:$u);S[N]=mw,ct[N]=mw-el}t.modifiersData[i]=ct}},requiresIfExists:["offset"]},qoe={name:"arrow",enabled:!0,phase:"main",fn:function Goe(n){var t,e=n.state,i=n.name,r=n.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Qs(e.placement),l=z1(a),u=[no,Go].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(t,e){return d3("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:h3(t,Qm))}(r.padding,e),h=F1(o),f="y"===l?to:no,p="y"===l?Wo:Go,m=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],g=s[l]-e.rects.reference[l],y=Km(o),b=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,S=b/2-h[u]/2+(m/2-g/2),J=eg(d[f],S,b-h[u]-d[p]);e.modifiersData[i]=((t={})[l]=J,t.centerOffset=J-S,t)}},effect:function Yoe(n){var t=n.state,i=n.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||l3(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function f3(n,t,e){return void 0===e&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function p3(n){return[to,Go,Wo,no].some(function(t){return n[t]>=0})}var Qoe=[_oe,boe,Toe,s3,Ioe,Voe,$oe,qoe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Koe(n){var t=n.state,e=n.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=Xm(t,{elementContext:"reference"}),a=Xm(t,{altBoundary:!0}),l=f3(s,i),c=f3(a,r,o),u=p3(l),d=p3(c);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],Zoe=goe({defaultModifiers:Qoe}),m3="tippy-content",y3="tippy-arrow",_3="tippy-svg-arrow",Ll={passive:!0,capture:!0},v3=function(){return document.body};function B1(n,t,e){return Array.isArray(n)?n[t]??(Array.isArray(e)?e[t]:e):n}function U1(n,t){var e={}.toString.call(n);return 0===e.indexOf("[object")&&e.indexOf(t+"]")>-1}function b3(n,t){return"function"==typeof n?n.apply(void 0,t):n}function w3(n,t){return 0===t?n:function(i){clearTimeout(e),e=setTimeout(function(){n(i)},t)};var e}function Rl(n){return[].concat(n)}function C3(n,t){-1===n.indexOf(t)&&n.push(t)}function jh(n){return[].slice.call(n)}function T3(n){return Object.keys(n).reduce(function(t,e){return void 0!==n[e]&&(t[e]=n[e]),t},{})}function lu(){return document.createElement("div")}function Ib(n){return["Element","Fragment"].some(function(t){return U1(n,t)})}function W1(n,t){n.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function tg(n,t){n.forEach(function(e){e&&e.setAttribute("data-state",t)})}function G1(n,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,e)})}function E3(n,t){for(var e=t;e;){var i;if(n.contains(e))return!0;e=null==e.getRootNode||null==(i=e.getRootNode())?void 0:i.host}return!1}var Zs={isTouch:!1},x3=0;function ose(){Zs.isTouch||(Zs.isTouch=!0,window.performance&&document.addEventListener("mousemove",I3))}function I3(){var n=performance.now();n-x3<20&&(Zs.isTouch=!1,document.removeEventListener("mousemove",I3)),x3=n}function sse(){var n=document.activeElement;(function M3(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var cse=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,io=Object.assign({appendTo:v3,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),fse=Object.keys(io);function P3(n){var e=(n.plugins||[]).reduce(function(i,r){var a,o=r.name;return o&&(i[o]=void 0!==n[o]?n[o]:null!=(a=io[o])?a:r.defaultValue),i},{});return Object.assign({},n,e)}function L3(n,t){var e=Object.assign({},t,{content:b3(t.content,[n])},t.ignoreAttributes?{}:function mse(n,t){return(t?Object.keys(P3(Object.assign({},io,{plugins:t}))):fse).reduce(function(r,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return r;if("content"===o)r[o]=s;else try{r[o]=JSON.parse(s)}catch{r[o]=s}return r},{})}(n,t.plugins));return e.aria=Object.assign({},io.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?t.interactive:e.aria.expanded,content:"auto"===e.aria.content?t.interactive?null:"describedby":e.aria.content},e}function Y1(n,t){n.innerHTML=t}function R3(n){var t=lu();return!0===n?t.className=y3:(t.className=_3,Ib(n)?t.appendChild(n):Y1(t,n)),t}function F3(n,t){Ib(t.content)?(Y1(n,""),n.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Y1(n,t.content):n.textContent=t.content)}function Ob(n){var t=n.firstElementChild,e=jh(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(m3)}),arrow:e.find(function(i){return i.classList.contains(y3)||i.classList.contains(_3)}),backdrop:e.find(function(i){return i.classList.contains("tippy-backdrop")})}}function j3(n){var t=lu(),e=lu();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=lu();function r(o,s){var a=Ob(t),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&F3(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(R3(s.arrow))):l.appendChild(R3(s.arrow)):u&&l.removeChild(u)}return i.className=m3,i.setAttribute("data-state","hidden"),F3(i,n.props),t.appendChild(e),e.appendChild(i),r(n.props,n.props),{popper:t,onUpdate:r}}j3.$$tippy=!0;var yse=1,Ab=[],kb=[];function _se(n,t){var i,r,o,u,d,h,m,e=L3(n,Object.assign({},io,P3(T3(t)))),s=!1,a=!1,l=!1,c=!1,f=[],p=w3(cc,e.interactiveDebounce),g=yse++,b=function tse(n){return n.filter(function(t,e){return n.indexOf(t)===e})}(e.plugins),_={id:g,reference:n,popper:lu(),popperInstance:null,props:e,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function fw(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function pw(ee){if(!_.state.isDestroyed){be("onBeforeUpdate",[_,ee]),Uu();var We=_.props,mt=L3(n,Object.assign({},We,T3(ee),{ignoreAttributes:!0}));_.props=mt,Rr(),We.interactiveDebounce!==mt.interactiveDebounce&&(dn(),p=w3(cc,mt.interactiveDebounce)),We.triggerTarget&&!mt.triggerTarget?Rl(We.triggerTarget).forEach(function(En){En.removeAttribute("aria-expanded")}):mt.triggerTarget&&n.removeAttribute("aria-expanded"),kt(),me(),J&&J(We,mt),_.popperInstance&&(uw(),uc().forEach(function(En){requestAnimationFrame(En._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[_,ee])}},setContent:function mw(ee){_.setProps({content:ee})},show:function NCe(){var ee=_.state.isVisible,We=_.state.isDestroyed,mt=!_.state.isEnabled,En=Zs.isTouch&&!_.props.touch,hn=B1(_.props.duration,0,io.duration);if(!(ee||We||mt||En||st().hasAttribute("disabled")||(be("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,ct()&&(S.style.visibility="visible"),me(),nr(),_.state.isMounted||(S.style.transition="none"),ct()){var Fr=Ot();W1([Fr.box,Fr.content],0)}h=function(){var Wu;if(_.state.isVisible&&!c){if(c=!0,S.style.transition=_.props.moveTransition,ct()&&_.props.animation){var WE=Ot(),gw=WE.box,wf=WE.content;W1([gw,wf],hn),tg([gw,wf],"visible")}He(),kt(),C3(kb,_),null==(Wu=_.popperInstance)||Wu.forceUpdate(),be("onMount",[_]),_.props.animation&&ct()&&function Kt(ee,We){pt(ee,We)}(hn,function(){_.state.isShown=!0,be("onShown",[_])})}},function el(){var We,ee=_.props.appendTo,mt=st();(We=_.props.interactive&&ee===v3||"parent"===ee?mt.parentNode:b3(ee,[mt])).contains(S)||We.appendChild(S),_.state.isMounted=!0,uw()}()}},hide:function PCe(){var ee=!_.state.isVisible,We=_.state.isDestroyed,mt=!_.state.isEnabled,En=B1(_.props.duration,1,io.duration);if(!(ee||We||mt)&&(be("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,c=!1,s=!1,ct()&&(S.style.visibility="hidden"),dn(),lo(),me(!0),ct()){var hn=Ot(),Fr=hn.box,Xo=hn.content;_.props.animation&&(W1([Fr,Xo],En),tg([Fr,Xo],"hidden"))}He(),kt(),_.props.animation?ct()&&function In(ee,We){pt(ee,function(){!_.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&We()})}(En,_.unmount):_.unmount()}},hideWithInteractivity:function LCe(ee){vn().addEventListener("mousemove",p),C3(Ab,p),p(ee)},enable:function cy(){_.state.isEnabled=!0},disable:function hw(){_.hide(),_.state.isEnabled=!1},unmount:function RCe(){_.state.isVisible&&_.hide(),_.state.isMounted&&(dw(),uc().forEach(function(ee){ee._tippy.unmount()}),S.parentNode&&S.parentNode.removeChild(S),kb=kb.filter(function(ee){return ee!==_}),_.state.isMounted=!1,be("onHidden",[_]))},destroy:function FCe(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),Uu(),delete n._tippy,_.state.isDestroyed=!0,be("onDestroy",[_]))}};if(!e.render)return _;var N=e.render(_),S=N.popper,J=N.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+_.id,_.popper=S,n._tippy=_,S._tippy=_;var Q=b.map(function(ee){return ee.fn(_)}),ke=n.hasAttribute("aria-expanded");return Rr(),kt(),me(),be("onCreate",[_]),e.showOnCreate&&ly(),S.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&vn().addEventListener("mousemove",p)}),_;function $e(){var ee=_.props.touch;return Array.isArray(ee)?ee:[ee,0]}function vt(){return"hold"===$e()[0]}function ct(){var ee;return!(null==(ee=_.props.render)||!ee.$$tippy)}function st(){return m||n}function vn(){var ee=st().parentNode;return ee?function S3(n){var t,i=Rl(n)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(ee):document}function Ot(){return Ob(S)}function ce(ee){return _.state.isMounted&&!_.state.isVisible||Zs.isTouch||u&&"focus"===u.type?0:B1(_.props.delay,ee?0:1,io.delay)}function me(ee){void 0===ee&&(ee=!1),S.style.pointerEvents=_.props.interactive&&!ee?"":"none",S.style.zIndex=""+_.props.zIndex}function be(ee,We,mt){var En;void 0===mt&&(mt=!0),Q.forEach(function(hn){hn[ee]&&hn[ee].apply(hn,We)}),mt&&(En=_.props)[ee].apply(En,We)}function He(){var ee=_.props.aria;if(ee.content){var We="aria-"+ee.content,mt=S.id;Rl(_.props.triggerTarget||n).forEach(function(hn){var Fr=hn.getAttribute(We);if(_.state.isVisible)hn.setAttribute(We,Fr?Fr+" "+mt:mt);else{var Xo=Fr&&Fr.replace(mt,"").trim();Xo?hn.setAttribute(We,Xo):hn.removeAttribute(We)}})}}function kt(){!ke&&_.props.aria.expanded&&Rl(_.props.triggerTarget||n).forEach(function(We){_.props.interactive?We.setAttribute("aria-expanded",_.state.isVisible&&We===st()?"true":"false"):We.removeAttribute("aria-expanded")})}function dn(){vn().removeEventListener("mousemove",p),Ab=Ab.filter(function(ee){return ee!==p})}function Vt(ee){if(!Zs.isTouch||!l&&"mousedown"!==ee.type){var We=ee.composedPath&&ee.composedPath()[0]||ee.target;if(!_.props.interactive||!E3(S,We)){if(Rl(_.props.triggerTarget||n).some(function(mt){return E3(mt,We)})){if(Zs.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[_,ee]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),a=!0,setTimeout(function(){a=!1}),_.state.isMounted||lo())}}}function xn(){l=!0}function Ft(){l=!1}function nr(){var ee=vn();ee.addEventListener("mousedown",Vt,!0),ee.addEventListener("touchend",Vt,Ll),ee.addEventListener("touchstart",Ft,Ll),ee.addEventListener("touchmove",xn,Ll)}function lo(){var ee=vn();ee.removeEventListener("mousedown",Vt,!0),ee.removeEventListener("touchend",Vt,Ll),ee.removeEventListener("touchstart",Ft,Ll),ee.removeEventListener("touchmove",xn,Ll)}function pt(ee,We){var mt=Ot().box;function En(hn){hn.target===mt&&(G1(mt,"remove",En),We())}if(0===ee)return We();G1(mt,"remove",d),G1(mt,"add",En),d=En}function Bn(ee,We,mt){void 0===mt&&(mt=!1),Rl(_.props.triggerTarget||n).forEach(function(hn){hn.addEventListener(ee,We,mt),f.push({node:hn,eventType:ee,handler:We,options:mt})})}function Rr(){vt()&&(Bn("touchstart",lc,{passive:!0}),Bn("touchend",Hu,{passive:!0})),function ese(n){return n.split(/\s+/).filter(Boolean)}(_.props.trigger).forEach(function(ee){if("manual"!==ee)switch(Bn(ee,lc),ee){case"mouseenter":Bn("mouseleave",Hu);break;case"focus":Bn(cse?"focusout":"blur",sy);break;case"focusin":Bn("focusout",sy)}})}function Uu(){f.forEach(function(ee){ee.node.removeEventListener(ee.eventType,ee.handler,ee.options)}),f=[]}function lc(ee){var We,mt=!1;if(_.state.isEnabled&&!ay(ee)&&!a){var En="focus"===(null==(We=u)?void 0:We.type);u=ee,m=ee.currentTarget,kt(),!_.state.isVisible&&function $1(n){return U1(n,"MouseEvent")}(ee)&&Ab.forEach(function(hn){return hn(ee)}),"click"===ee.type&&(_.props.trigger.indexOf("mouseenter")<0||s)&&!1!==_.props.hideOnClick&&_.state.isVisible?mt=!0:ly(ee),"click"===ee.type&&(s=!mt),mt&&!En&&$u(ee)}}function cc(ee){var We=ee.target,mt=st().contains(We)||S.contains(We);"mousemove"===ee.type&&mt||function rse(n,t){var e=t.clientX,i=t.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,l=r.props.interactiveBorder,c=function D3(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-i+("bottom"===c?u.top.y:0)>l||i-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-e+("right"===c?u.left.x:0)>l||e-o.right-("left"===c?u.right.x:0)>l})}(uc().concat(S).map(function(hn){var Fr,bf=null==(Fr=hn._tippy.popperInstance)?void 0:Fr.state;return bf?{popperRect:hn.getBoundingClientRect(),popperState:bf,props:e}:null}).filter(Boolean),ee)&&(dn(),$u(ee))}function Hu(ee){if(!(ay(ee)||_.props.trigger.indexOf("click")>=0&&s)){if(_.props.interactive)return void _.hideWithInteractivity(ee);$u(ee)}}function sy(ee){_.props.trigger.indexOf("focusin")<0&&ee.target!==st()||_.props.interactive&&ee.relatedTarget&&S.contains(ee.relatedTarget)||$u(ee)}function ay(ee){return!!Zs.isTouch&&vt()!==ee.type.indexOf("touch")>=0}function uw(){dw();var ee=_.props,We=ee.popperOptions,mt=ee.placement,En=ee.offset,hn=ee.getReferenceClientRect,Fr=ee.moveTransition,Xo=ct()?Ob(S).arrow:null,bf=hn?{getBoundingClientRect:hn,contextElement:hn.contextElement||st()}:n,Wu=[{name:"offset",options:{offset:En}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Fr}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(gw){var wf=gw.state;if(ct()){var GE=Ot().box;["placement","reference-hidden","escaped"].forEach(function(yw){"placement"===yw?GE.setAttribute("data-placement",wf.placement):wf.attributes.popper["data-popper-"+yw]?GE.setAttribute("data-"+yw,""):GE.removeAttribute("data-"+yw)}),wf.attributes.popper={}}}}];ct()&&Xo&&Wu.push({name:"arrow",options:{element:Xo,padding:3}}),Wu.push.apply(Wu,We?.modifiers||[]),_.popperInstance=Zoe(bf,S,Object.assign({},We,{placement:mt,onFirstUpdate:h,modifiers:Wu}))}function dw(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function uc(){return jh(S.querySelectorAll("[data-tippy-root]"))}function ly(ee){_.clearDelayTimeouts(),ee&&be("onTrigger",[_,ee]),nr();var We=ce(!0),mt=$e(),hn=mt[1];Zs.isTouch&&"hold"===mt[0]&&hn&&(We=hn),We?i=setTimeout(function(){_.show()},We):_.show()}function $u(ee){if(_.clearDelayTimeouts(),be("onUntrigger",[_,ee]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ee.type)>=0&&s)){var We=ce(!1);We?r=setTimeout(function(){_.state.isVisible&&_.hide()},We):o=requestAnimationFrame(function(){_.hide()})}}else lo()}}function Fl(n,t){void 0===t&&(t={});var e=io.plugins.concat(t.plugins||[]);!function ase(){document.addEventListener("touchstart",ose,Ll),window.addEventListener("blur",sse)}();var i=Object.assign({},t,{plugins:e}),a=function ise(n){return Ib(n)?[n]:function nse(n){return U1(n,"NodeList")}(n)?jh(n):Array.isArray(n)?n:jh(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&_se(c,i);return u&&l.push(u),l},[]);return Ib(n)?a[0]:a}Fl.defaultProps=io,Fl.setDefaultProps=function(t){Object.keys(t).forEach(function(i){io[i]=t[i]})},Fl.currentInput=Zs,Object.assign({},s3,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),Fl.setDefaultProps({render:j3});const ys=Fl,Yo=function(n){for(var t=0;;t++)if(!(n=n.previousSibling))return t},ig=function(n){let t=n.assignedSlot||n.parentNode;return t&&11==t.nodeType?t.host:t};let B3=null;const Wa=function(n,t,e){let i=B3||(B3=document.createRange());return i.setEnd(n,e??n.nodeValue.length),i.setStart(n,t||0),i},cu=function(n,t,e,i){return e&&(U3(n,t,e,i,-1)||U3(n,t,e,i,1))},Sse=/^(img|br|input|textarea|hr)$/i;function U3(n,t,e,i,r){for(;;){if(n==e&&t==i)return!0;if(t==(r<0?0:Js(n))){let o=n.parentNode;if(!o||1!=o.nodeType||xse(n)||Sse.test(n.nodeName)||"false"==n.contentEditable)return!1;t=Yo(n)+(r<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[t+(r<0?-1:0)]).contentEditable)return!1;t=r<0?Js(n):0}}}function Js(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function xse(n){let t;for(let e=n;e&&!(t=e.pmViewDesc);e=e.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==n||t.contentDOM==n)}const Pb=function(n){return n.focusNode&&cu(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function uu(n,t){let e=document.createEvent("Event");return e.initEvent("keydown",!0,!0),e.keyCode=n,e.key=e.code=t,e}const Xs=typeof navigator<"u"?navigator:null,H3=typeof document<"u"?document:null,jl=Xs&&Xs.userAgent||"",K1=/Edge\/(\d+)/.exec(jl),$3=/MSIE \d/.exec(jl),Q1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jl),ro=!!($3||Q1||K1),zl=$3?document.documentMode:Q1?+Q1[1]:K1?+K1[1]:0,_s=!ro&&/gecko\/(\d+)/i.test(jl);_s&&/Firefox\/(\d+)/.exec(jl);const Z1=!ro&&/Chrome\/(\d+)/.exec(jl),mr=!!Z1,Ase=Z1?+Z1[1]:0,kr=!ro&&!!Xs&&/Apple Computer/.test(Xs.vendor),zh=kr&&(/Mobile\/\w+/.test(jl)||!!Xs&&Xs.maxTouchPoints>2),qo=zh||!!Xs&&/Mac/.test(Xs.platform),kse=!!Xs&&/Win/.test(Xs.platform),vs=/Android \d/.test(jl),Lb=!!H3&&"webkitFontSmoothing"in H3.documentElement.style,Nse=Lb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Pse(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Vl(n,t){return"number"==typeof n?n:n[t]}function Lse(n){let t=n.getBoundingClientRect();return{left:t.left,right:t.left+n.clientWidth*(t.width/n.offsetWidth||1),top:t.top,bottom:t.top+n.clientHeight*(t.height/n.offsetHeight||1)}}function W3(n,t,e){let i=n.someProp("scrollThreshold")||0,r=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=e||n.dom;s;s=ig(s)){if(1!=s.nodeType)continue;let a=s,l=a==o.body,c=l?Pse(o):Lse(a),u=0,d=0;if(t.topc.bottom-Vl(i,"bottom")&&(d=t.bottom-c.bottom+Vl(r,"bottom")),t.leftc.right-Vl(i,"right")&&(u=t.right-c.right+Vl(r,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let h=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let p=a.scrollLeft-h,m=a.scrollTop-f;t={left:t.left-p,top:t.top-m,right:t.right-p,bottom:t.bottom-m}}if(l)break}}function G3(n){let t=[],e=n.ownerDocument;for(let i=n;i&&(t.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),n!=e);i=ig(i));return t}function Y3(n,t){for(let e=0;e=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);let m=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!e&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(o=d+1)}}return!e&&l&&(e=l,r=c,i=0),e&&3==e.nodeType?function zse(n,t){let e=n.nodeValue.length,i=document.createRange();for(let r=0;r=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(e,r):!e||i&&1==e.nodeType?{node:n,offset:o}:q3(e,r)}function J1(n,t){return n.left>=t.left-1&&n.left<=t.right+1&&n.top>=t.top-1&&n.top<=t.bottom+1}function K3(n,t,e){let i=n.childNodes.length;if(i&&e.topt.top&&r++}i==n.dom&&r==i.childNodes.length-1&&1==i.lastChild.nodeType&&t.top>i.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(0==r||1!=i.nodeType||"BR"!=i.childNodes[r-1].nodeName)&&(a=function Use(n,t,e,i){let r=-1;for(let o=t,s=!1;o!=n.dom;){let a=n.docView.nearestDesc(o,!0);if(!a)return null;if(1==a.dom.nodeType&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,l.left>i.left||l.top>i.top?r=a.posBefore:(l.right-1?r:n.docView.posFromDOM(t,e,-1)}(n,i,r,t))}null==a&&(a=function Bse(n,t,e){let{node:i,offset:r}=q3(t,e),o=-1;if(1==i.nodeType&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&e.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(i,r,o)}(n,s,t));let l=n.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Q3(n){return n.top=0&&r==i.nodeValue.length?(l--,u=1):e<0?l--:c++,rg(Bl(Wa(i,l,c),u),u<0)}{let l=Bl(Wa(i,r,r),e);if(_s&&r&&/\s/.test(i.nodeValue[r-1])&&r=0)}if(null==o&&r&&(e<0||r==Js(i))){let l=i.childNodes[r-1],c=3==l.nodeType?Wa(l,Js(l)-(s?0:1)):1!=l.nodeType||"BR"==l.nodeName&&l.nextSibling?null:l;if(c)return rg(Bl(c,1),!1)}if(null==o&&r=0)}function rg(n,t){if(0==n.width)return n;let e=t?n.left:n.right;return{top:n.top,bottom:n.bottom,left:e,right:e}}function X1(n,t){if(0==n.height)return n;let e=t?n.top:n.bottom;return{top:e,bottom:e,left:n.left,right:n.right}}function J3(n,t,e){let i=n.state,r=n.root.activeElement;i!=t&&n.updateState(t),r!=n.dom&&n.focus();try{return e()}finally{i!=t&&n.updateState(i),r!=n.dom&&r&&r.focus()}}const Gse=/[\u0590-\u08ac]/;let X3=null,e4=null,t4=!1;class og{constructor(t,e,i,r){this.parent=t,this.children=e,this.dom=i,this.contentDOM=r,this.dirty=0,i.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,i){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;eYo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let i=!0,r=t;r;r=r.parentNode){let s,o=this.getDesc(r);if(o&&(!e||o.node)){if(!i||!(s=o.nodeDOM)||(1==s.nodeType?s.contains(1==t.nodeType?t:t.parentNode):s==t))return o;i=!1}}}getDesc(t){let e=t.pmViewDesc;for(let i=e;i;i=i.parent)if(i==this)return e}posFromDOM(t,e,i){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,i)}return-1}descAt(t){for(let e=0,i=0;et||s instanceof s4){r=t-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,e);for(;i&&!(o=this.children[i-1]).size&&o instanceof r4&&o.side>=0;i--);if(e<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,o&&o.dom.parentNode!=this.contentDOM;i--,s=!1);return o&&e&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,e):{node:this.contentDOM,offset:o?Yo(o.dom)+1:0}}{let o,s=!0;for(;o=i=u&&e<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,e,u);t=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){r=Yo(h.dom)+1;break}t-=h.size}-1==r&&(r=0)}if(r>-1&&(c>e||a==this.children.length-1)){e=c;for(let u=a+1;uf&&se){let f=a;a=l,l=f}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let i=0,r=0;r=i:ti){let a=i+o.border,l=s-o.border;if(t>=a&&e<=l)return this.dirty=t==i||e==s?2:1,void(t!=a||e!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}i=s}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let i=1==t?2:1;e.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r)),!e.type.spec.raw){if(1!=s.nodeType){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Kse extends og{constructor(t,e,i,r){super(t,[],e,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class hu extends og{constructor(t,e,i,r){super(t,[],i,r),this.mark=e}static create(t,e,i,r){let o=r.nodeViews[e.type.name],s=o&&o(e,r,i);return(!s||!s.dom)&&(s=Ys.renderSpec(document,e.type.spec.toDOM(e,i))),new hu(t,e,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty0&&(o=nS(o,0,t,i));for(let a=0;al?l.parent?l.parent.posBeforeChild(l):void 0:s,i,r),u=c&&c.dom,d=c&&c.contentDOM;if(e.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(e.text);else u||({dom:u,contentDOM:d}=Ys.renderSpec(document,e.type.spec.toDOM(e)));!d&&!e.isText&&"BR"!=u.nodeName&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),e.type.spec.draggable&&(u.draggable=!0));let h=u;return u=c4(u,i,e),c?l=new Qse(t,e,i,r,u,d||null,h,c,o,s+1):e.isText?new Rb(t,e,i,r,u,h,o):new Ul(t,e,i,r,u,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let i=this.children[e];if(this.dom.contains(i.dom.parentNode)){t.contentElement=i.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ue.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,i){return 0==this.dirty&&t.eq(this.node)&&tS(e,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let i=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new Jse(this,s&&s.node,t);(function tae(n,t,e,i){let r=t.locals(n),o=0;if(0==r.length){for(let c=0;co;)a.push(r[s++]);let h=o+u.nodeSize;if(u.isText){let p=h;s!p.inline):a.slice(),t.forChild(o,u),d),o=h}})(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?kn.none:this.node.child(u).marks,i,t),l.placeWidget(c,t,r)},(c,u,d,h)=>{let f;l.syncToMarks(c.marks,i,t),l.findNodeMatch(c,u,d,h)||a&&t.state.selection.from>r&&t.state.selection.to-1&&l.updateNodeAt(c,u,d,f,t)||l.updateNextNode(c,u,d,t,h,r)||l.addNode(c,u,d,t,r),r+=c.nodeSize}),l.syncToMarks([],i,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),a4(this.contentDOM,this.children,t),zh&&function nae(n){if("UL"==n.nodeName||"OL"==n.nodeName){let t=n.style.cssText;n.style.cssText=t+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=t}}(this.dom))}localCompositionInfo(t,e){let{from:i,to:r}=t.state.selection;if(!(t.state.selection instanceof it)||ie+this.node.content.size)return null;let o=t.domSelectionRange(),s=function iae(n,t){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&t>0){if(n.childNodes.length>t&&3==n.childNodes[t].nodeType)return n.childNodes[t];t=Js(n=n.childNodes[t-1])}else{if(!(1==n.nodeType&&t=e){let c=a=0&&c+t.length+a>=e)return a+c;if(e==i&&l.length>=i+t.length-a&&l.slice(i-a,i-a+t.length)==t)return i}}return-1}(this.node.content,a,i-e,r-e);return l<0?null:{node:s,pos:l,text:a}}return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:i,text:r}){if(this.getDesc(e))return;let o=e;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new Kse(this,o,e,r);t.input.compositionNodes.push(s),this.children=nS(this.children,i,i+r.length,t,s)}update(t,e,i,r){return!(3==this.dirty||!t.sameMarkup(this.node)||(this.updateInner(t,e,i,r),0))}updateInner(t,e,i,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(tS(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,i=this.dom;this.dom=l4(this.dom,this.nodeDOM,eS(this.outerDeco,this.node,e),eS(t,this.node,e)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function o4(n,t,e,i,r){c4(i,t,n);let o=new Ul(void 0,n,t,e,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class Rb extends Ul{constructor(t,e,i,r,o,s,a){super(t,e,i,r,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,i,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node)||(this.updateOuterDeco(e),(0!=this.dirty||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,0))}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,i){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,i)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,i){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new Rb(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(t,e){super.markDirty(t,e),this.dom!=this.nodeDOM&&(0==t||e==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}}class s4 extends og{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Qse extends Ul{constructor(t,e,i,r,o,s,a,l,c,u){super(t,e,i,r,o,s,a,c,u),this.spec=l}update(t,e,i,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(t,e,i);return o&&this.updateInner(t,e,i,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,i,r){this.spec.setSelection?this.spec.setSelection(t,e,i):super.setSelection(t,e,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function a4(n,t,e){let i=n.firstChild,r=!1;for(let o=0;o0;){let a;for(;;)if(i){let c=e.children[i-1];if(!(c instanceof hu)){a=c,i--;break}e=c,i=c.children.length}else{if(e==t)break e;i=e.parent.children.indexOf(e),e=e.parent}let l=a.node;if(l){if(l!=n.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let i=t;i>1,s=Math.min(o,t.length);for(;r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=hu.create(this.top,t[o],e,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,i,r){let s,o=-1;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(t,e,i))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a=e||u<=t?o.push(l):(ce&&o.push(l.slice(e-c,l.size,i)))}return o}function iS(n,t=null){let e=n.domSelectionRange(),i=n.state.doc;if(!e.focusNode)return null;let r=n.docView.nearestDesc(e.focusNode),o=r&&0==r.size,s=n.docView.posFromDOM(e.focusNode,e.focusOffset,1);if(s<0)return null;let l,c,a=i.resolve(s);if(Pb(e)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&Qe.isSelectable(u)&&r.parent&&(!u.isInline||!function Ese(n,t,e){for(let i=0==t,r=t==Js(n);i||r;){if(n==e)return!0;let o=Yo(n);if(!(n=n.parentNode))return!1;i=i&&0==o,r=r&&o==Js(n)}}(e.focusNode,e.focusOffset,r.dom))){let d=r.posBefore;c=new Qe(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(e.anchorNode,e.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}return c||(c=oS(n,l,a,"pointer"==t||n.state.selection.head{(e.anchorNode!=i||e.anchorOffset!=r)&&(t.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!d4(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const h4=kr||mr&&Ase<63;function f4(n,t){let{node:e,offset:i}=n.docView.domFromPos(t,0),r=ir(n,t,e))||it.between(t,e,i)}function y4(n){return!(n.editable&&!n.hasFocus())&&_4(n)}function _4(n){let t=n.domSelectionRange();if(!t.anchorNode)return!1;try{return n.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(n.editable||n.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function sS(n,t){let{$anchor:e,$head:i}=n.selection,r=t>0?e.max(i):e.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(t>0?r.after():r.before()):null:r;return o&&ot.findFrom(o,t)}function pu(n,t){return n.dispatch(n.state.tr.setSelection(t).scrollIntoView()),!0}function v4(n,t,e){let i=n.state.selection;if(!(i instanceof it)){if(i instanceof Qe&&i.node.isInline)return pu(n,new it(t>0?i.$to:i.$from));{let r=sS(n.state,t);return!!r&&pu(n,r)}}if(!i.empty||e.indexOf("s")>-1)return!1;if(n.endOfTextblock(t>0?"forward":"backward")){let r=sS(n.state,t);return!!(r&&r instanceof Qe)&&pu(n,r)}if(!(qo&&e.indexOf("m")>-1)){let s,r=i.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText)return!1;let a=t<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM)&&(Qe.isSelectable(o)?pu(n,new Qe(t<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):!!Lb&&pu(n,new it(n.state.doc.resolve(t<0?a:a+o.nodeSize))))}}function Fb(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function ag(n){let t=n.pmViewDesc;return t&&0==t.size&&(n.nextSibling||"BR"!=n.nodeName)}function lg(n,t){return t<0?function lae(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let r,o,s=!1;for(_s&&1==e.nodeType&&i0){if(1!=e.nodeType)break;{let a=e.childNodes[i-1];if(ag(a))r=e,o=--i;else{if(3!=a.nodeType)break;e=a,i=e.nodeValue.length}}}else{if(w4(e))break;{let a=e.previousSibling;for(;a&&ag(a);)r=e.parentNode,o=Yo(a),a=a.previousSibling;if(a)e=a,i=Fb(e);else{if(e=e.parentNode,e==n.dom)break;i=0}}}s?aS(n,e,i):r&&aS(n,r,o)}(n):b4(n)}function b4(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let o,s,r=Fb(e);for(;;)if(i{n.state==r&&Ga(n)},50)}function C4(n,t){let e=n.state.doc.resolve(t);if(!mr&&!kse&&e.parent.inlineContent){let r=n.coordsAtPos(t);if(t>e.start()){let o=n.coordsAtPos(t-1),s=(o.top+o.bottom)/2;if(s>r.top&&s1)return o.leftr.top&&s1)return o.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(n.dom).direction?"rtl":"ltr"}function D4(n,t,e){let i=n.state.selection;if(i instanceof it&&!i.empty||e.indexOf("s")>-1||qo&&e.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(t<0?"up":"down")){let s=sS(n.state,t);if(s&&s instanceof Qe)return pu(n,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof Eo?ot.near(s,t):ot.findFrom(s,t);return!!a&&pu(n,a)}return!1}function T4(n,t){if(!(n.state.selection instanceof it))return!0;let{$head:e,$anchor:i,empty:r}=n.state.selection;if(!e.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!e.textOffset&&(t<0?e.nodeBefore:e.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return t<0?s.delete(e.pos-o.nodeSize,e.pos):s.delete(e.pos,e.pos+o.nodeSize),n.dispatch(s),!0}return!1}function M4(n,t,e){n.domObserver.stop(),t.contentEditable=e,n.domObserver.start()}function S4(n,t){n.someProp("transformCopied",f=>{t=f(t,n)});let e=[],{content:i,openStart:r,openEnd:o}=t;for(;r>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){r--,o--;let f=i.firstChild;e.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let s=n.someProp("clipboardSerializer")||Ys.fromSchema(n.state.schema),a=P4(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=k4[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(e)}`),{dom:l,text:n.someProp("clipboardTextSerializer",f=>f(t,n))||t.content.textBetween(0,t.content.size,"\n\n")}}function E4(n,t,e,i,r){let s,a,o=r.parent.type.spec.code;if(!e&&!t)return null;let l=t&&(i||o||!e);if(l){if(n.someProp("transformPastedText",h=>{t=h(t,o||i,n)}),o)return t?new De(ue.from(n.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):De.empty;let d=n.someProp("clipboardTextParser",h=>h(t,r,i,n));if(d)a=d;else{let h=r.marks(),{schema:f}=n.state,p=Ys.fromSchema(f);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(f.text(m,h)))})}}else n.someProp("transformPastedHTML",d=>{e=d(e,n)}),s=function pae(n){let t=/^(\s*]*>)*/.exec(n);t&&(n=n.slice(t[0].length));let r,e=P4().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n);if((r=i&&k4[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>""+o+">").reverse().join("")),e.innerHTML=n,r)for(let o=0;o0;d--){let h=s.firstChild;for(;h&&1!=h.nodeType;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||Sh.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!(!l&&!u),context:r,ruleFromNode:h=>"BR"!=h.nodeName||h.nextSibling||!h.parentNode||hae.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)a=function gae(n,t){if(!n.size)return n;let i,e=n.content.firstChild.type.schema;try{i=JSON.parse(t)}catch{return n}let{content:r,openStart:o,openEnd:s}=n;for(let a=i.length-2;a>=0;a-=2){let l=e.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=ue.from(l.create(i[a+1],r)),o++,s++}return new De(r,o,s)}(A4(a,+u[1],+u[2]),u[4]);else if(a=De.maxOpen(function fae(n,t){if(n.childCount<2)return n;for(let e=t.depth;e>=0;e--){let o,r=t.node(e).contentMatchAt(t.index(e)),s=[];if(n.forEach(a=>{if(!s)return;let c,l=r.findWrapping(a.type);if(!l)return s=null;if(c=s.length&&o.length&&I4(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=O4(s[s.length-1],o.length));let u=x4(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return ue.from(s)}return n}(a.content,r),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d{a=d(a,n)}),a}const hae=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function x4(n,t,e=0){for(let i=t.length-1;i>=e;i--)n=t[i].create(null,ue.from(n));return n}function I4(n,t,e,i,r){if(r1&&(o=0),r=e&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ue.empty,!0))),n.replaceChild(t<0?0:n.childCount-1,s.copy(a))}function A4(n,t,e){return t{for(let e in t)n.input.eventHandlers[e]||n.dom.addEventListener(e,n.input.eventHandlers[e]=i=>uS(n,i))})}function uS(n,t){return n.someProp("handleDOMEvents",e=>{let i=e[t.type];return!!i&&(i(n,t)||t.defaultPrevented)})}function wae(n,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let e=t.target;e!=n.dom;e=e.parentNode)if(!e||11==e.nodeType||e.pmViewDesc&&e.pmViewDesc.stopEvent(t))return!1;return!0}function jb(n){return{left:n.clientX,top:n.clientY}}function dS(n,t,e,i,r){if(-1==i)return!1;let o=n.state.doc.resolve(i);for(let s=o.depth+1;s>0;s--)if(n.someProp(t,a=>s>o.depth?a(n,e,o.nodeAfter,o.before(s),r,!0):a(n,e,o.node(s),o.before(s),r,!1)))return!0;return!1}function Bh(n,t,e){n.focused||n.focus();let i=n.state.tr.setSelection(t);"pointer"==e&&i.setMeta("pointer",!0),n.dispatch(i)}function Eae(n,t,e,i){return dS(n,"handleDoubleClickOn",t,e,i)||n.someProp("handleDoubleClick",r=>r(n,t,i))}function xae(n,t,e,i){return dS(n,"handleTripleClickOn",t,e,i)||n.someProp("handleTripleClick",r=>r(n,t,i))||function Iae(n,t,e){if(0!=e.button)return!1;let i=n.state.doc;if(-1==t)return!!i.inlineContent&&(Bh(n,it.create(i,0,i.content.size),"pointer"),!0);let r=i.resolve(t);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)Bh(n,it.create(i,a+1,a+1+s.content.size),"pointer");else{if(!Qe.isSelectable(s))continue;Bh(n,Qe.create(i,a),"pointer")}return!0}}(n,e,i)}function hS(n){return zb(n)}Pr.keydown=(n,t)=>{let e=t;if(n.input.shiftKey=16==e.keyCode||e.shiftKey,!R4(n,e)&&(n.input.lastKeyCode=e.keyCode,n.input.lastKeyCodeTime=Date.now(),!vs||!mr||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!zh||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",i=>i(n,e))||function dae(n,t){let e=t.keyCode,i=function uae(n){let t="";return n.ctrlKey&&(t+="c"),n.metaKey&&(t+="m"),n.altKey&&(t+="a"),n.shiftKey&&(t+="s"),t}(t);if(8==e||qo&&72==e&&"c"==i)return T4(n,-1)||lg(n,-1);if(46==e||qo&&68==e&&"c"==i)return T4(n,1)||lg(n,1);if(13==e||27==e)return!0;if(37==e||qo&&66==e&&"c"==i){let r=37==e?"ltr"==C4(n,n.state.selection.from)?-1:1:-1;return v4(n,r,i)||lg(n,r)}if(39==e||qo&&70==e&&"c"==i){let r=39==e?"ltr"==C4(n,n.state.selection.from)?1:-1:1;return v4(n,r,i)||lg(n,r)}return 38==e||qo&&80==e&&"c"==i?D4(n,-1,i)||lg(n,-1):40==e||qo&&78==e&&"c"==i?function cae(n){if(!kr||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:e}=n.domSelectionRange();if(t&&1==t.nodeType&&0==e&&t.firstChild&&"false"==t.firstChild.contentEditable){let i=t.firstChild;M4(n,i,"true"),setTimeout(()=>M4(n,i,"false"),20)}return!1}(n)||D4(n,1,i)||b4(n):i==(qo?"m":"c")&&(66==e||73==e||89==e||90==e)}(n,e)?e.preventDefault():Hl(n,"key");else{let i=Date.now();n.input.lastIOSEnter=i,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==i&&(n.someProp("handleKeyDown",r=>r(n,uu(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},Pr.keyup=(n,t)=>{16==t.keyCode&&(n.input.shiftKey=!1)},Pr.keypress=(n,t)=>{let e=t;if(R4(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||qo&&e.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,e)))return void e.preventDefault();let i=n.state.selection;if(!(i instanceof it&&i.$from.sameParent(i.$to))){let r=String.fromCharCode(e.charCode);!/[\r\n]/.test(r)&&!n.someProp("handleTextInput",o=>o(n,i.$from.pos,i.$to.pos,r))&&n.dispatch(n.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}};const L4=qo?"metaKey":"ctrlKey";Nr.mousedown=(n,t)=>{let e=t;n.input.shiftKey=e.shiftKey;let i=hS(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&function Dae(n,t){let e=t.x-n.clientX,i=t.y-n.clientY;return e*e+i*i<100}(e,n.input.lastClick)&&!e[L4]&&("singleClick"==n.input.lastClick.type?o="doubleClick":"doubleClick"==n.input.lastClick.type&&(o="tripleClick")),n.input.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};let s=n.posAtCoords(jb(e));s&&("singleClick"==o?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Oae(n,s,e,!!i)):("doubleClick"==o?Eae:xae)(n,s.pos,s.inside,e)?e.preventDefault():Hl(n,"pointer"))};class Oae{constructor(t,e,i,r){let o,s;if(this.view=t,this.pos=e,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!i[L4],this.allowDefault=i.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let u=t.state.doc.resolve(e.pos);o=u.parent,s=u.depth?u.before():0}const a=r?null:i.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(0==i.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof Qe&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!_s||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Hl(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ga(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(jb(t))),this.updateAllowDefault(t),this.allowDefault||!e?Hl(this.view,"pointer"):function Sae(n,t,e,i,r){return dS(n,"handleClickOn",t,e,i)||n.someProp("handleClick",o=>o(n,t,i))||(r?function Mae(n,t){if(-1==t)return!1;let i,r,e=n.state.selection;e instanceof Qe&&(i=e.node);let o=n.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(Qe.isSelectable(a)){r=i&&e.$from.depth>0&&s>=e.$from.depth&&o.before(e.$from.depth+1)==e.$from.pos?o.before(e.$from.depth):o.before(s);break}}return null!=r&&(Bh(n,Qe.create(n.state.doc,r),"pointer"),!0)}(n,e):function Tae(n,t){if(-1==t)return!1;let e=n.state.doc.resolve(t),i=e.nodeAfter;return!!(i&&i.isAtom&&Qe.isSelectable(i))&&(Bh(n,new Qe(e),"pointer"),!0)}(n,e))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||kr&&this.mightDrag&&!this.mightDrag.node.isAtom||mr&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Bh(this.view,ot.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Hl(this.view,"pointer")}move(t){this.updateAllowDefault(t),Hl(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function R4(n,t){return!!n.composing||!!(kr&&Math.abs(t.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}Nr.touchstart=n=>{n.input.lastTouch=Date.now(),hS(n),Hl(n,"pointer")},Nr.touchmove=n=>{n.input.lastTouch=Date.now(),Hl(n,"pointer")},Nr.contextmenu=n=>hS(n);const Aae=vs?5e3:-1;function F4(n,t){clearTimeout(n.input.composingTimeout),t>-1&&(n.input.composingTimeout=setTimeout(()=>zb(n),t))}function j4(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function kae(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function zb(n,t=!1){if(!(vs&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),j4(n),t||n.docView&&n.docView.dirty){let e=iS(n);return e&&!e.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(e)):n.updateState(n.state),!0}return!1}}Pr.compositionstart=Pr.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:t}=n,e=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!e.textOffset&&e.parentOffset&&e.nodeBefore.marks.some(i=>!1===i.type.spec.inclusive)))n.markCursor=n.state.storedMarks||e.marks(),zb(n,!0),n.markCursor=null;else if(zb(n),_s&&t.selection.empty&&e.parentOffset&&!e.textOffset&&e.nodeBefore.marks.length){let i=n.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&1==r.nodeType&&0!=o;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(3==s.nodeType){n.domSelection().collapse(s,s.nodeValue.length);break}r=s,o=-1}}n.input.composing=!0}F4(n,Aae)},Pr.compositionend=(n,t)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=t.timeStamp,n.input.compositionID++,F4(n,20))};const Uh=ro&&zl<15||zh&&Nse<604;function cg(n,t,e,i,r){let o=E4(n,t,e,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||De.empty)))return!0;if(!o)return!1;let s=function Pae(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(o),a=s?n.state.tr.replaceSelectionWith(s,n.input.shiftKey):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Nr.copy=Pr.cut=(n,t)=>{let e=t,i=n.state.selection,r="cut"==e.type;if(i.empty)return;let o=Uh?null:e.clipboardData,s=i.content(),{dom:a,text:l}=S4(n,s);o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function Nae(n,t){if(!n.dom.parentNode)return;let e=n.dom.parentNode.appendChild(document.createElement("div"));e.appendChild(t),e.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e),n.focus()},50)}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Pr.paste=(n,t)=>{let e=t;if(n.composing&&!vs)return;let i=Uh?null:e.clipboardData;i&&cg(n,i.getData("text/plain"),i.getData("text/html"),n.input.shiftKey,e)?e.preventDefault():function Lae(n,t){if(!n.dom.parentNode)return;let e=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(e?"textarea":"div"));e||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),e?cg(n,i.value,null,n.input.shiftKey,t):cg(n,i.textContent,i.innerHTML,n.input.shiftKey,t)},50)}(n,e)};class Rae{constructor(t,e){this.slice=t,this.move=e}}const z4=qo?"altKey":"ctrlKey";Nr.dragstart=(n,t)=>{let e=t,i=n.input.mouseDown;if(i&&i.done(),!e.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(jb(e));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof Qe?r.to-1:r.to)))if(i&&i.mightDrag)n.dispatch(n.state.tr.setSelection(Qe.create(n.state.doc,i.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){let c=n.docView.nearestDesc(e.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&n.dispatch(n.state.tr.setSelection(Qe.create(n.state.doc,c.posBefore)))}let s=n.state.selection.content(),{dom:a,text:l}=S4(n,s);e.dataTransfer.clearData(),e.dataTransfer.setData(Uh?"Text":"text/html",a.innerHTML),e.dataTransfer.effectAllowed="copyMove",Uh||e.dataTransfer.setData("text/plain",l),n.dragging=new Rae(s,!e[z4])},Nr.dragend=n=>{let t=n.dragging;window.setTimeout(()=>{n.dragging==t&&(n.dragging=null)},50)},Pr.dragover=Pr.dragenter=(n,t)=>t.preventDefault(),Pr.drop=(n,t)=>{let e=t,i=n.dragging;if(n.dragging=null,!e.dataTransfer)return;let r=n.posAtCoords(jb(e));if(!r)return;let o=n.state.doc.resolve(r.pos),s=i&&i.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=E4(n,e.dataTransfer.getData(Uh?"Text":"text/plain"),Uh?null:e.dataTransfer.getData("text/html"),!1,o);let a=!(!i||e[z4]);if(n.someProp("handleDrop",p=>p(n,e,s||De.empty,a)))return void e.preventDefault();if(!s)return;e.preventDefault();let l=s?Lj(n.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=n.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Qe.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Qe(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,b)=>p=b),c.setSelection(oS(n,f,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},Nr.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Ga(n)},20))},Nr.blur=(n,t)=>{let e=t;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},Nr.beforeinput=(n,t)=>{if(mr&&vs&&"deleteContentBackward"==t.inputType){n.domObserver.flushSoon();let{domChangeCount:i}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=i||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,uu(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in Pr)Nr[n]=Pr[n];function ug(n,t){if(n==t)return!0;for(let e in n)if(n[e]!==t[e])return!1;for(let e in t)if(!(e in n))return!1;return!0}class fS{constructor(t,e){this.toDOM=t,this.spec=e||mu,this.side=this.spec.side||0}map(t,e,i,r){let{pos:o,deleted:s}=t.mapResult(e.from+r,this.side<0?-1:1);return s?null:new Ni(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof fS&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ug(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class $l{constructor(t,e){this.attrs=t,this.spec=e||mu}map(t,e,i,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-i,s=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new Ni(o,s,this)}valid(t,e){return e.from=t&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,e-a,i,r+a,o)}}map(t,e,i){return this==gr||0==t.maps.length?this:this.mapInner(t,e,0,0,i||mu)}mapInner(t,e,i,r,o){let s;for(let a=0;a{let g=m-p-(f-h);for(let y=0;yb+u-d)continue;let w=a[y]+u-d;f>=w?a[y+1]=h<=w?-2:-1:p>=r&&g&&(a[y]+=g,a[y+1]+=g)}d+=g}),u=e.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let f=e.map(n[c+1]+o,-1)-r,{index:p,offset:m}=i.content.findIndex(d),g=i.maybeChild(p);if(g&&m==d&&m+g.nodeSize==f){let y=a[c+2].mapInner(e,g,u+1,n[c]+o+1,s);y!=gr?(a[c]=d,a[c+1]=f,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=function jae(n,t,e,i,r,o,s){function a(l,c){for(let u=0;u{let u,c=l+i;if(u=B4(e,a,c)){for(r||(r=this.children.slice());oa&&d.to=t){this.children[a]==t&&(i=this.children[a+2]);break}let o=t+1,s=o+e.content.size;for(let a=0;ao&&l.type instanceof $l){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(t,e,mu));return Wl.from(i)}forChild(t,e){if(e.isLeaf)return zn.empty;let i=[];for(let r=0;re instanceof zn)?t:t.reduce((e,i)=>e.concat(i instanceof zn?i:i.members),[]))}}}function V4(n,t){if(!t||!n.length)return n;let e=[];for(let i=0;ie&&s.to{let c=B4(n,a,l+e);if(c){o=!0;let u=Vb(c,a,e+l+1,i);u!=gr&&r.push(l,l+a.nodeSize,u)}});let s=V4(o?U4(n):n,-e).sort(gu);for(let a=0;a0;)t++;n.splice(t,0,e)}function gS(n){let t=[];return n.someProp("decorations",e=>{let i=e(n.state);i&&i!=gr&&t.push(i)}),n.cursorWrapper&&t.push(zn.create(n.state.doc,[n.cursorWrapper.deco])),Wl.from(t)}const zae={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Vae=ro&&zl<=11;class Bae{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Uae{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Bae,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let r=0;r"childList"==r.type&&r.removedNodes.length||"characterData"==r.type&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),Vae&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,zae)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(y4(this.view)){if(this.suppressingSelectionUpdates)return Ga(this.view);if(ro&&zl<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&cu(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let i,e=new Set;for(let o=t.focusNode;o;o=ig(o))e.add(o);for(let o=t.anchorNode;o;o=ig(o))if(e.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);return r&&r.ignoreMutation({type:"selection",target:3==i.nodeType?i.parentNode:i})?(this.setCurSelection(),!0):void 0}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let i=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&y4(t)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;u1){let u=l.filter(d=>"BR"==d.nodeName);if(2==u.length){let d=u[0],h=u[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let c=null;o<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||r)&&(o>-1&&(t.docView.markDirty(o,s),function Hae(n){if(!$4.has(n)&&($4.set(n,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace))){if(n.requiresGeckoHackNode=_s,W4)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),W4=!0}}(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(i)||Ga(t),this.currentSelection.set(i))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let i=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(i==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style"))||!i||i.ignoreMutation(t))return null;if("childList"==t.type){for(let u=0;ut.content.size?null:oS(n,t.resolve(e.anchor),t.resolve(e.head))}function yS(n,t,e){let i=n.depth,r=t?n.end():n.pos;for(;i>0&&(t||n.indexAfter(i)==n.node(i).childCount);)i--,r++,t=!1;if(e){let o=n.node(i).maybeChild(n.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}class Jae{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new _ae,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Z4),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=K4(this),q4(this),this.nodeViews=Q4(this),this.docView=o4(this.state.doc,Y4(this),gS(this),this.dom,this),this.domObserver=new Uae(this,(i,r,o,s)=>function qae(n,t,e,i,r){if(t<0){let Q=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,ke=iS(n,Q);if(ke&&!n.state.selection.eq(ke)){if(mr&&vs&&13===n.input.lastKeyCode&&Date.now()-100vt(n,uu(13,"Enter"))))return;let $e=n.state.tr.setSelection(ke);"pointer"==Q?$e.setMeta("pointer",!0):"key"==Q&&$e.scrollIntoView(),n.composing&&$e.setMeta("composition",n.input.compositionID),n.dispatch($e)}return}let o=n.state.doc.resolve(t),s=o.sharedDepth(e);t=o.before(s+1),e=n.state.doc.resolve(e).after(s+1);let d,h,a=n.state.selection,l=function Wae(n,t,e){let c,{node:i,fromOffset:r,toOffset:o,from:s,to:a}=n.docView.parseRange(t,e),l=n.domSelectionRange(),u=l.anchorNode;if(u&&n.dom.contains(1==u.nodeType?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Pb(l)||c.push({node:l.focusNode,offset:l.focusOffset})),mr&&8===n.input.lastKeyCode)for(let g=o;g>r;g--){let y=i.childNodes[g-1],b=y.pmViewDesc;if("BR"==y.nodeName&&!b){o=g;break}if(!b||b.size)break}let d=n.state.doc,h=n.someProp("domParser")||Sh.fromSchema(n.state.schema),f=d.resolve(s),p=null,m=h.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:r,to:o,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:c,ruleFromNode:Gae,context:f});if(c&&null!=c[0].pos){let g=c[0].pos,y=c[1]&&c[1].pos;null==y&&(y=g),p={anchor:g+s,head:y+s}}return{doc:m,sel:p,from:s,to:a}}(n,t,e),c=n.state.doc,u=c.slice(l.from,l.to);8===n.input.lastKeyCode&&Date.now()-100=s?o-i:0,a=o+(a-s),s=o):a=a?o-i:0,s=o+(s-a),a=o),{start:o,endA:s,endB:a}}(u.content,l.doc.content,l.from,d,h);if((zh&&n.input.lastIOSEnter>Date.now()-225||vs)&&r.some(Q=>1==Q.nodeType&&!Yae.test(Q.nodeName))&&(!f||f.endA>=f.endB)&&n.someProp("handleKeyDown",Q=>Q(n,uu(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(!f){if(!(i&&a instanceof it&&!a.empty&&a.$head.sameParent(a.$anchor))||n.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let Q=G4(n,n.state.doc,l.sel);if(Q&&!Q.eq(n.state.selection)){let ke=n.state.tr.setSelection(Q);n.composing&&ke.setMeta("composition",n.input.compositionID),n.dispatch(ke)}}return}f={start:a.from,endA:a.to,endB:a.to}}if(mr&&n.cursorWrapper&&l.sel&&l.sel.anchor==n.cursorWrapper.deco.from&&l.sel.head==l.sel.anchor){let Q=f.endB-f.start;l.sel={anchor:l.sel.anchor+Q,head:l.sel.anchor+Q}}n.input.domChangeCount++,n.state.selection.fromn.state.selection.from&&f.start<=n.state.selection.from+2&&n.state.selection.from>=l.from?f.start=n.state.selection.from:f.endA