@uxland/primary-shell 5.3.7 → 5.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3260 -3463
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +121 -85
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/events.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/add-async-history-items/request.d.ts +3 -2
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/actions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/handle-history-items-add-error/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/handle-history-items-add-error/handler.d.ts +7 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/handle-history-items-add-error/request.d.ts +6 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-full-data-error/component.d.ts +10 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-full-data-error/template.d.ts +3 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-partial-data-error/component.d.ts +11 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-partial-data-error/template.d.ts +3 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-error/reducers.d.ts +2 -4
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/add/handle-error/selectors.d.ts +5 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/domain/model.d.ts +2 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/domain/specs/diagnostics-filter-spec.d.ts +8 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/domain/specs/diagnostics-filter-spec.test.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/active-filters-badges.d.ts +4 -2
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-header/active-filters-header.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/activity-history-filters.d.ts +4 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/selectors.d.ts +42 -42
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/add-custom-filters/actions.d.ts +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/add-custom-filters/reducer.d.ts +2 -2
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/add-custom-filters/request.d.ts +3 -3
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/selectors.d.ts +29 -29
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/actions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/handler.d.ts +6 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/reducer.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/reducer.test.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/request.d.ts +6 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/handle-add-diagnostics-options-from-item.d.ts +5 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/handle-add-diagnostics-options-from-item.test.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/selectors.d.ts +185 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/actions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/handler.d.ts +6 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/reducer.d.ts +3 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/request.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/model.d.ts +18 -3
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/selectors.d.ts +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/slice.d.ts +7 -3
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/selectors.d.ts +86 -27
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/slice.d.ts +2 -2
- package/dist/primary/shell/src/internal-plugins/activity-history/infrastructure/state/store.d.ts +4 -4
- package/dist/primary/shell/src/internal-plugins/activity-history/localization.d.ts +16 -0
- package/package.json +1 -2
- package/src/UI/images/feedback-error.svg +9 -0
- package/src/UI/internal-views/upper-nav-views.ts +90 -17
- package/src/UI/shared-components/primaria-character-limit-badge/primaria-character-limit-badge.ts +5 -7
- package/src/UI/shared-components/primaria-character-limit-badge/styles.css +1 -1
- package/src/api/interaction-service/modal-styles.css +1 -1
- package/src/events.ts +1 -0
- package/src/features/clinical-monitoring/component/template.ts +5 -5
- package/src/internal-plugins/activity-history/activity-history-item/add/add-async-history-items/handler.ts +4 -3
- package/src/internal-plugins/activity-history/activity-history-item/add/add-async-history-items/request.ts +3 -2
- package/src/internal-plugins/activity-history/activity-history-item/add/add-history-item/handler.ts +2 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/add-history-items/handler.ts +2 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/handle-history-items-add-error/bootstrapper.ts +18 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/handle-history-items-add-error/handler.ts +26 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/handle-history-items-add-error/request.ts +5 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-full-data-error/component.ts +32 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-full-data-error/styles.css +11 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-full-data-error/template.ts +23 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-partial-data-error/component.ts +42 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-partial-data-error/styles.css +11 -0
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/history-partial-data-error/template.ts +19 -0
- package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-error/reducers.ts +3 -2
- package/src/internal-plugins/activity-history/activity-history-item/add/handle-error/selectors.ts +19 -0
- package/src/internal-plugins/activity-history/activity-history-item/bootstrapper.ts +4 -1
- package/src/internal-plugins/activity-history/activity-history-item/domain/model.ts +2 -1
- package/src/internal-plugins/activity-history/activity-history-item/domain/specs/diagnostics-filter-spec.test.ts +59 -0
- package/src/internal-plugins/activity-history/activity-history-item/domain/specs/diagnostics-filter-spec.ts +18 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/active-filters-badges.ts +19 -2
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/template.ts +49 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-header/active-filters-header.ts +4 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-header/template.ts +1 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/activity-history-filters.ts +21 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/template.ts +11 -2
- package/src/internal-plugins/activity-history/activity-history-item/filter/bootstrapper.ts +12 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/common-filters.ts +8 -3
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/add-custom-filters/reducer.ts +2 -2
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/add-custom-filters/request.ts +2 -2
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/selectors.ts +4 -5
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/actions.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/bootstrapper.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/handler.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/reducer.test.ts +93 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/reducer.ts +25 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/add/request.ts +5 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/handle-add-diagnostics-options-from-item.test.ts +80 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/handle-add-diagnostics-options-from-item.ts +30 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/selectors.ts +22 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/actions.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/bootstrapper.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/handler.ts +13 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/reducer.ts +11 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/diagnostic-filters/set/request.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/model.ts +21 -4
- package/src/internal-plugins/activity-history/activity-history-item/filter/slice.ts +6 -2
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/activity-history-timeline.ts +1 -4
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/template.ts +3 -1
- package/src/internal-plugins/activity-history/activity-history-item/list/bootstrapper.ts +4 -1
- package/src/internal-plugins/activity-history/activity-history-item/selectors.ts +5 -0
- package/src/internal-plugins/activity-history/activity-history-item/slice.ts +2 -8
- package/src/internal-plugins/activity-history/localization.ts +16 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/list/handle-error/actions.d.ts +0 -4
- /package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/actions.d.ts +0 -0
- /package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/bootstrapper.d.ts +0 -0
- /package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/busy-component/component.d.ts +0 -0
- /package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/busy-component/template.d.ts +0 -0
- /package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/reducers.d.ts +0 -0
- /package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/selectors.d.ts +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/actions.ts +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/bootstrapper.ts +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/busy-component/component.ts +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/busy-component/styles.css +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/busy-component/template.ts +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/reducers.ts +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-busy/selectors.ts +0 -0
- /package/src/internal-plugins/activity-history/activity-history-item/{list → add}/handle-error/actions.ts +0 -0
package/dist/index.umd.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
13
|
and limitations under the License.
|
|
14
|
-
***************************************************************************** */var Reflect$1;(function(X){(function(W){var J=typeof globalThis=="object"?globalThis:typeof commonjsGlobal=="object"?commonjsGlobal:typeof self=="object"?self:typeof this=="object"?this:de(),te=re(X);typeof J.Reflect<"u"&&(te=re(J.Reflect,te)),W(te,J),typeof J.Reflect>"u"&&(J.Reflect=X);function re(ue,ce){return function(he,pe){Object.defineProperty(ue,he,{configurable:!0,writable:!0,value:pe}),ce&&ce(he,pe)}}function ne(){try{return Function("return this;")()}catch{}}function oe(){try{return(0,eval)("(function() { return this; })()")}catch{}}function de(){return ne()||oe()}})(function(W,J){var te=Object.prototype.hasOwnProperty,re=typeof Symbol=="function",ne=re&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",oe=re&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",de=typeof Object.create=="function",ue={__proto__:[]}instanceof Array,ce=!de&&!ue,he={create:de?function(){return ci(Object.create(null))}:ue?function(){return ci({__proto__:null})}:function(){return ci({})},has:ce?function(it,ft){return te.call(it,ft)}:function(it,ft){return ft in it},get:ce?function(it,ft){return te.call(it,ft)?it[ft]:void 0}:function(it,ft){return it[ft]}},pe=Object.getPrototypeOf(Function),fe=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:yi(),ge=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ai(),be=typeof WeakMap=="function"?WeakMap:Ii(),me=re?Symbol.for("@reflect-metadata:registry"):void 0,ve=Gt(),ye=Wt(ve);function we(it,ft,Et,Pt){if(He(Et)){if(!Lt(it))throw new TypeError;if(!jt(ft))throw new TypeError;return De(it,ft)}else{if(!Lt(it))throw new TypeError;if(!Ke(ft))throw new TypeError;if(!Ke(Pt)&&!He(Pt)&&!Ge(Pt))throw new TypeError;return Ge(Pt)&&(Pt=void 0),Et=Ct(Et),Me(it,ft,Et,Pt)}}W("decorate",we);function Se(it,ft){function Et(Pt,Ut){if(!Ke(Pt))throw new TypeError;if(!He(Ut)&&!Kt(Ut))throw new TypeError;kt(it,ft,Pt,Ut)}return Et}W("metadata",Se);function _e(it,ft,Et,Pt){if(!Ke(Et))throw new TypeError;return He(Pt)||(Pt=Ct(Pt)),kt(it,ft,Et,Pt)}W("defineMetadata",_e);function Ce(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Be(it,ft,Et)}W("hasMetadata",Ce);function Le(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Ve(it,ft,Et)}W("hasOwnMetadata",Le);function Pe(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Je(it,ft,Et)}W("getMetadata",Pe);function Ie(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Ye(it,ft,Et)}W("getOwnMetadata",Ie);function Fe(it,ft){if(!Ke(it))throw new TypeError;return He(ft)||(ft=Ct(ft)),Qe(it,ft)}W("getMetadataKeys",Fe);function qe(it,ft){if(!Ke(it))throw new TypeError;return He(ft)||(ft=Ct(ft)),We(it,ft)}W("getOwnMetadataKeys",qe);function Ae(it,ft,Et){if(!Ke(ft))throw new TypeError;if(He(Et)||(Et=Ct(Et)),!Ke(ft))throw new TypeError;He(Et)||(Et=Ct(Et));var Pt=pi(ft,Et,!1);return He(Pt)?!1:Pt.OrdinaryDeleteMetadata(it,ft,Et)}W("deleteMetadata",Ae);function De(it,ft){for(var Et=it.length-1;Et>=0;--Et){var Pt=it[Et],Ut=Pt(ft);if(!He(Ut)&&!Ge(Ut)){if(!jt(Ut))throw new TypeError;ft=Ut}}return ft}function Me(it,ft,Et,Pt){for(var Ut=it.length-1;Ut>=0;--Ut){var vi=it[Ut],bi=vi(ft,Et,Pt);if(!He(bi)&&!Ge(bi)){if(!Ke(bi))throw new TypeError;Pt=bi}}return Pt}function Be(it,ft,Et){var Pt=Ve(it,ft,Et);if(Pt)return!0;var Ut=Dt(ft);return Ge(Ut)?!1:Be(it,Ut,Et)}function Ve(it,ft,Et){var Pt=pi(ft,Et,!1);return He(Pt)?!1:nt(Pt.OrdinaryHasOwnMetadata(it,ft,Et))}function Je(it,ft,Et){var Pt=Ve(it,ft,Et);if(Pt)return Ye(it,ft,Et);var Ut=Dt(ft);if(!Ge(Ut))return Je(it,Ut,Et)}function Ye(it,ft,Et){var Pt=pi(ft,Et,!1);if(!He(Pt))return Pt.OrdinaryGetOwnMetadata(it,ft,Et)}function kt(it,ft,Et,Pt){var Ut=pi(Et,Pt,!0);Ut.OrdinaryDefineOwnMetadata(it,ft,Et,Pt)}function Qe(it,ft){var Et=We(it,ft),Pt=Dt(it);if(Pt===null)return Et;var Ut=Qe(Pt,ft);if(Ut.length<=0)return Et;if(Et.length<=0)return Ut;for(var vi=new ge,bi=[],Xt=0,Mt=Et;Xt<Mt.length;Xt++){var Nt=Mt[Xt],Ft=vi.has(Nt);Ft||(vi.add(Nt),bi.push(Nt))}for(var Ht=0,Zt=Ut;Ht<Zt.length;Ht++){var Nt=Zt[Ht],Ft=vi.has(Nt);Ft||(vi.add(Nt),bi.push(Nt))}return bi}function We(it,ft){var Et=pi(it,ft,!1);return Et?Et.OrdinaryOwnMetadataKeys(it,ft):[]}function Ne(it){if(it===null)return 1;switch(typeof it){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return it===null?1:6;default:return 6}}function He(it){return it===void 0}function Ge(it){return it===null}function Xe(it){return typeof it=="symbol"}function Ke(it){return typeof it=="object"?it!==null:typeof it=="function"}function je(it,ft){switch(Ne(it)){case 0:return it;case 1:return it;case 2:return it;case 3:return it;case 4:return it;case 5:return it}var Et="string",Pt=mi(it,ne);if(Pt!==void 0){var Ut=Pt.call(it,Et);if(Ke(Ut))throw new TypeError;return Ut}return Ze(it)}function Ze(it,ft){var Et,Pt;{var Ut=it.toString;if(Bt(Ut)){var Pt=Ut.call(it);if(!Ke(Pt))return Pt}var Et=it.valueOf;if(Bt(Et)){var Pt=Et.call(it);if(!Ke(Pt))return Pt}}throw new TypeError}function nt(it){return!!it}function ot(it){return""+it}function Ct(it){var ft=je(it);return Xe(ft)?ft:ot(ft)}function Lt(it){return Array.isArray?Array.isArray(it):it instanceof Object?it instanceof Array:Object.prototype.toString.call(it)==="[object Array]"}function Bt(it){return typeof it=="function"}function jt(it){return typeof it=="function"}function Kt(it){switch(Ne(it)){case 3:return!0;case 4:return!0;default:return!1}}function ei(it,ft){return it===ft||it!==it&&ft!==ft}function mi(it,ft){var Et=it[ft];if(Et!=null){if(!Bt(Et))throw new TypeError;return Et}}function di(it){var ft=mi(it,oe);if(!Bt(ft))throw new TypeError;var Et=ft.call(it);if(!Ke(Et))throw new TypeError;return Et}function xt(it){return it.value}function St(it){var ft=it.next();return ft.done?!1:ft}function qt(it){var ft=it.return;ft&&ft.call(it)}function Dt(it){var ft=Object.getPrototypeOf(it);if(typeof it!="function"||it===pe||ft!==pe)return ft;var Et=it.prototype,Pt=Et&&Object.getPrototypeOf(Et);if(Pt==null||Pt===Object.prototype)return ft;var Ut=Pt.constructor;return typeof Ut!="function"||Ut===it?ft:Ut}function Tt(){var it;!He(me)&&typeof J.Reflect<"u"&&!(me in J.Reflect)&&typeof J.Reflect.defineMetadata=="function"&&(it=Yt(J.Reflect));var ft,Et,Pt,Ut=new be,vi={registerProvider:bi,getProvider:Mt,setProvider:Ft};return vi;function bi(Ht){if(!Object.isExtensible(vi))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case it===Ht:break;case He(ft):ft=Ht;break;case ft===Ht:break;case He(Et):Et=Ht;break;case Et===Ht:break;default:Pt===void 0&&(Pt=new ge),Pt.add(Ht);break}}function Xt(Ht,Zt){if(!He(ft)){if(ft.isProviderFor(Ht,Zt))return ft;if(!He(Et)){if(Et.isProviderFor(Ht,Zt))return ft;if(!He(Pt))for(var li=di(Pt);;){var fi=St(li);if(!fi)return;var xi=xt(fi);if(xi.isProviderFor(Ht,Zt))return qt(li),xi}}}if(!He(it)&&it.isProviderFor(Ht,Zt))return it}function Mt(Ht,Zt){var li=Ut.get(Ht),fi;return He(li)||(fi=li.get(Zt)),He(fi)&&(fi=Xt(Ht,Zt),He(fi)||(He(li)&&(li=new fe,Ut.set(Ht,li)),li.set(Zt,fi))),fi}function Nt(Ht){if(He(Ht))throw new TypeError;return ft===Ht||Et===Ht||!He(Pt)&&Pt.has(Ht)}function Ft(Ht,Zt,li){if(!Nt(li))throw new Error("Metadata provider not registered.");var fi=Mt(Ht,Zt);if(fi!==li){if(!He(fi))return!1;var xi=Ut.get(Ht);He(xi)&&(xi=new fe,Ut.set(Ht,xi)),xi.set(Zt,li)}return!0}}function Gt(){var it;return!He(me)&&Ke(J.Reflect)&&Object.isExtensible(J.Reflect)&&(it=J.Reflect[me]),He(it)&&(it=Tt()),!He(me)&&Ke(J.Reflect)&&Object.isExtensible(J.Reflect)&&Object.defineProperty(J.Reflect,me,{enumerable:!1,configurable:!1,writable:!1,value:it}),it}function Wt(it){var ft=new be,Et={isProviderFor:function(Nt,Ft){var Ht=ft.get(Nt);return He(Ht)?!1:Ht.has(Ft)},OrdinaryDefineOwnMetadata:bi,OrdinaryHasOwnMetadata:Ut,OrdinaryGetOwnMetadata:vi,OrdinaryOwnMetadataKeys:Xt,OrdinaryDeleteMetadata:Mt};return ve.registerProvider(Et),Et;function Pt(Nt,Ft,Ht){var Zt=ft.get(Nt),li=!1;if(He(Zt)){if(!Ht)return;Zt=new fe,ft.set(Nt,Zt),li=!0}var fi=Zt.get(Ft);if(He(fi)){if(!Ht)return;if(fi=new fe,Zt.set(Ft,fi),!it.setProvider(Nt,Ft,Et))throw Zt.delete(Ft),li&&ft.delete(Nt),new Error("Wrong provider for target.")}return fi}function Ut(Nt,Ft,Ht){var Zt=Pt(Ft,Ht,!1);return He(Zt)?!1:nt(Zt.has(Nt))}function vi(Nt,Ft,Ht){var Zt=Pt(Ft,Ht,!1);if(!He(Zt))return Zt.get(Nt)}function bi(Nt,Ft,Ht,Zt){var li=Pt(Ht,Zt,!0);li.set(Nt,Ft)}function Xt(Nt,Ft){var Ht=[],Zt=Pt(Nt,Ft,!1);if(He(Zt))return Ht;for(var li=Zt.keys(),fi=di(li),xi=0;;){var Ni=St(fi);if(!Ni)return Ht.length=xi,Ht;var Xi=xt(Ni);try{Ht[xi]=Xi}catch(ir){try{qt(fi)}finally{throw ir}}xi++}}function Mt(Nt,Ft,Ht){var Zt=Pt(Ft,Ht,!1);if(He(Zt)||!Zt.delete(Nt))return!1;if(Zt.size===0){var li=ft.get(Ft);He(li)||(li.delete(Ht),li.size===0&&ft.delete(li))}return!0}}function Yt(it){var ft=it.defineMetadata,Et=it.hasOwnMetadata,Pt=it.getOwnMetadata,Ut=it.getOwnMetadataKeys,vi=it.deleteMetadata,bi=new be,Xt={isProviderFor:function(Mt,Nt){var Ft=bi.get(Mt);return!He(Ft)&&Ft.has(Nt)?!0:Ut(Mt,Nt).length?(He(Ft)&&(Ft=new ge,bi.set(Mt,Ft)),Ft.add(Nt),!0):!1},OrdinaryDefineOwnMetadata:ft,OrdinaryHasOwnMetadata:Et,OrdinaryGetOwnMetadata:Pt,OrdinaryOwnMetadataKeys:Ut,OrdinaryDeleteMetadata:vi};return Xt}function pi(it,ft,Et){var Pt=ve.getProvider(it,ft);if(!He(Pt))return Pt;if(Et){if(ve.setProvider(it,ft,ye))return ye;throw new Error("Illegal state.")}}function yi(){var it={},ft=[],Et=function(){function Xt(Mt,Nt,Ft){this._index=0,this._keys=Mt,this._values=Nt,this._selector=Ft}return Xt.prototype["@@iterator"]=function(){return this},Xt.prototype[oe]=function(){return this},Xt.prototype.next=function(){var Mt=this._index;if(Mt>=0&&Mt<this._keys.length){var Nt=this._selector(this._keys[Mt],this._values[Mt]);return Mt+1>=this._keys.length?(this._index=-1,this._keys=ft,this._values=ft):this._index++,{value:Nt,done:!1}}return{value:void 0,done:!0}},Xt.prototype.throw=function(Mt){throw this._index>=0&&(this._index=-1,this._keys=ft,this._values=ft),Mt},Xt.prototype.return=function(Mt){return this._index>=0&&(this._index=-1,this._keys=ft,this._values=ft),{value:Mt,done:!0}},Xt}(),Pt=function(){function Xt(){this._keys=[],this._values=[],this._cacheKey=it,this._cacheIndex=-2}return Object.defineProperty(Xt.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Xt.prototype.has=function(Mt){return this._find(Mt,!1)>=0},Xt.prototype.get=function(Mt){var Nt=this._find(Mt,!1);return Nt>=0?this._values[Nt]:void 0},Xt.prototype.set=function(Mt,Nt){var Ft=this._find(Mt,!0);return this._values[Ft]=Nt,this},Xt.prototype.delete=function(Mt){var Nt=this._find(Mt,!1);if(Nt>=0){for(var Ft=this._keys.length,Ht=Nt+1;Ht<Ft;Ht++)this._keys[Ht-1]=this._keys[Ht],this._values[Ht-1]=this._values[Ht];return this._keys.length--,this._values.length--,ei(Mt,this._cacheKey)&&(this._cacheKey=it,this._cacheIndex=-2),!0}return!1},Xt.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=it,this._cacheIndex=-2},Xt.prototype.keys=function(){return new Et(this._keys,this._values,Ut)},Xt.prototype.values=function(){return new Et(this._keys,this._values,vi)},Xt.prototype.entries=function(){return new Et(this._keys,this._values,bi)},Xt.prototype["@@iterator"]=function(){return this.entries()},Xt.prototype[oe]=function(){return this.entries()},Xt.prototype._find=function(Mt,Nt){if(!ei(this._cacheKey,Mt)){this._cacheIndex=-1;for(var Ft=0;Ft<this._keys.length;Ft++)if(ei(this._keys[Ft],Mt)){this._cacheIndex=Ft;break}}return this._cacheIndex<0&&Nt&&(this._cacheIndex=this._keys.length,this._keys.push(Mt),this._values.push(void 0)),this._cacheIndex},Xt}();return Pt;function Ut(Xt,Mt){return Xt}function vi(Xt,Mt){return Mt}function bi(Xt,Mt){return[Xt,Mt]}}function ai(){var it=function(){function ft(){this._map=new fe}return Object.defineProperty(ft.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),ft.prototype.has=function(Et){return this._map.has(Et)},ft.prototype.add=function(Et){return this._map.set(Et,Et),this},ft.prototype.delete=function(Et){return this._map.delete(Et)},ft.prototype.clear=function(){this._map.clear()},ft.prototype.keys=function(){return this._map.keys()},ft.prototype.values=function(){return this._map.keys()},ft.prototype.entries=function(){return this._map.entries()},ft.prototype["@@iterator"]=function(){return this.keys()},ft.prototype[oe]=function(){return this.keys()},ft}();return it}function Ii(){var it=16,ft=he.create(),Et=Pt();return function(){function Mt(){this._key=Pt()}return Mt.prototype.has=function(Nt){var Ft=Ut(Nt,!1);return Ft!==void 0?he.has(Ft,this._key):!1},Mt.prototype.get=function(Nt){var Ft=Ut(Nt,!1);return Ft!==void 0?he.get(Ft,this._key):void 0},Mt.prototype.set=function(Nt,Ft){var Ht=Ut(Nt,!0);return Ht[this._key]=Ft,this},Mt.prototype.delete=function(Nt){var Ft=Ut(Nt,!1);return Ft!==void 0?delete Ft[this._key]:!1},Mt.prototype.clear=function(){this._key=Pt()},Mt}();function Pt(){var Mt;do Mt="@@WeakMap@@"+Xt();while(he.has(ft,Mt));return ft[Mt]=!0,Mt}function Ut(Mt,Nt){if(!te.call(Mt,Et)){if(!Nt)return;Object.defineProperty(Mt,Et,{value:he.create()})}return Mt[Et]}function vi(Mt,Nt){for(var Ft=0;Ft<Nt;++Ft)Mt[Ft]=Math.random()*255|0;return Mt}function bi(Mt){if(typeof Uint8Array=="function"){var Nt=new Uint8Array(Mt);return typeof crypto<"u"?crypto.getRandomValues(Nt):typeof msCrypto<"u"?msCrypto.getRandomValues(Nt):vi(Nt,Mt),Nt}return vi(new Array(Mt),Mt)}function Xt(){var Mt=bi(it);Mt[6]=Mt[6]&79|64,Mt[8]=Mt[8]&191|128;for(var Nt="",Ft=0;Ft<it;++Ft){var Ht=Mt[Ft];(Ft===4||Ft===6||Ft===8)&&(Nt+="-"),Ht<16&&(Nt+="0"),Nt+=Ht.toString(16).toLowerCase()}return Nt}}function ci(it){return it.__=void 0,delete it.__,it}})})(Reflect$1||(Reflect$1={}));/*
|
|
14
|
+
***************************************************************************** */var Reflect$1;(function(X){(function(W){var J=typeof globalThis=="object"?globalThis:typeof commonjsGlobal=="object"?commonjsGlobal:typeof self=="object"?self:typeof this=="object"?this:de(),te=re(X);typeof J.Reflect<"u"&&(te=re(J.Reflect,te)),W(te,J),typeof J.Reflect>"u"&&(J.Reflect=X);function re(ue,ce){return function(he,pe){Object.defineProperty(ue,he,{configurable:!0,writable:!0,value:pe}),ce&&ce(he,pe)}}function ne(){try{return Function("return this;")()}catch{}}function oe(){try{return(0,eval)("(function() { return this; })()")}catch{}}function de(){return ne()||oe()}})(function(W,J){var te=Object.prototype.hasOwnProperty,re=typeof Symbol=="function",ne=re&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",oe=re&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",de=typeof Object.create=="function",ue={__proto__:[]}instanceof Array,ce=!de&&!ue,he={create:de?function(){return ci(Object.create(null))}:ue?function(){return ci({__proto__:null})}:function(){return ci({})},has:ce?function(it,ft){return te.call(it,ft)}:function(it,ft){return ft in it},get:ce?function(it,ft){return te.call(it,ft)?it[ft]:void 0}:function(it,ft){return it[ft]}},pe=Object.getPrototypeOf(Function),fe=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:yi(),ge=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ai(),be=typeof WeakMap=="function"?WeakMap:Ii(),me=re?Symbol.for("@reflect-metadata:registry"):void 0,ve=Gt(),ye=Wt(ve);function we(it,ft,Et,Pt){if(He(Et)){if(!Lt(it))throw new TypeError;if(!jt(ft))throw new TypeError;return De(it,ft)}else{if(!Lt(it))throw new TypeError;if(!Ke(ft))throw new TypeError;if(!Ke(Pt)&&!He(Pt)&&!Ge(Pt))throw new TypeError;return Ge(Pt)&&(Pt=void 0),Et=Ct(Et),Me(it,ft,Et,Pt)}}W("decorate",we);function Se(it,ft){function Et(Pt,Ut){if(!Ke(Pt))throw new TypeError;if(!He(Ut)&&!Kt(Ut))throw new TypeError;kt(it,ft,Pt,Ut)}return Et}W("metadata",Se);function _e(it,ft,Et,Pt){if(!Ke(Et))throw new TypeError;return He(Pt)||(Pt=Ct(Pt)),kt(it,ft,Et,Pt)}W("defineMetadata",_e);function Ce(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Be(it,ft,Et)}W("hasMetadata",Ce);function Le(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Ve(it,ft,Et)}W("hasOwnMetadata",Le);function Pe(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Je(it,ft,Et)}W("getMetadata",Pe);function Ie(it,ft,Et){if(!Ke(ft))throw new TypeError;return He(Et)||(Et=Ct(Et)),Ye(it,ft,Et)}W("getOwnMetadata",Ie);function Ne(it,ft){if(!Ke(it))throw new TypeError;return He(ft)||(ft=Ct(ft)),Qe(it,ft)}W("getMetadataKeys",Ne);function qe(it,ft){if(!Ke(it))throw new TypeError;return He(ft)||(ft=Ct(ft)),We(it,ft)}W("getOwnMetadataKeys",qe);function Ae(it,ft,Et){if(!Ke(ft))throw new TypeError;if(He(Et)||(Et=Ct(Et)),!Ke(ft))throw new TypeError;He(Et)||(Et=Ct(Et));var Pt=pi(ft,Et,!1);return He(Pt)?!1:Pt.OrdinaryDeleteMetadata(it,ft,Et)}W("deleteMetadata",Ae);function De(it,ft){for(var Et=it.length-1;Et>=0;--Et){var Pt=it[Et],Ut=Pt(ft);if(!He(Ut)&&!Ge(Ut)){if(!jt(Ut))throw new TypeError;ft=Ut}}return ft}function Me(it,ft,Et,Pt){for(var Ut=it.length-1;Ut>=0;--Ut){var vi=it[Ut],bi=vi(ft,Et,Pt);if(!He(bi)&&!Ge(bi)){if(!Ke(bi))throw new TypeError;Pt=bi}}return Pt}function Be(it,ft,Et){var Pt=Ve(it,ft,Et);if(Pt)return!0;var Ut=Dt(ft);return Ge(Ut)?!1:Be(it,Ut,Et)}function Ve(it,ft,Et){var Pt=pi(ft,Et,!1);return He(Pt)?!1:nt(Pt.OrdinaryHasOwnMetadata(it,ft,Et))}function Je(it,ft,Et){var Pt=Ve(it,ft,Et);if(Pt)return Ye(it,ft,Et);var Ut=Dt(ft);if(!Ge(Ut))return Je(it,Ut,Et)}function Ye(it,ft,Et){var Pt=pi(ft,Et,!1);if(!He(Pt))return Pt.OrdinaryGetOwnMetadata(it,ft,Et)}function kt(it,ft,Et,Pt){var Ut=pi(Et,Pt,!0);Ut.OrdinaryDefineOwnMetadata(it,ft,Et,Pt)}function Qe(it,ft){var Et=We(it,ft),Pt=Dt(it);if(Pt===null)return Et;var Ut=Qe(Pt,ft);if(Ut.length<=0)return Et;if(Et.length<=0)return Ut;for(var vi=new ge,bi=[],Xt=0,Mt=Et;Xt<Mt.length;Xt++){var Ft=Mt[Xt],Nt=vi.has(Ft);Nt||(vi.add(Ft),bi.push(Ft))}for(var Ht=0,Zt=Ut;Ht<Zt.length;Ht++){var Ft=Zt[Ht],Nt=vi.has(Ft);Nt||(vi.add(Ft),bi.push(Ft))}return bi}function We(it,ft){var Et=pi(it,ft,!1);return Et?Et.OrdinaryOwnMetadataKeys(it,ft):[]}function Fe(it){if(it===null)return 1;switch(typeof it){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return it===null?1:6;default:return 6}}function He(it){return it===void 0}function Ge(it){return it===null}function Xe(it){return typeof it=="symbol"}function Ke(it){return typeof it=="object"?it!==null:typeof it=="function"}function je(it,ft){switch(Fe(it)){case 0:return it;case 1:return it;case 2:return it;case 3:return it;case 4:return it;case 5:return it}var Et="string",Pt=mi(it,ne);if(Pt!==void 0){var Ut=Pt.call(it,Et);if(Ke(Ut))throw new TypeError;return Ut}return Ze(it)}function Ze(it,ft){var Et,Pt;{var Ut=it.toString;if(Bt(Ut)){var Pt=Ut.call(it);if(!Ke(Pt))return Pt}var Et=it.valueOf;if(Bt(Et)){var Pt=Et.call(it);if(!Ke(Pt))return Pt}}throw new TypeError}function nt(it){return!!it}function ot(it){return""+it}function Ct(it){var ft=je(it);return Xe(ft)?ft:ot(ft)}function Lt(it){return Array.isArray?Array.isArray(it):it instanceof Object?it instanceof Array:Object.prototype.toString.call(it)==="[object Array]"}function Bt(it){return typeof it=="function"}function jt(it){return typeof it=="function"}function Kt(it){switch(Fe(it)){case 3:return!0;case 4:return!0;default:return!1}}function ei(it,ft){return it===ft||it!==it&&ft!==ft}function mi(it,ft){var Et=it[ft];if(Et!=null){if(!Bt(Et))throw new TypeError;return Et}}function di(it){var ft=mi(it,oe);if(!Bt(ft))throw new TypeError;var Et=ft.call(it);if(!Ke(Et))throw new TypeError;return Et}function xt(it){return it.value}function St(it){var ft=it.next();return ft.done?!1:ft}function qt(it){var ft=it.return;ft&&ft.call(it)}function Dt(it){var ft=Object.getPrototypeOf(it);if(typeof it!="function"||it===pe||ft!==pe)return ft;var Et=it.prototype,Pt=Et&&Object.getPrototypeOf(Et);if(Pt==null||Pt===Object.prototype)return ft;var Ut=Pt.constructor;return typeof Ut!="function"||Ut===it?ft:Ut}function Tt(){var it;!He(me)&&typeof J.Reflect<"u"&&!(me in J.Reflect)&&typeof J.Reflect.defineMetadata=="function"&&(it=Yt(J.Reflect));var ft,Et,Pt,Ut=new be,vi={registerProvider:bi,getProvider:Mt,setProvider:Nt};return vi;function bi(Ht){if(!Object.isExtensible(vi))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case it===Ht:break;case He(ft):ft=Ht;break;case ft===Ht:break;case He(Et):Et=Ht;break;case Et===Ht:break;default:Pt===void 0&&(Pt=new ge),Pt.add(Ht);break}}function Xt(Ht,Zt){if(!He(ft)){if(ft.isProviderFor(Ht,Zt))return ft;if(!He(Et)){if(Et.isProviderFor(Ht,Zt))return ft;if(!He(Pt))for(var li=di(Pt);;){var fi=St(li);if(!fi)return;var xi=xt(fi);if(xi.isProviderFor(Ht,Zt))return qt(li),xi}}}if(!He(it)&&it.isProviderFor(Ht,Zt))return it}function Mt(Ht,Zt){var li=Ut.get(Ht),fi;return He(li)||(fi=li.get(Zt)),He(fi)&&(fi=Xt(Ht,Zt),He(fi)||(He(li)&&(li=new fe,Ut.set(Ht,li)),li.set(Zt,fi))),fi}function Ft(Ht){if(He(Ht))throw new TypeError;return ft===Ht||Et===Ht||!He(Pt)&&Pt.has(Ht)}function Nt(Ht,Zt,li){if(!Ft(li))throw new Error("Metadata provider not registered.");var fi=Mt(Ht,Zt);if(fi!==li){if(!He(fi))return!1;var xi=Ut.get(Ht);He(xi)&&(xi=new fe,Ut.set(Ht,xi)),xi.set(Zt,li)}return!0}}function Gt(){var it;return!He(me)&&Ke(J.Reflect)&&Object.isExtensible(J.Reflect)&&(it=J.Reflect[me]),He(it)&&(it=Tt()),!He(me)&&Ke(J.Reflect)&&Object.isExtensible(J.Reflect)&&Object.defineProperty(J.Reflect,me,{enumerable:!1,configurable:!1,writable:!1,value:it}),it}function Wt(it){var ft=new be,Et={isProviderFor:function(Ft,Nt){var Ht=ft.get(Ft);return He(Ht)?!1:Ht.has(Nt)},OrdinaryDefineOwnMetadata:bi,OrdinaryHasOwnMetadata:Ut,OrdinaryGetOwnMetadata:vi,OrdinaryOwnMetadataKeys:Xt,OrdinaryDeleteMetadata:Mt};return ve.registerProvider(Et),Et;function Pt(Ft,Nt,Ht){var Zt=ft.get(Ft),li=!1;if(He(Zt)){if(!Ht)return;Zt=new fe,ft.set(Ft,Zt),li=!0}var fi=Zt.get(Nt);if(He(fi)){if(!Ht)return;if(fi=new fe,Zt.set(Nt,fi),!it.setProvider(Ft,Nt,Et))throw Zt.delete(Nt),li&&ft.delete(Ft),new Error("Wrong provider for target.")}return fi}function Ut(Ft,Nt,Ht){var Zt=Pt(Nt,Ht,!1);return He(Zt)?!1:nt(Zt.has(Ft))}function vi(Ft,Nt,Ht){var Zt=Pt(Nt,Ht,!1);if(!He(Zt))return Zt.get(Ft)}function bi(Ft,Nt,Ht,Zt){var li=Pt(Ht,Zt,!0);li.set(Ft,Nt)}function Xt(Ft,Nt){var Ht=[],Zt=Pt(Ft,Nt,!1);if(He(Zt))return Ht;for(var li=Zt.keys(),fi=di(li),xi=0;;){var Fi=St(fi);if(!Fi)return Ht.length=xi,Ht;var Xi=xt(Fi);try{Ht[xi]=Xi}catch(ir){try{qt(fi)}finally{throw ir}}xi++}}function Mt(Ft,Nt,Ht){var Zt=Pt(Nt,Ht,!1);if(He(Zt)||!Zt.delete(Ft))return!1;if(Zt.size===0){var li=ft.get(Nt);He(li)||(li.delete(Ht),li.size===0&&ft.delete(li))}return!0}}function Yt(it){var ft=it.defineMetadata,Et=it.hasOwnMetadata,Pt=it.getOwnMetadata,Ut=it.getOwnMetadataKeys,vi=it.deleteMetadata,bi=new be,Xt={isProviderFor:function(Mt,Ft){var Nt=bi.get(Mt);return!He(Nt)&&Nt.has(Ft)?!0:Ut(Mt,Ft).length?(He(Nt)&&(Nt=new ge,bi.set(Mt,Nt)),Nt.add(Ft),!0):!1},OrdinaryDefineOwnMetadata:ft,OrdinaryHasOwnMetadata:Et,OrdinaryGetOwnMetadata:Pt,OrdinaryOwnMetadataKeys:Ut,OrdinaryDeleteMetadata:vi};return Xt}function pi(it,ft,Et){var Pt=ve.getProvider(it,ft);if(!He(Pt))return Pt;if(Et){if(ve.setProvider(it,ft,ye))return ye;throw new Error("Illegal state.")}}function yi(){var it={},ft=[],Et=function(){function Xt(Mt,Ft,Nt){this._index=0,this._keys=Mt,this._values=Ft,this._selector=Nt}return Xt.prototype["@@iterator"]=function(){return this},Xt.prototype[oe]=function(){return this},Xt.prototype.next=function(){var Mt=this._index;if(Mt>=0&&Mt<this._keys.length){var Ft=this._selector(this._keys[Mt],this._values[Mt]);return Mt+1>=this._keys.length?(this._index=-1,this._keys=ft,this._values=ft):this._index++,{value:Ft,done:!1}}return{value:void 0,done:!0}},Xt.prototype.throw=function(Mt){throw this._index>=0&&(this._index=-1,this._keys=ft,this._values=ft),Mt},Xt.prototype.return=function(Mt){return this._index>=0&&(this._index=-1,this._keys=ft,this._values=ft),{value:Mt,done:!0}},Xt}(),Pt=function(){function Xt(){this._keys=[],this._values=[],this._cacheKey=it,this._cacheIndex=-2}return Object.defineProperty(Xt.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Xt.prototype.has=function(Mt){return this._find(Mt,!1)>=0},Xt.prototype.get=function(Mt){var Ft=this._find(Mt,!1);return Ft>=0?this._values[Ft]:void 0},Xt.prototype.set=function(Mt,Ft){var Nt=this._find(Mt,!0);return this._values[Nt]=Ft,this},Xt.prototype.delete=function(Mt){var Ft=this._find(Mt,!1);if(Ft>=0){for(var Nt=this._keys.length,Ht=Ft+1;Ht<Nt;Ht++)this._keys[Ht-1]=this._keys[Ht],this._values[Ht-1]=this._values[Ht];return this._keys.length--,this._values.length--,ei(Mt,this._cacheKey)&&(this._cacheKey=it,this._cacheIndex=-2),!0}return!1},Xt.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=it,this._cacheIndex=-2},Xt.prototype.keys=function(){return new Et(this._keys,this._values,Ut)},Xt.prototype.values=function(){return new Et(this._keys,this._values,vi)},Xt.prototype.entries=function(){return new Et(this._keys,this._values,bi)},Xt.prototype["@@iterator"]=function(){return this.entries()},Xt.prototype[oe]=function(){return this.entries()},Xt.prototype._find=function(Mt,Ft){if(!ei(this._cacheKey,Mt)){this._cacheIndex=-1;for(var Nt=0;Nt<this._keys.length;Nt++)if(ei(this._keys[Nt],Mt)){this._cacheIndex=Nt;break}}return this._cacheIndex<0&&Ft&&(this._cacheIndex=this._keys.length,this._keys.push(Mt),this._values.push(void 0)),this._cacheIndex},Xt}();return Pt;function Ut(Xt,Mt){return Xt}function vi(Xt,Mt){return Mt}function bi(Xt,Mt){return[Xt,Mt]}}function ai(){var it=function(){function ft(){this._map=new fe}return Object.defineProperty(ft.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),ft.prototype.has=function(Et){return this._map.has(Et)},ft.prototype.add=function(Et){return this._map.set(Et,Et),this},ft.prototype.delete=function(Et){return this._map.delete(Et)},ft.prototype.clear=function(){this._map.clear()},ft.prototype.keys=function(){return this._map.keys()},ft.prototype.values=function(){return this._map.keys()},ft.prototype.entries=function(){return this._map.entries()},ft.prototype["@@iterator"]=function(){return this.keys()},ft.prototype[oe]=function(){return this.keys()},ft}();return it}function Ii(){var it=16,ft=he.create(),Et=Pt();return function(){function Mt(){this._key=Pt()}return Mt.prototype.has=function(Ft){var Nt=Ut(Ft,!1);return Nt!==void 0?he.has(Nt,this._key):!1},Mt.prototype.get=function(Ft){var Nt=Ut(Ft,!1);return Nt!==void 0?he.get(Nt,this._key):void 0},Mt.prototype.set=function(Ft,Nt){var Ht=Ut(Ft,!0);return Ht[this._key]=Nt,this},Mt.prototype.delete=function(Ft){var Nt=Ut(Ft,!1);return Nt!==void 0?delete Nt[this._key]:!1},Mt.prototype.clear=function(){this._key=Pt()},Mt}();function Pt(){var Mt;do Mt="@@WeakMap@@"+Xt();while(he.has(ft,Mt));return ft[Mt]=!0,Mt}function Ut(Mt,Ft){if(!te.call(Mt,Et)){if(!Ft)return;Object.defineProperty(Mt,Et,{value:he.create()})}return Mt[Et]}function vi(Mt,Ft){for(var Nt=0;Nt<Ft;++Nt)Mt[Nt]=Math.random()*255|0;return Mt}function bi(Mt){if(typeof Uint8Array=="function"){var Ft=new Uint8Array(Mt);return typeof crypto<"u"?crypto.getRandomValues(Ft):typeof msCrypto<"u"?msCrypto.getRandomValues(Ft):vi(Ft,Mt),Ft}return vi(new Array(Mt),Mt)}function Xt(){var Mt=bi(it);Mt[6]=Mt[6]&79|64,Mt[8]=Mt[8]&191|128;for(var Ft="",Nt=0;Nt<it;++Nt){var Ht=Mt[Nt];(Nt===4||Nt===6||Nt===8)&&(Ft+="-"),Ht<16&&(Ft+="0"),Ft+=Ht.toString(16).toLowerCase()}return Ft}}function ci(it){return it.__=void 0,delete it.__,it}})})(Reflect$1||(Reflect$1={}));/*
|
|
15
15
|
* @license
|
|
16
16
|
* BSD License
|
|
17
17
|
*
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*
|
|
28
28
|
* THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
29
29
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
-
*/const o$Y=()=>{};function _isPlaceholder$1(X){return X!=null&&typeof X=="object"&&X["@@functional/placeholder"]===!0}function _curry1$1(X){return function W(J){return arguments.length===0||_isPlaceholder$1(J)?W:X.apply(this,arguments)}}function _curry2$1(X){return function W(J,te){switch(arguments.length){case 0:return W;case 1:return _isPlaceholder$1(J)?W:_curry1$1(function(re){return X(J,re)});default:return _isPlaceholder$1(J)&&_isPlaceholder$1(te)?W:_isPlaceholder$1(J)?_curry1$1(function(re){return X(re,te)}):_isPlaceholder$1(te)?_curry1$1(function(re){return X(J,re)}):X(J,te)}}}function _isFunction(X){var W=Object.prototype.toString.call(X);return W==="[object Function]"||W==="[object AsyncFunction]"||W==="[object GeneratorFunction]"||W==="[object AsyncGeneratorFunction]"}function _arrayFromIterator$1(X){for(var W=[],J;!(J=X.next()).done;)W.push(J.value);return W}function _includesWith$1(X,W,J){for(var te=0,re=J.length;te<re;){if(X(W,J[te]))return!0;te+=1}return!1}function _functionName$1(X){var W=String(X).match(/^function (\w*)/);return W==null?"":W[1]}function _has$1(X,W){return Object.prototype.hasOwnProperty.call(W,X)}function _objectIs$2(X,W){return X===W?X!==0||1/X===1/W:X!==X&&W!==W}const _objectIs$3=typeof Object.is=="function"?Object.is:_objectIs$2;var toString$3=Object.prototype.toString,_isArguments$1=function(){return toString$3.call(arguments)==="[object Arguments]"?function(W){return toString$3.call(W)==="[object Arguments]"}:function(W){return _has$1("callee",W)}}(),hasEnumBug$1=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps$1=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug$1=function(){return arguments.propertyIsEnumerable("length")}(),contains$2=function(W,J){for(var te=0;te<W.length;){if(W[te]===J)return!0;te+=1}return!1},keys$1=_curry1$1(typeof Object.keys=="function"&&!hasArgsEnumBug$1?function(W){return Object(W)!==W?[]:Object.keys(W)}:function(W){if(Object(W)!==W)return[];var J,te,re=[],ne=hasArgsEnumBug$1&&_isArguments$1(W);for(J in W)_has$1(J,W)&&(!ne||J!=="length")&&(re[re.length]=J);if(hasEnumBug$1)for(te=nonEnumerableProps$1.length-1;te>=0;)J=nonEnumerableProps$1[te],_has$1(J,W)&&!contains$2(re,J)&&(re[re.length]=J),te-=1;return re}),type$1=_curry1$1(function(W){return W===null?"Null":W===void 0?"Undefined":Object.prototype.toString.call(W).slice(8,-1)});function _uniqContentEquals$1(X,W,J,te){var re=_arrayFromIterator$1(X),ne=_arrayFromIterator$1(W);function oe(de,ue){return _equals$1(de,ue,J.slice(),te.slice())}return!_includesWith$1(function(de,ue){return!_includesWith$1(oe,ue,de)},ne,re)}function _equals$1(X,W,J,te){if(_objectIs$3(X,W))return!0;var re=type$1(X);if(re!==type$1(W)||X==null||W==null)return!1;if(typeof X["fantasy-land/equals"]=="function"||typeof W["fantasy-land/equals"]=="function")return typeof X["fantasy-land/equals"]=="function"&&X["fantasy-land/equals"](W)&&typeof W["fantasy-land/equals"]=="function"&&W["fantasy-land/equals"](X);if(typeof X.equals=="function"||typeof W.equals=="function")return typeof X.equals=="function"&&X.equals(W)&&typeof W.equals=="function"&&W.equals(X);switch(re){case"Arguments":case"Array":case"Object":if(typeof X.constructor=="function"&&_functionName$1(X.constructor)==="Promise")return X===W;break;case"Boolean":case"Number":case"String":if(!(typeof X==typeof W&&_objectIs$3(X.valueOf(),W.valueOf())))return!1;break;case"Date":if(!_objectIs$3(X.valueOf(),W.valueOf()))return!1;break;case"Error":return X.name===W.name&&X.message===W.message;case"RegExp":if(!(X.source===W.source&&X.global===W.global&&X.ignoreCase===W.ignoreCase&&X.multiline===W.multiline&&X.sticky===W.sticky&&X.unicode===W.unicode))return!1;break}for(var ne=J.length-1;ne>=0;){if(J[ne]===X)return te[ne]===W;ne-=1}switch(re){case"Map":return X.size!==W.size?!1:_uniqContentEquals$1(X.entries(),W.entries(),J.concat([X]),te.concat([W]));case"Set":return X.size!==W.size?!1:_uniqContentEquals$1(X.values(),W.values(),J.concat([X]),te.concat([W]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var oe=keys$1(X);if(oe.length!==keys$1(W).length)return!1;var de=J.concat([X]),ue=te.concat([W]);for(ne=oe.length-1;ne>=0;){var ce=oe[ne];if(!(_has$1(ce,W)&&_equals$1(W[ce],X[ce],de,ue)))return!1;ne-=1}return!0}var equals$1=_curry2$1(function(W,J){return _equals$1(W,J,[],[])});function _indexOf$1(X,W,J){var te,re;if(typeof X.indexOf=="function")switch(typeof W){case"number":if(W===0){for(te=1/W;J<X.length;){if(re=X[J],re===0&&1/re===te)return J;J+=1}return-1}else if(W!==W){for(;J<X.length;){if(re=X[J],typeof re=="number"&&re!==re)return J;J+=1}return-1}return X.indexOf(W,J);case"string":case"boolean":case"function":case"undefined":return X.indexOf(W,J);case"object":if(W===null)return X.indexOf(W,J)}for(;J<X.length;){if(equals$1(X[J],W))return J;J+=1}return-1}function _includes$1(X,W){return _indexOf$1(W,X,0)>=0}function _map$1(X,W){for(var J=0,te=W.length,re=Array(te);J<te;)re[J]=X(W[J]),J+=1;return re}function _quote$1(X){var W=X.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+W.replace(/"/g,'\\"')+'"'}var pad$1=function(W){return(W<10?"0":"")+W},_toISOString$1=typeof Date.prototype.toISOString=="function"?function(W){return W.toISOString()}:function(W){return W.getUTCFullYear()+"-"+pad$1(W.getUTCMonth()+1)+"-"+pad$1(W.getUTCDate())+"T"+pad$1(W.getUTCHours())+":"+pad$1(W.getUTCMinutes())+":"+pad$1(W.getUTCSeconds())+"."+(W.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function _complement$1(X){return function(){return!X.apply(this,arguments)}}const _isArray$1=Array.isArray||function(W){return W!=null&&W.length>=0&&Object.prototype.toString.call(W)==="[object Array]"};function _isTransformer$1(X){return X!=null&&typeof X["@@transducer/step"]=="function"}function _dispatchable$1(X,W,J){return function(){if(arguments.length===0)return J();var te=Array.prototype.slice.call(arguments,0),re=te.pop();if(!_isArray$1(re)){for(var ne=0;ne<X.length;){if(typeof re[X[ne]]=="function")return re[X[ne]].apply(re,te);ne+=1}if(_isTransformer$1(re)){var oe=W.apply(null,te);return oe(re)}}return J.apply(this,arguments)}}function _filter$1(X,W){for(var J=0,te=W.length,re=[];J<te;)X(W[J])&&(re[re.length]=W[J]),J+=1;return re}function _isObject$1(X){return Object.prototype.toString.call(X)==="[object Object]"}function _isString$1(X){return Object.prototype.toString.call(X)==="[object String]"}var _isArrayLike$1=_curry1$1(function(W){return _isArray$1(W)?!0:!W||typeof W!="object"||_isString$1(W)?!1:W.nodeType===1?!!W.length:W.length===0?!0:W.length>0?W.hasOwnProperty(0)&&W.hasOwnProperty(W.length-1):!1}),XWrap$1=function(){function X(W){this.f=W}return X.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},X.prototype["@@transducer/result"]=function(W){return W},X.prototype["@@transducer/step"]=function(W,J){return this.f(W,J)},X}();function _xwrap$1(X){return new XWrap$1(X)}function _arity$1(X,W){switch(X){case 0:return function(){return W.apply(this,arguments)};case 1:return function(J){return W.apply(this,arguments)};case 2:return function(J,te){return W.apply(this,arguments)};case 3:return function(J,te,re){return W.apply(this,arguments)};case 4:return function(J,te,re,ne){return W.apply(this,arguments)};case 5:return function(J,te,re,ne,oe){return W.apply(this,arguments)};case 6:return function(J,te,re,ne,oe,de){return W.apply(this,arguments)};case 7:return function(J,te,re,ne,oe,de,ue){return W.apply(this,arguments)};case 8:return function(J,te,re,ne,oe,de,ue,ce){return W.apply(this,arguments)};case 9:return function(J,te,re,ne,oe,de,ue,ce,he){return W.apply(this,arguments)};case 10:return function(J,te,re,ne,oe,de,ue,ce,he,pe){return W.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}var bind$2=_curry2$1(function(W,J){return _arity$1(W.length,function(){return W.apply(J,arguments)})});function _arrayReduce$1(X,W,J){for(var te=0,re=J.length;te<re;){if(W=X["@@transducer/step"](W,J[te]),W&&W["@@transducer/reduced"]){W=W["@@transducer/value"];break}te+=1}return X["@@transducer/result"](W)}function _iterableReduce(X,W,J){for(var te=J.next();!te.done;){if(W=X["@@transducer/step"](W,te.value),W&&W["@@transducer/reduced"]){W=W["@@transducer/value"];break}te=J.next()}return X["@@transducer/result"](W)}function _methodReduce(X,W,J,te){return X["@@transducer/result"](J[te](bind$2(X["@@transducer/step"],X),W))}var symIterator$1=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _reduce(X,W,J){if(typeof X=="function"&&(X=_xwrap$1(X)),_isArrayLike$1(J))return _arrayReduce$1(X,W,J);if(typeof J["fantasy-land/reduce"]=="function")return _methodReduce(X,W,J,"fantasy-land/reduce");if(J[symIterator$1]!=null)return _iterableReduce(X,W,J[symIterator$1]());if(typeof J.next=="function")return _iterableReduce(X,W,J);if(typeof J.reduce=="function")return _methodReduce(X,W,J,"reduce");throw new TypeError("reduce: list must be array or iterable")}const _xfBase$1={init:function(){return this.xf["@@transducer/init"]()},result:function(X){return this.xf["@@transducer/result"](X)}};var XFilter$1=function(){function X(W,J){this.xf=J,this.f=W}return X.prototype["@@transducer/init"]=_xfBase$1.init,X.prototype["@@transducer/result"]=_xfBase$1.result,X.prototype["@@transducer/step"]=function(W,J){return this.f(J)?this.xf["@@transducer/step"](W,J):W},X}(),_xfilter$1=_curry2$1(function(W,J){return new XFilter$1(W,J)}),filter$1=_curry2$1(_dispatchable$1(["filter"],_xfilter$1,function(X,W){return _isObject$1(W)?_reduce(function(J,te){return X(W[te])&&(J[te]=W[te]),J},{},keys$1(W)):_filter$1(X,W)})),reject$1=_curry2$1(function(W,J){return filter$1(_complement$1(W),J)});function _toString$1(X,W){var J=function(oe){var de=W.concat([X]);return _includes$1(oe,de)?"<Circular>":_toString$1(oe,de)},te=function(ne,oe){return _map$1(function(de){return _quote$1(de)+": "+J(ne[de])},oe.slice().sort())};switch(Object.prototype.toString.call(X)){case"[object Arguments]":return"(function() { return arguments; }("+_map$1(J,X).join(", ")+"))";case"[object Array]":return"["+_map$1(J,X).concat(te(X,reject$1(function(ne){return/^\d+$/.test(ne)},keys$1(X)))).join(", ")+"]";case"[object Boolean]":return typeof X=="object"?"new Boolean("+J(X.valueOf())+")":X.toString();case"[object Date]":return"new Date("+(isNaN(X.valueOf())?J(NaN):_quote$1(_toISOString$1(X)))+")";case"[object Null]":return"null";case"[object Number]":return typeof X=="object"?"new Number("+J(X.valueOf())+")":1/X===-1/0?"-0":X.toString(10);case"[object String]":return typeof X=="object"?"new String("+J(X.valueOf())+")":_quote$1(X);case"[object Undefined]":return"undefined";default:if(typeof X.toString=="function"){var re=X.toString();if(re!=="[object Object]")return re}return"{"+te(X,keys$1(X)).join(", ")+"}"}}function _assertPromise(X,W){if(W==null||!_isFunction(W.then))throw new TypeError("`"+X+"` expected a Promise, received "+_toString$1(W,[]))}var andThen=_curry2$1(function(W,J){return _assertPromise("andThen",J),J.then(W)}),XMap$1=function(){function X(W,J){this.xf=J,this.f=W}return X.prototype["@@transducer/init"]=_xfBase$1.init,X.prototype["@@transducer/result"]=_xfBase$1.result,X.prototype["@@transducer/step"]=function(W,J){return this.xf["@@transducer/step"](W,this.f(J))},X}(),_xmap$1=_curry2$1(function(W,J){return new XMap$1(W,J)});function _curryN$1(X,W,J){return function(){for(var te=[],re=0,ne=X,oe=0;oe<W.length||re<arguments.length;){var de;oe<W.length&&(!_isPlaceholder$1(W[oe])||re>=arguments.length)?de=W[oe]:(de=arguments[re],re+=1),te[oe]=de,_isPlaceholder$1(de)||(ne-=1),oe+=1}return ne<=0?J.apply(this,te):_arity$1(ne,_curryN$1(X,te,J))}}var curryN$1=_curry2$1(function(W,J){return W===1?_curry1$1(J):_arity$1(W,_curryN$1(W,[],J))}),map$1=_curry2$1(_dispatchable$1(["fantasy-land/map","map"],_xmap$1,function(W,J){switch(Object.prototype.toString.call(J)){case"[object Function]":return curryN$1(J.length,function(){return W.call(this,J.apply(this,arguments))});case"[object Object]":return _reduce(function(te,re){return te[re]=W(J[re]),te},{},keys$1(J));default:return _map$1(W,J)}}));function _pipe(X,W){return function(){return W.call(this,X.apply(this,arguments))}}function _curry3$1(X){return function W(J,te,re){switch(arguments.length){case 0:return W;case 1:return _isPlaceholder$1(J)?W:_curry2$1(function(ne,oe){return X(J,ne,oe)});case 2:return _isPlaceholder$1(J)&&_isPlaceholder$1(te)?W:_isPlaceholder$1(J)?_curry2$1(function(ne,oe){return X(ne,te,oe)}):_isPlaceholder$1(te)?_curry2$1(function(ne,oe){return X(J,ne,oe)}):_curry1$1(function(ne){return X(J,te,ne)});default:return _isPlaceholder$1(J)&&_isPlaceholder$1(te)&&_isPlaceholder$1(re)?W:_isPlaceholder$1(J)&&_isPlaceholder$1(te)?_curry2$1(function(ne,oe){return X(ne,oe,re)}):_isPlaceholder$1(J)&&_isPlaceholder$1(re)?_curry2$1(function(ne,oe){return X(ne,te,oe)}):_isPlaceholder$1(te)&&_isPlaceholder$1(re)?_curry2$1(function(ne,oe){return X(J,ne,oe)}):_isPlaceholder$1(J)?_curry1$1(function(ne){return X(ne,te,re)}):_isPlaceholder$1(te)?_curry1$1(function(ne){return X(J,ne,re)}):_isPlaceholder$1(re)?_curry1$1(function(ne){return X(J,te,ne)}):X(J,te,re)}}}var reduce$1=_curry3$1(_reduce);function _checkForMethod(X,W){return function(){var J=arguments.length;if(J===0)return W();var te=arguments[J-1];return _isArray$1(te)||typeof te[X]!="function"?W.apply(this,arguments):te[X].apply(te,Array.prototype.slice.call(arguments,0,J-1))}}var slice=_curry3$1(_checkForMethod("slice",function(W,J,te){return Array.prototype.slice.call(te,W,J)})),tail=_curry1$1(_checkForMethod("tail",slice(1,1/0)));function pipe(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return _arity$1(arguments[0].length,reduce$1(_pipe,arguments[0],tail(arguments)))}let c$q=class{constructor(W){this.targetRegion=W}async attach(){const W=this.targetRegion.regionManager.getRegisteredViews(this.targetRegion.name);return pipe(map$1(J=>this.targetRegion.addView(J.key,J.view)),bind$2(Promise.all,Promise),andThen(o$Y))(W)}detach(){return Promise.resolve()}},s$z=class{constructor(){this.registry=[]}get behaviors(){return[...this.registry]}register(W){this.behaviors.some(J=>J===W)||this.registry.push(W)}};const e$U=new s$z;e$U.register(c$q);const a$t=e$U;let l$z=class{constructor(W){this.host=W}get behaviors(){return a$t.behaviors.map(W=>new W(this.host.uxlRegion))}activateView(W){return this.host.contains(W)||this.addViewToHost(W),W.hidden=!1,Promise.resolve(void 0)}deactivateView(W){return W.view&&W.view.removeFromDomWhenDeactivated?this.removeViewFromHost(W):W.hidden=!0,Promise.resolve(null)}removeView(W){this.removeViewFromHost(W)}viewAdded(W){}addViewToHost(W){this.host.appendChild(W)}removeViewFromHost(W){this.host.removeChild(W),this.host.uxlRegion.viewRemovedFromDom(W.view)}};const e$T=(X,W)=>!X.sortHint&&!W.sortHint||!W.sortHint?-1:X.sortHint?X.sortHint.localeCompare(W.sortHint):1;let s$y=class extends l$z{async viewAdded(W){await this.host.uxlRegion.activate(W)}addViewToHost(W){const J=this.host.uxlRegion.currentActiveViews.sort(e$T).indexOf(W.view);J>=this.host.children.length?super.addViewToHost(W):this.host.insertBefore(W,this.host.children[J])}};const f$q=(X,W)=>new s$y(W);let o$X=class extends l$z{async activateView(W){const J=this.host.uxlRegion.currentActiveViews.filter(te=>te!==W.view);for(const te of J)await this.host.uxlRegion.deactivate(te);return super.activateView(W)}async deactivateView(W){await super.deactivateView(W);const J=this.host.uxlRegion.currentViews.find(te=>te.isDefault);J&&W.view!=J&&this.host.uxlRegion.currentActiveViews.length==0&&await this.host.uxlRegion.activate(J)}async viewAdded(W){!this.host.uxlRegion.currentActiveViews.length&&W.isDefault&&await this.host.uxlRegion.activate(W)}},o$W=class extends o$X{constructor(W){super(W),this.attrForSelected="name",this.attrForSelectedProperty="attrForSelected",this.selectedProperty="selected",W[this.attrForSelectedProperty]=this.attrForSelected}async activateView(W){await super.activateView(W),W[this.attrForSelected]||(W[this.attrForSelected]=W.viewKey),this.host[this.selectedProperty]=W.viewKey}async deactivateView(W){this.host[this.selectedProperty]===W.viewKey&&(this.host[this.selectedProperty]=null,await super.deactivateView(W))}};const d$u=(X,W)=>new o$W(W),a$s=(X,W)=>{if(X=typeof X=="function"?X():X,!X)throw new Error(W)},o$V=X=>typeof HTMLElement=="object"?X instanceof HTMLElement:X&&typeof X=="object"&&X!=null&&X.nodeType===1&&typeof X.nodeName=="string",f$p=X=>{if(!X.htmlTag&&!X.element&&!X.factory)throw new Error("One of properties htmlTag, factory or element must be set");return X.htmlTag&&a$s(typeof X.htmlTag=="string","htmlTag property must be an string"),X.factory&&a$s(typeof X.factory=="function","factory property must be a function"),X.element&&a$s(o$V(X.element),"element property must be an HTMLElement"),!0},f$o=async(X,W,J)=>{let te;return X.element?te=X.element:X.factory?te=await X.factory():X.htmlTag&&(X.htmlUrl&&await import(X.htmlUrl),te=window.document.createElement(X.htmlTag)),te.view=X,te.region=W,te.viewKey=J,te};let y$k=class{constructor(W,J,te,re,ne){this.name=W,this.regionManager=J,this.host=te,this.adapter=re,this.definition=ne,this.views={},this.activeViews=[],this.components=new WeakMap,this.host.uxlRegion=this}async addView(W,J){return f$p(J),a$s(typeof this.getView(W)>"u",`Already exists a view with key ${W}`),this.views[W]=J,await this.adapter.viewAdded(J),this}async removeView(W){await this.deactivate(W),this.remove(W),delete this.views[W]}async removeViews(){Object.keys(this.views).forEach(W=>this.removeView(W))}get context(){return this._context}set context(W){this._context=W,Object.keys(this.views).forEach(J=>{const te=this.views[J];if(this.components.has(te)){const re=this.components.get(te);re&&(re.regionContext=this._context)}})}async activate(W){let J=W;if(typeof W=="string"?(J=this.getView(W),a$s(J,`Region does not contain a view with key ${W}`)):a$s(Object.keys(this.views).some(te=>typeof this.views[te]<"u"),"Region does not contain this view"),!this.activeViews.some(te=>te===J)){if(!this.components.has(J)){const re=await f$o(J,this,typeof W=="string"?W:this.getKey(J));re.regionContext=this.context,this.components.set(J,re)}const te=this.components.get(J);this.activeViews.push(J),te.active=!0,await this.adapter.activateView(te)}return this}viewRemovedFromDom(W){this.components.delete(W)}remove(W){const J=typeof W=="string"?this.getView(W):W,te=this.components.get(J);te&&this.adapter.removeView(te)}async deactivate(W){const J=typeof W=="string"?this.getView(W):W,te=this.activeViews.indexOf(J);te!==-1&&this.activeViews.splice(te,1);const re=this.components.get(J);re&&(re.active=!1,await this.adapter.deactivateView(re))}getView(W){return this.views[W]}get currentViews(){return Object.keys(this.views).map(W=>this.views[W])}get currentActiveViews(){return[...this.activeViews]}getKey(W){return Object.keys(this.views).find(J=>this.views[J]==W)}containsView(W){return typeof W=="string"?this.getView(W)!==void 0:Object.keys(this.views).some(J=>this.views[J]==W)}isViewActive(W){if(this.containsView(W)){const J=typeof W=="string"?this.getView(W):W;return this.activeViews.indexOf(J)!==-1}throw new Error(`region ${this.name} doest not contain this view`)}async toggleViewActive(W){if(this.containsView(W))return this.isViewActive(W)?(await this.deactivate(W),!1):(await this.activate(W),!0);throw new Error(`region ${this.name} doest not contain this view`)}};const e$S="default",r$M="dynamic";let y$j=class{constructor(){this.adapterRegistry=new Map,this.adapterRegistry.set(r$M,[])}registerAdapterFactory(W,J){this.adapterRegistry.set(W,J)}get dynamicFactories(){return this.adapterRegistry.get(r$M)}registerDynamicAdapterFactory(W){this.dynamicFactories.indexOf(W)===-1&&this.dynamicFactories.push(W)}getDynamicFactory(W){return this.dynamicFactories.reduce((J,te)=>J||te(W),null)}getAdapterFactory(W){return this.getDynamicFactory(W)||(this.adapterRegistry.has(W.constructor)?this.adapterRegistry.get(W.constructor):this.adapterRegistry.has(W.localName)?this.adapterRegistry.get(W.localName):this.adapterRegistry.has(W.tagName)?this.adapterRegistry.get(W.tagName):this.adapterRegistry.has(e$S)?this.adapterRegistry.get(e$S):null)}registerDefaultAdapterFactory(W){this.adapterRegistry.set(e$S,W)}};const p$h=new y$j,o$U="__uxl_regions__",s$x=X=>(W,J)=>{W.constructor[o$U]={...W.constructor[o$U],[J]:X}},p$g=(X,W,J)=>{const te=J.getAdapterFactory(W);return a$s(typeof te=="function","No region adapter factory found for the host"),te(X,W)},h$v=async(X,W,J,te)=>{await W._updatePromise;const re=W.shadowRoot.querySelector(`#${X.targetId}`);if(re){const ne=X.adapterFactory?X.adapterFactory(X,re):p$g(X,re,te);a$s(ne,"No region adapter found for the host");const oe=X.scoped?J.createRegionManager():J,de=new y$k(X.name,oe,re,ne,X);return oe.add(X.name,de),de}else console.warn(`region host with id ${X.targetId} not found for region named ${X.name}`)};/*
|
|
30
|
+
*/const o$Y=()=>{};function _isPlaceholder(X){return X!=null&&typeof X=="object"&&X["@@functional/placeholder"]===!0}function _curry1(X){return function W(J){return arguments.length===0||_isPlaceholder(J)?W:X.apply(this,arguments)}}function _curry2(X){return function W(J,te){switch(arguments.length){case 0:return W;case 1:return _isPlaceholder(J)?W:_curry1(function(re){return X(J,re)});default:return _isPlaceholder(J)&&_isPlaceholder(te)?W:_isPlaceholder(J)?_curry1(function(re){return X(re,te)}):_isPlaceholder(te)?_curry1(function(re){return X(J,re)}):X(J,te)}}}function _isFunction(X){var W=Object.prototype.toString.call(X);return W==="[object Function]"||W==="[object AsyncFunction]"||W==="[object GeneratorFunction]"||W==="[object AsyncGeneratorFunction]"}function _arrayFromIterator(X){for(var W=[],J;!(J=X.next()).done;)W.push(J.value);return W}function _includesWith(X,W,J){for(var te=0,re=J.length;te<re;){if(X(W,J[te]))return!0;te+=1}return!1}function _functionName(X){var W=String(X).match(/^function (\w*)/);return W==null?"":W[1]}function _has(X,W){return Object.prototype.hasOwnProperty.call(W,X)}function _objectIs(X,W){return X===W?X!==0||1/X===1/W:X!==X&&W!==W}const _objectIs$1=typeof Object.is=="function"?Object.is:_objectIs;var toString$1=Object.prototype.toString,_isArguments=function(){return toString$1.call(arguments)==="[object Arguments]"?function(W){return toString$1.call(W)==="[object Arguments]"}:function(W){return _has("callee",W)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains$1=function(W,J){for(var te=0;te<W.length;){if(W[te]===J)return!0;te+=1}return!1},keys=_curry1(typeof Object.keys=="function"&&!hasArgsEnumBug?function(W){return Object(W)!==W?[]:Object.keys(W)}:function(W){if(Object(W)!==W)return[];var J,te,re=[],ne=hasArgsEnumBug&&_isArguments(W);for(J in W)_has(J,W)&&(!ne||J!=="length")&&(re[re.length]=J);if(hasEnumBug)for(te=nonEnumerableProps.length-1;te>=0;)J=nonEnumerableProps[te],_has(J,W)&&!contains$1(re,J)&&(re[re.length]=J),te-=1;return re}),type=_curry1(function(W){return W===null?"Null":W===void 0?"Undefined":Object.prototype.toString.call(W).slice(8,-1)});function _uniqContentEquals(X,W,J,te){var re=_arrayFromIterator(X),ne=_arrayFromIterator(W);function oe(de,ue){return _equals(de,ue,J.slice(),te.slice())}return!_includesWith(function(de,ue){return!_includesWith(oe,ue,de)},ne,re)}function _equals(X,W,J,te){if(_objectIs$1(X,W))return!0;var re=type(X);if(re!==type(W)||X==null||W==null)return!1;if(typeof X["fantasy-land/equals"]=="function"||typeof W["fantasy-land/equals"]=="function")return typeof X["fantasy-land/equals"]=="function"&&X["fantasy-land/equals"](W)&&typeof W["fantasy-land/equals"]=="function"&&W["fantasy-land/equals"](X);if(typeof X.equals=="function"||typeof W.equals=="function")return typeof X.equals=="function"&&X.equals(W)&&typeof W.equals=="function"&&W.equals(X);switch(re){case"Arguments":case"Array":case"Object":if(typeof X.constructor=="function"&&_functionName(X.constructor)==="Promise")return X===W;break;case"Boolean":case"Number":case"String":if(!(typeof X==typeof W&&_objectIs$1(X.valueOf(),W.valueOf())))return!1;break;case"Date":if(!_objectIs$1(X.valueOf(),W.valueOf()))return!1;break;case"Error":return X.name===W.name&&X.message===W.message;case"RegExp":if(!(X.source===W.source&&X.global===W.global&&X.ignoreCase===W.ignoreCase&&X.multiline===W.multiline&&X.sticky===W.sticky&&X.unicode===W.unicode))return!1;break}for(var ne=J.length-1;ne>=0;){if(J[ne]===X)return te[ne]===W;ne-=1}switch(re){case"Map":return X.size!==W.size?!1:_uniqContentEquals(X.entries(),W.entries(),J.concat([X]),te.concat([W]));case"Set":return X.size!==W.size?!1:_uniqContentEquals(X.values(),W.values(),J.concat([X]),te.concat([W]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var oe=keys(X);if(oe.length!==keys(W).length)return!1;var de=J.concat([X]),ue=te.concat([W]);for(ne=oe.length-1;ne>=0;){var ce=oe[ne];if(!(_has(ce,W)&&_equals(W[ce],X[ce],de,ue)))return!1;ne-=1}return!0}var equals=_curry2(function(W,J){return _equals(W,J,[],[])});function _indexOf(X,W,J){var te,re;if(typeof X.indexOf=="function")switch(typeof W){case"number":if(W===0){for(te=1/W;J<X.length;){if(re=X[J],re===0&&1/re===te)return J;J+=1}return-1}else if(W!==W){for(;J<X.length;){if(re=X[J],typeof re=="number"&&re!==re)return J;J+=1}return-1}return X.indexOf(W,J);case"string":case"boolean":case"function":case"undefined":return X.indexOf(W,J);case"object":if(W===null)return X.indexOf(W,J)}for(;J<X.length;){if(equals(X[J],W))return J;J+=1}return-1}function _includes(X,W){return _indexOf(W,X,0)>=0}function _map(X,W){for(var J=0,te=W.length,re=Array(te);J<te;)re[J]=X(W[J]),J+=1;return re}function _quote(X){var W=X.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+W.replace(/"/g,'\\"')+'"'}var pad=function(W){return(W<10?"0":"")+W},_toISOString=typeof Date.prototype.toISOString=="function"?function(W){return W.toISOString()}:function(W){return W.getUTCFullYear()+"-"+pad(W.getUTCMonth()+1)+"-"+pad(W.getUTCDate())+"T"+pad(W.getUTCHours())+":"+pad(W.getUTCMinutes())+":"+pad(W.getUTCSeconds())+"."+(W.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function _complement(X){return function(){return!X.apply(this,arguments)}}const _isArray=Array.isArray||function(W){return W!=null&&W.length>=0&&Object.prototype.toString.call(W)==="[object Array]"};function _isTransformer(X){return X!=null&&typeof X["@@transducer/step"]=="function"}function _dispatchable(X,W,J){return function(){if(arguments.length===0)return J();var te=Array.prototype.slice.call(arguments,0),re=te.pop();if(!_isArray(re)){for(var ne=0;ne<X.length;){if(typeof re[X[ne]]=="function")return re[X[ne]].apply(re,te);ne+=1}if(_isTransformer(re)){var oe=W.apply(null,te);return oe(re)}}return J.apply(this,arguments)}}function _filter(X,W){for(var J=0,te=W.length,re=[];J<te;)X(W[J])&&(re[re.length]=W[J]),J+=1;return re}function _isObject(X){return Object.prototype.toString.call(X)==="[object Object]"}function _isString(X){return Object.prototype.toString.call(X)==="[object String]"}var _isArrayLike=_curry1(function(W){return _isArray(W)?!0:!W||typeof W!="object"||_isString(W)?!1:W.nodeType===1?!!W.length:W.length===0?!0:W.length>0?W.hasOwnProperty(0)&&W.hasOwnProperty(W.length-1):!1}),XWrap=function(){function X(W){this.f=W}return X.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},X.prototype["@@transducer/result"]=function(W){return W},X.prototype["@@transducer/step"]=function(W,J){return this.f(W,J)},X}();function _xwrap(X){return new XWrap(X)}function _arity(X,W){switch(X){case 0:return function(){return W.apply(this,arguments)};case 1:return function(J){return W.apply(this,arguments)};case 2:return function(J,te){return W.apply(this,arguments)};case 3:return function(J,te,re){return W.apply(this,arguments)};case 4:return function(J,te,re,ne){return W.apply(this,arguments)};case 5:return function(J,te,re,ne,oe){return W.apply(this,arguments)};case 6:return function(J,te,re,ne,oe,de){return W.apply(this,arguments)};case 7:return function(J,te,re,ne,oe,de,ue){return W.apply(this,arguments)};case 8:return function(J,te,re,ne,oe,de,ue,ce){return W.apply(this,arguments)};case 9:return function(J,te,re,ne,oe,de,ue,ce,he){return W.apply(this,arguments)};case 10:return function(J,te,re,ne,oe,de,ue,ce,he,pe){return W.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}var bind$1=_curry2(function(W,J){return _arity(W.length,function(){return W.apply(J,arguments)})});function _arrayReduce(X,W,J){for(var te=0,re=J.length;te<re;){if(W=X["@@transducer/step"](W,J[te]),W&&W["@@transducer/reduced"]){W=W["@@transducer/value"];break}te+=1}return X["@@transducer/result"](W)}function _iterableReduce(X,W,J){for(var te=J.next();!te.done;){if(W=X["@@transducer/step"](W,te.value),W&&W["@@transducer/reduced"]){W=W["@@transducer/value"];break}te=J.next()}return X["@@transducer/result"](W)}function _methodReduce(X,W,J,te){return X["@@transducer/result"](J[te](bind$1(X["@@transducer/step"],X),W))}var symIterator=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _reduce(X,W,J){if(typeof X=="function"&&(X=_xwrap(X)),_isArrayLike(J))return _arrayReduce(X,W,J);if(typeof J["fantasy-land/reduce"]=="function")return _methodReduce(X,W,J,"fantasy-land/reduce");if(J[symIterator]!=null)return _iterableReduce(X,W,J[symIterator]());if(typeof J.next=="function")return _iterableReduce(X,W,J);if(typeof J.reduce=="function")return _methodReduce(X,W,J,"reduce");throw new TypeError("reduce: list must be array or iterable")}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(X){return this.xf["@@transducer/result"](X)}};var XFilter=function(){function X(W,J){this.xf=J,this.f=W}return X.prototype["@@transducer/init"]=_xfBase.init,X.prototype["@@transducer/result"]=_xfBase.result,X.prototype["@@transducer/step"]=function(W,J){return this.f(J)?this.xf["@@transducer/step"](W,J):W},X}(),_xfilter=_curry2(function(W,J){return new XFilter(W,J)}),filter=_curry2(_dispatchable(["filter"],_xfilter,function(X,W){return _isObject(W)?_reduce(function(J,te){return X(W[te])&&(J[te]=W[te]),J},{},keys(W)):_filter(X,W)})),reject=_curry2(function(W,J){return filter(_complement(W),J)});function _toString(X,W){var J=function(oe){var de=W.concat([X]);return _includes(oe,de)?"<Circular>":_toString(oe,de)},te=function(ne,oe){return _map(function(de){return _quote(de)+": "+J(ne[de])},oe.slice().sort())};switch(Object.prototype.toString.call(X)){case"[object Arguments]":return"(function() { return arguments; }("+_map(J,X).join(", ")+"))";case"[object Array]":return"["+_map(J,X).concat(te(X,reject(function(ne){return/^\d+$/.test(ne)},keys(X)))).join(", ")+"]";case"[object Boolean]":return typeof X=="object"?"new Boolean("+J(X.valueOf())+")":X.toString();case"[object Date]":return"new Date("+(isNaN(X.valueOf())?J(NaN):_quote(_toISOString(X)))+")";case"[object Null]":return"null";case"[object Number]":return typeof X=="object"?"new Number("+J(X.valueOf())+")":1/X===-1/0?"-0":X.toString(10);case"[object String]":return typeof X=="object"?"new String("+J(X.valueOf())+")":_quote(X);case"[object Undefined]":return"undefined";default:if(typeof X.toString=="function"){var re=X.toString();if(re!=="[object Object]")return re}return"{"+te(X,keys(X)).join(", ")+"}"}}function _assertPromise(X,W){if(W==null||!_isFunction(W.then))throw new TypeError("`"+X+"` expected a Promise, received "+_toString(W,[]))}var andThen=_curry2(function(W,J){return _assertPromise("andThen",J),J.then(W)}),XMap=function(){function X(W,J){this.xf=J,this.f=W}return X.prototype["@@transducer/init"]=_xfBase.init,X.prototype["@@transducer/result"]=_xfBase.result,X.prototype["@@transducer/step"]=function(W,J){return this.xf["@@transducer/step"](W,this.f(J))},X}(),_xmap=_curry2(function(W,J){return new XMap(W,J)});function _curryN(X,W,J){return function(){for(var te=[],re=0,ne=X,oe=0;oe<W.length||re<arguments.length;){var de;oe<W.length&&(!_isPlaceholder(W[oe])||re>=arguments.length)?de=W[oe]:(de=arguments[re],re+=1),te[oe]=de,_isPlaceholder(de)||(ne-=1),oe+=1}return ne<=0?J.apply(this,te):_arity(ne,_curryN(X,te,J))}}var curryN=_curry2(function(W,J){return W===1?_curry1(J):_arity(W,_curryN(W,[],J))}),map=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,function(W,J){switch(Object.prototype.toString.call(J)){case"[object Function]":return curryN(J.length,function(){return W.call(this,J.apply(this,arguments))});case"[object Object]":return _reduce(function(te,re){return te[re]=W(J[re]),te},{},keys(J));default:return _map(W,J)}}));function _pipe(X,W){return function(){return W.call(this,X.apply(this,arguments))}}function _curry3(X){return function W(J,te,re){switch(arguments.length){case 0:return W;case 1:return _isPlaceholder(J)?W:_curry2(function(ne,oe){return X(J,ne,oe)});case 2:return _isPlaceholder(J)&&_isPlaceholder(te)?W:_isPlaceholder(J)?_curry2(function(ne,oe){return X(ne,te,oe)}):_isPlaceholder(te)?_curry2(function(ne,oe){return X(J,ne,oe)}):_curry1(function(ne){return X(J,te,ne)});default:return _isPlaceholder(J)&&_isPlaceholder(te)&&_isPlaceholder(re)?W:_isPlaceholder(J)&&_isPlaceholder(te)?_curry2(function(ne,oe){return X(ne,oe,re)}):_isPlaceholder(J)&&_isPlaceholder(re)?_curry2(function(ne,oe){return X(ne,te,oe)}):_isPlaceholder(te)&&_isPlaceholder(re)?_curry2(function(ne,oe){return X(J,ne,oe)}):_isPlaceholder(J)?_curry1(function(ne){return X(ne,te,re)}):_isPlaceholder(te)?_curry1(function(ne){return X(J,ne,re)}):_isPlaceholder(re)?_curry1(function(ne){return X(J,te,ne)}):X(J,te,re)}}}var reduce=_curry3(_reduce);function _checkForMethod(X,W){return function(){var J=arguments.length;if(J===0)return W();var te=arguments[J-1];return _isArray(te)||typeof te[X]!="function"?W.apply(this,arguments):te[X].apply(te,Array.prototype.slice.call(arguments,0,J-1))}}var slice=_curry3(_checkForMethod("slice",function(W,J,te){return Array.prototype.slice.call(te,W,J)})),tail=_curry1(_checkForMethod("tail",slice(1,1/0)));function pipe(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return _arity(arguments[0].length,reduce(_pipe,arguments[0],tail(arguments)))}let c$q=class{constructor(W){this.targetRegion=W}async attach(){const W=this.targetRegion.regionManager.getRegisteredViews(this.targetRegion.name);return pipe(map(J=>this.targetRegion.addView(J.key,J.view)),bind$1(Promise.all,Promise),andThen(o$Y))(W)}detach(){return Promise.resolve()}},s$z=class{constructor(){this.registry=[]}get behaviors(){return[...this.registry]}register(W){this.behaviors.some(J=>J===W)||this.registry.push(W)}};const e$U=new s$z;e$U.register(c$q);const a$t=e$U;let l$z=class{constructor(W){this.host=W}get behaviors(){return a$t.behaviors.map(W=>new W(this.host.uxlRegion))}activateView(W){return this.host.contains(W)||this.addViewToHost(W),W.hidden=!1,Promise.resolve(void 0)}deactivateView(W){return W.view&&W.view.removeFromDomWhenDeactivated?this.removeViewFromHost(W):W.hidden=!0,Promise.resolve(null)}removeView(W){this.removeViewFromHost(W)}viewAdded(W){}addViewToHost(W){this.host.appendChild(W)}removeViewFromHost(W){this.host.removeChild(W),this.host.uxlRegion.viewRemovedFromDom(W.view)}};const e$T=(X,W)=>!X.sortHint&&!W.sortHint||!W.sortHint?-1:X.sortHint?X.sortHint.localeCompare(W.sortHint):1;let s$y=class extends l$z{async viewAdded(W){await this.host.uxlRegion.activate(W)}addViewToHost(W){const J=this.host.uxlRegion.currentActiveViews.sort(e$T).indexOf(W.view);J>=this.host.children.length?super.addViewToHost(W):this.host.insertBefore(W,this.host.children[J])}};const f$q=(X,W)=>new s$y(W);let o$X=class extends l$z{async activateView(W){const J=this.host.uxlRegion.currentActiveViews.filter(te=>te!==W.view);for(const te of J)await this.host.uxlRegion.deactivate(te);return super.activateView(W)}async deactivateView(W){await super.deactivateView(W);const J=this.host.uxlRegion.currentViews.find(te=>te.isDefault);J&&W.view!=J&&this.host.uxlRegion.currentActiveViews.length==0&&await this.host.uxlRegion.activate(J)}async viewAdded(W){!this.host.uxlRegion.currentActiveViews.length&&W.isDefault&&await this.host.uxlRegion.activate(W)}},o$W=class extends o$X{constructor(W){super(W),this.attrForSelected="name",this.attrForSelectedProperty="attrForSelected",this.selectedProperty="selected",W[this.attrForSelectedProperty]=this.attrForSelected}async activateView(W){await super.activateView(W),W[this.attrForSelected]||(W[this.attrForSelected]=W.viewKey),this.host[this.selectedProperty]=W.viewKey}async deactivateView(W){this.host[this.selectedProperty]===W.viewKey&&(this.host[this.selectedProperty]=null,await super.deactivateView(W))}};const d$u=(X,W)=>new o$W(W),a$s=(X,W)=>{if(X=typeof X=="function"?X():X,!X)throw new Error(W)},o$V=X=>typeof HTMLElement=="object"?X instanceof HTMLElement:X&&typeof X=="object"&&X!=null&&X.nodeType===1&&typeof X.nodeName=="string",f$p=X=>{if(!X.htmlTag&&!X.element&&!X.factory)throw new Error("One of properties htmlTag, factory or element must be set");return X.htmlTag&&a$s(typeof X.htmlTag=="string","htmlTag property must be an string"),X.factory&&a$s(typeof X.factory=="function","factory property must be a function"),X.element&&a$s(o$V(X.element),"element property must be an HTMLElement"),!0},f$o=async(X,W,J)=>{let te;return X.element?te=X.element:X.factory?te=await X.factory():X.htmlTag&&(X.htmlUrl&&await import(X.htmlUrl),te=window.document.createElement(X.htmlTag)),te.view=X,te.region=W,te.viewKey=J,te};let y$k=class{constructor(W,J,te,re,ne){this.name=W,this.regionManager=J,this.host=te,this.adapter=re,this.definition=ne,this.views={},this.activeViews=[],this.components=new WeakMap,this.host.uxlRegion=this}async addView(W,J){return f$p(J),a$s(typeof this.getView(W)>"u",`Already exists a view with key ${W}`),this.views[W]=J,await this.adapter.viewAdded(J),this}async removeView(W){await this.deactivate(W),this.remove(W),delete this.views[W]}async removeViews(){Object.keys(this.views).forEach(W=>this.removeView(W))}get context(){return this._context}set context(W){this._context=W,Object.keys(this.views).forEach(J=>{const te=this.views[J];if(this.components.has(te)){const re=this.components.get(te);re&&(re.regionContext=this._context)}})}async activate(W){let J=W;if(typeof W=="string"?(J=this.getView(W),a$s(J,`Region does not contain a view with key ${W}`)):a$s(Object.keys(this.views).some(te=>typeof this.views[te]<"u"),"Region does not contain this view"),!this.activeViews.some(te=>te===J)){if(!this.components.has(J)){const re=await f$o(J,this,typeof W=="string"?W:this.getKey(J));re.regionContext=this.context,this.components.set(J,re)}const te=this.components.get(J);this.activeViews.push(J),te.active=!0,await this.adapter.activateView(te)}return this}viewRemovedFromDom(W){this.components.delete(W)}remove(W){const J=typeof W=="string"?this.getView(W):W,te=this.components.get(J);te&&this.adapter.removeView(te)}async deactivate(W){const J=typeof W=="string"?this.getView(W):W,te=this.activeViews.indexOf(J);te!==-1&&this.activeViews.splice(te,1);const re=this.components.get(J);re&&(re.active=!1,await this.adapter.deactivateView(re))}getView(W){return this.views[W]}get currentViews(){return Object.keys(this.views).map(W=>this.views[W])}get currentActiveViews(){return[...this.activeViews]}getKey(W){return Object.keys(this.views).find(J=>this.views[J]==W)}containsView(W){return typeof W=="string"?this.getView(W)!==void 0:Object.keys(this.views).some(J=>this.views[J]==W)}isViewActive(W){if(this.containsView(W)){const J=typeof W=="string"?this.getView(W):W;return this.activeViews.indexOf(J)!==-1}throw new Error(`region ${this.name} doest not contain this view`)}async toggleViewActive(W){if(this.containsView(W))return this.isViewActive(W)?(await this.deactivate(W),!1):(await this.activate(W),!0);throw new Error(`region ${this.name} doest not contain this view`)}};const e$S="default",r$M="dynamic";let y$j=class{constructor(){this.adapterRegistry=new Map,this.adapterRegistry.set(r$M,[])}registerAdapterFactory(W,J){this.adapterRegistry.set(W,J)}get dynamicFactories(){return this.adapterRegistry.get(r$M)}registerDynamicAdapterFactory(W){this.dynamicFactories.indexOf(W)===-1&&this.dynamicFactories.push(W)}getDynamicFactory(W){return this.dynamicFactories.reduce((J,te)=>J||te(W),null)}getAdapterFactory(W){return this.getDynamicFactory(W)||(this.adapterRegistry.has(W.constructor)?this.adapterRegistry.get(W.constructor):this.adapterRegistry.has(W.localName)?this.adapterRegistry.get(W.localName):this.adapterRegistry.has(W.tagName)?this.adapterRegistry.get(W.tagName):this.adapterRegistry.has(e$S)?this.adapterRegistry.get(e$S):null)}registerDefaultAdapterFactory(W){this.adapterRegistry.set(e$S,W)}};const p$h=new y$j,o$U="__uxl_regions__",s$x=X=>(W,J)=>{W.constructor[o$U]={...W.constructor[o$U],[J]:X}},p$g=(X,W,J)=>{const te=J.getAdapterFactory(W);return a$s(typeof te=="function","No region adapter factory found for the host"),te(X,W)},h$v=async(X,W,J,te)=>{await W._updatePromise;const re=W.shadowRoot.querySelector(`#${X.targetId}`);if(re){const ne=X.adapterFactory?X.adapterFactory(X,re):p$g(X,re,te);a$s(ne,"No region adapter found for the host");const oe=X.scoped?J.createRegionManager():J,de=new y$k(X.name,oe,re,ne,X);return oe.add(X.name,de),de}else console.warn(`region host with id ${X.targetId} not found for region named ${X.name}`)};/*
|
|
31
31
|
* @license
|
|
32
32
|
* BSD License
|
|
33
33
|
*
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
58
|
*/var t$k;const i$D=window,s$u=i$D.trustedTypes,e$P=s$u?s$u.createPolicy("lit-html",{createHTML:X=>X}):void 0,o$R="$lit$",n$D=`lit$${(Math.random()+"").slice(9)}$`,l$x="?"+n$D,h$t=`<${l$x}>`,r$I=document,u$u=()=>r$I.createComment(""),d$r=X=>X===null||typeof X!="object"&&typeof X!="function",c$o=Array.isArray,v$g=X=>c$o(X)||typeof(X==null?void 0:X[Symbol.iterator])=="function",a$q=`[
|
|
59
59
|
\f\r]`,f$n=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$j=/-->/g,m$f=/>/g,p$f=RegExp(`>|${a$q}(?:([^\\s"'>=/]+)(${a$q}*=${a$q}*(?:[^
|
|
60
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),g$n=/'/g,$$a=/"/g,y$i=/^(?:script|style|textarea|title)$/i,T$
|
|
60
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),g$n=/'/g,$$a=/"/g,y$i=/^(?:script|style|textarea|title)$/i,T$3=Symbol.for("lit-noChange"),A$1=Symbol.for("lit-nothing"),E$5=new WeakMap,C$b=r$I.createTreeWalker(r$I,129,null,!1);function P$2(X,W){if(!Array.isArray(X)||!X.hasOwnProperty("raw"))throw Error("invalid template strings array");return e$P!==void 0?e$P.createHTML(W):W}const V$4=(X,W)=>{const J=X.length-1,te=[];let re,ne=W===2?"<svg>":"",oe=f$n;for(let de=0;de<J;de++){const ue=X[de];let ce,he,pe=-1,fe=0;for(;fe<ue.length&&(oe.lastIndex=fe,he=oe.exec(ue),he!==null);)fe=oe.lastIndex,oe===f$n?he[1]==="!--"?oe=_$j:he[1]!==void 0?oe=m$f:he[2]!==void 0?(y$i.test(he[2])&&(re=RegExp("</"+he[2],"g")),oe=p$f):he[3]!==void 0&&(oe=p$f):oe===p$f?he[0]===">"?(oe=re??f$n,pe=-1):he[1]===void 0?pe=-2:(pe=oe.lastIndex-he[2].length,ce=he[1],oe=he[3]===void 0?p$f:he[3]==='"'?$$a:g$n):oe===$$a||oe===g$n?oe=p$f:oe===_$j||oe===m$f?oe=f$n:(oe=p$f,re=void 0);const ge=oe===p$f&&X[de+1].startsWith("/>")?" ":"";ne+=oe===f$n?ue+h$t:pe>=0?(te.push(ce),ue.slice(0,pe)+o$R+ue.slice(pe)+n$D+ge):ue+n$D+(pe===-2?(te.push(void 0),de):ge)}return[P$2(X,ne+(X[J]||"<?>")+(W===2?"</svg>":"")),te]};let N$3=class Tr{constructor({strings:W,_$litType$:J},te){let re;this.parts=[];let ne=0,oe=0;const de=W.length-1,ue=this.parts,[ce,he]=V$4(W,J);if(this.el=Tr.createElement(ce,te),C$b.currentNode=this.el.content,J===2){const pe=this.el.content,fe=pe.firstChild;fe.remove(),pe.append(...fe.childNodes)}for(;(re=C$b.nextNode())!==null&&ue.length<de;){if(re.nodeType===1){if(re.hasAttributes()){const pe=[];for(const fe of re.getAttributeNames())if(fe.endsWith(o$R)||fe.startsWith(n$D)){const ge=he[oe++];if(pe.push(fe),ge!==void 0){const be=re.getAttribute(ge.toLowerCase()+o$R).split(n$D),me=/([.?@])?(.*)/.exec(ge);ue.push({type:1,index:ne,name:me[2],strings:be,ctor:me[1]==="."?H$1:me[1]==="?"?L$5:me[1]==="@"?z$4:k$6})}else ue.push({type:6,index:ne})}for(const fe of pe)re.removeAttribute(fe)}if(y$i.test(re.tagName)){const pe=re.textContent.split(n$D),fe=pe.length-1;if(fe>0){re.textContent=s$u?s$u.emptyScript:"";for(let ge=0;ge<fe;ge++)re.append(pe[ge],u$u()),C$b.nextNode(),ue.push({type:2,index:++ne});re.append(pe[fe],u$u())}}}else if(re.nodeType===8)if(re.data===l$x)ue.push({type:2,index:ne});else{let pe=-1;for(;(pe=re.data.indexOf(n$D,pe+1))!==-1;)ue.push({type:7,index:ne}),pe+=n$D.length-1}ne++}}static createElement(W,J){const te=r$I.createElement("template");return te.innerHTML=W,te}};function S$e(X,W,J=X,te){var re,ne,oe,de;if(W===T$3)return W;let ue=te!==void 0?(re=J._$Co)===null||re===void 0?void 0:re[te]:J._$Cl;const ce=d$r(W)?void 0:W._$litDirective$;return(ue==null?void 0:ue.constructor)!==ce&&((ne=ue==null?void 0:ue._$AO)===null||ne===void 0||ne.call(ue,!1),ce===void 0?ue=void 0:(ue=new ce(X),ue._$AT(X,J,te)),te!==void 0?((oe=(de=J)._$Co)!==null&&oe!==void 0?oe:de._$Co=[])[te]=ue:J._$Cl=ue),ue!==void 0&&(W=S$e(X,ue._$AS(X,W.values),ue,te)),W}let M$4=class{constructor(W,J){this._$AV=[],this._$AN=void 0,this._$AD=W,this._$AM=J}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(W){var J;const{el:{content:te},parts:re}=this._$AD,ne=((J=W==null?void 0:W.creationScope)!==null&&J!==void 0?J:r$I).importNode(te,!0);C$b.currentNode=ne;let oe=C$b.nextNode(),de=0,ue=0,ce=re[0];for(;ce!==void 0;){if(de===ce.index){let he;ce.type===2?he=new R$1(oe,oe.nextSibling,this,W):ce.type===1?he=new ce.ctor(oe,ce.name,ce.strings,this,W):ce.type===6&&(he=new Z$2(oe,this,W)),this._$AV.push(he),ce=re[++ue]}de!==(ce==null?void 0:ce.index)&&(oe=C$b.nextNode(),de++)}return C$b.currentNode=r$I,ne}v(W){let J=0;for(const te of this._$AV)te!==void 0&&(te.strings!==void 0?(te._$AI(W,te,J),J+=te.strings.length-2):te._$AI(W[J])),J++}},R$1=class Or{constructor(W,J,te,re){var ne;this.type=2,this._$AH=A$1,this._$AN=void 0,this._$AA=W,this._$AB=J,this._$AM=te,this.options=re,this._$Cp=(ne=re==null?void 0:re.isConnected)===null||ne===void 0||ne}get _$AU(){var W,J;return(J=(W=this._$AM)===null||W===void 0?void 0:W._$AU)!==null&&J!==void 0?J:this._$Cp}get parentNode(){let W=this._$AA.parentNode;const J=this._$AM;return J!==void 0&&(W==null?void 0:W.nodeType)===11&&(W=J.parentNode),W}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(W,J=this){W=S$e(this,W,J),d$r(W)?W===A$1||W==null||W===""?(this._$AH!==A$1&&this._$AR(),this._$AH=A$1):W!==this._$AH&&W!==T$3&&this._(W):W._$litType$!==void 0?this.g(W):W.nodeType!==void 0?this.$(W):v$g(W)?this.T(W):this._(W)}k(W){return this._$AA.parentNode.insertBefore(W,this._$AB)}$(W){this._$AH!==W&&(this._$AR(),this._$AH=this.k(W))}_(W){this._$AH!==A$1&&d$r(this._$AH)?this._$AA.nextSibling.data=W:this.$(r$I.createTextNode(W)),this._$AH=W}g(W){var J;const{values:te,_$litType$:re}=W,ne=typeof re=="number"?this._$AC(W):(re.el===void 0&&(re.el=N$3.createElement(P$2(re.h,re.h[0]),this.options)),re);if(((J=this._$AH)===null||J===void 0?void 0:J._$AD)===ne)this._$AH.v(te);else{const oe=new M$4(ne,this),de=oe.u(this.options);oe.v(te),this.$(de),this._$AH=oe}}_$AC(W){let J=E$5.get(W.strings);return J===void 0&&E$5.set(W.strings,J=new N$3(W)),J}T(W){c$o(this._$AH)||(this._$AH=[],this._$AR());const J=this._$AH;let te,re=0;for(const ne of W)re===J.length?J.push(te=new Or(this.k(u$u()),this.k(u$u()),this,this.options)):te=J[re],te._$AI(ne),re++;re<J.length&&(this._$AR(te&&te._$AB.nextSibling,re),J.length=re)}_$AR(W=this._$AA.nextSibling,J){var te;for((te=this._$AP)===null||te===void 0||te.call(this,!1,!0,J);W&&W!==this._$AB;){const re=W.nextSibling;W.remove(),W=re}}setConnected(W){var J;this._$AM===void 0&&(this._$Cp=W,(J=this._$AP)===null||J===void 0||J.call(this,W))}},k$6=class{constructor(W,J,te,re,ne){this.type=1,this._$AH=A$1,this._$AN=void 0,this.element=W,this.name=J,this._$AM=re,this.options=ne,te.length>2||te[0]!==""||te[1]!==""?(this._$AH=Array(te.length-1).fill(new String),this.strings=te):this._$AH=A$1}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(W,J=this,te,re){const ne=this.strings;let oe=!1;if(ne===void 0)W=S$e(this,W,J,0),oe=!d$r(W)||W!==this._$AH&&W!==T$3,oe&&(this._$AH=W);else{const de=W;let ue,ce;for(W=ne[0],ue=0;ue<ne.length-1;ue++)ce=S$e(this,de[te+ue],J,ue),ce===T$3&&(ce=this._$AH[ue]),oe||(oe=!d$r(ce)||ce!==this._$AH[ue]),ce===A$1?W=A$1:W!==A$1&&(W+=(ce??"")+ne[ue+1]),this._$AH[ue]=ce}oe&&!re&&this.j(W)}j(W){W===A$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,W??"")}},H$1=class extends k$6{constructor(){super(...arguments),this.type=3}j(W){this.element[this.name]=W===A$1?void 0:W}};const I$3=s$u?s$u.emptyScript:"";let L$5=class extends k$6{constructor(){super(...arguments),this.type=4}j(W){W&&W!==A$1?this.element.setAttribute(this.name,I$3):this.element.removeAttribute(this.name)}},z$4=class extends k$6{constructor(W,J,te,re,ne){super(W,J,te,re,ne),this.type=5}_$AI(W,J=this){var te;if((W=(te=S$e(this,W,J,0))!==null&&te!==void 0?te:A$1)===T$3)return;const re=this._$AH,ne=W===A$1&&re!==A$1||W.capture!==re.capture||W.once!==re.once||W.passive!==re.passive,oe=W!==A$1&&(re===A$1||ne);ne&&this.element.removeEventListener(this.name,this,re),oe&&this.element.addEventListener(this.name,this,W),this._$AH=W}handleEvent(W){var J,te;typeof this._$AH=="function"?this._$AH.call((te=(J=this.options)===null||J===void 0?void 0:J.host)!==null&&te!==void 0?te:this.element,W):this._$AH.handleEvent(W)}},Z$2=class{constructor(W,J,te){this.element=W,this.type=6,this._$AN=void 0,this._$AM=J,this.options=te}get _$AU(){return this._$AM._$AU}_$AI(W){S$e(this,W)}};const B$4=i$D.litHtmlPolyfillSupport;B$4==null||B$4(N$3,R$1),((t$k=i$D.litHtmlVersions)!==null&&t$k!==void 0?t$k:i$D.litHtmlVersions=[]).push("2.8.0");const D$2=(X,W,J)=>{var te,re;const ne=(te=J==null?void 0:J.renderBefore)!==null&&te!==void 0?te:W;let oe=ne._$litPart$;if(oe===void 0){const de=(re=J==null?void 0:J.renderBefore)!==null&&re!==void 0?re:null;ne._$litPart$=oe=new R$1(W.insertBefore(u$u(),de),de,void 0,J??{})}return oe._$AI(X),oe};/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
|
-
*/var l$w,o$Q;let s$t=class extends u$v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var W,J;const te=super.createRenderRoot();return(W=(J=this.renderOptions).renderBefore)!==null&&W!==void 0||(J.renderBefore=te.firstChild),te}update(W){const J=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(W),this._$Do=D$2(J,this.renderRoot,this.renderOptions)}connectedCallback(){var W;super.connectedCallback(),(W=this._$Do)===null||W===void 0||W.setConnected(!0)}disconnectedCallback(){var W;super.disconnectedCallback(),(W=this._$Do)===null||W===void 0||W.setConnected(!1)}render(){return T$
|
|
64
|
+
*/var l$w,o$Q;let s$t=class extends u$v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var W,J;const te=super.createRenderRoot();return(W=(J=this.renderOptions).renderBefore)!==null&&W!==void 0||(J.renderBefore=te.firstChild),te}update(W){const J=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(W),this._$Do=D$2(J,this.renderRoot,this.renderOptions)}connectedCallback(){var W;super.connectedCallback(),(W=this._$Do)===null||W===void 0||W.setConnected(!0)}disconnectedCallback(){var W;super.disconnectedCallback(),(W=this._$Do)===null||W===void 0||W.setConnected(!1)}render(){return T$3}};s$t.finalized=!0,s$t._$litElement$=!0,(l$w=globalThis.litElementHydrateSupport)===null||l$w===void 0||l$w.call(globalThis,{LitElement:s$t});const n$C=globalThis.litElementPolyfillSupport;n$C==null||n$C({LitElement:s$t}),((o$Q=globalThis.litElementVersions)!==null&&o$Q!==void 0?o$Q:globalThis.litElementVersions=[]).push("3.3.3");var defaultTo=_curry2(function(W,J){return J==null||J!==J?W:J});const u$t=(X,W)=>W.constructor._classProperties?W.constructor._classProperties.get(X).hasChanged:void 0,a$p=pipe(u$t,defaultTo(a$r)),l$v=d$t(X=>{class W extends X{requestUpdate(te,re){const ne=super.requestUpdate?super.requestUpdate(te,re):Promise.resolve(null);return a$p(te,this)(this[te],re)&&this[`${String(te)}Changed`]&&this[`${String(te)}Changed`](this[te],re),ne}}return W});var T$2=function(){return!0},always=_curry1(function(W){return function(){return W}}),max$1=_curry2(function(W,J){return J>W?J:W}),cond=_curry1(function(W){var J=reduce(max$1,0,map(function(te){return te[0].length},W));return _arity(J,function(){for(var te=0;te<W.length;){if(W[te][0].apply(this,arguments))return W[te][1].apply(this,arguments);te+=1}})}),forEach$1=_curry2(_checkForMethod("forEach",function(W,J){for(var te=J.length,re=0;re<te;)W(J[re]),re+=1;return J})),isNil=_curry1(function(W){return W==null});const _isInteger=Number.isInteger||function(W){return W<<0===W};var nth=_curry2(function(W,J){var te=W<0?J.length+W:W;return _isString(J)?J.charAt(te):J[te]}),paths=_curry2(function(W,J){return W.map(function(te){for(var re=J,ne=0,oe;ne<te.length;){if(re==null)return;oe=te[ne],re=_isInteger(oe)?nth(oe,re):re[oe],ne+=1}return re})}),path=_curry2(function(W,J){return paths([W],J)[0]}),prop=_curry2(function(W,J){return path([W],J)});const u$s=X=>W=>pipe(prop(W.key),isNil)(X),q$3=X=>W=>!u$s(X)(W)&&isNil(X.shadowRoot.querySelector(`#${W.definition.targetId}`)),T$1=X=>W=>{const J=X[W.key];J.regionManager.remove(J);const te=J.adapter?J.adapter.behaviors||[]:[];return delete X[W.key],pipe(map(re=>re.detach),bind$1(Promise.all,Promise),andThen(()=>delete X[W.key]),andThen(always(void 0)))(te)},w$7=(X,W,J)=>te=>h$v(te.definition,X,W,J).then(re=>{if(re){X[te.key]=re;const ne=re.adapter?re.adapter.behaviors||[]:[];return pipe(map(oe=>oe.attach()),bind$1(Promise.all,Promise),andThen(always(re)))(ne)}else return}).catch(always(void 0)),L$4=X=>pipe(keys,map(W=>({key:W,definition:X[W]})))(X),l$u=X=>X.constructor[o$U]||{},H=(X,W,J)=>{const te=u$s(X),re=q$3(X),ne=T$1(X),oe=w$7(X,W,J);return de=>cond([[te,oe],[re,ne],[T$2,always(Promise.resolve(void 0))]])(de)},j$2=(X,W)=>d$t(J=>{class te extends J{constructor(...ne){super(),this.enqueuer=new i$E(this.runRegionCreation.bind(this))}updated(ne){super.updated(ne),this.create()}createRegions(){const ne=l$u(this),oe=H(this,X,W);return pipe(L$4,forEach$1(oe),bind$1(Promise.all,Promise),andThen(reject(isNil)),andThen(bind$1(this.regionsCreated,this)))(ne)}create(){this.enqueuer.enqueueItem()}runRegionCreation(){return new Promise(ne=>{this.createRegions().then(ne).catch(ne)})}regionsCreated(ne){}disconnectedCallback(){super.disconnectedCallback();const ne=l$u(this);Object.keys(ne).forEach(oe=>{const de=this[oe];de&&(de.regionManager.remove(de),(de.adapter?de.adapter.behaviors||[]:[]).forEach(ue=>ue.detach()))})}}return te});p$h.registerDefaultAdapterFactory(f$q);/**
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
* Copyright 2017 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
84
|
*/const n$x=globalThis,c$l=n$x.trustedTypes,h$r=c$l?c$l.createPolicy("lit-html",{createHTML:X=>X}):void 0,f$l="$lit$",v$f=`lit$${Math.random().toFixed(9).slice(2)}$`,m$e="?"+v$f,_$i=`<${m$e}>`,w$6=document,lt$1=()=>w$6.createComment(""),st=X=>X===null||typeof X!="object"&&typeof X!="function",g$m=Array.isArray,$$9=X=>g$m(X)||typeof(X==null?void 0:X[Symbol.iterator])=="function",x$6=`[
|
|
85
|
-
\f\r]`,T
|
|
86
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),S$c=/'/g,j$1=/"/g,M$3=/^(?:script|style|textarea|title)$/i,P$1=X=>(W,...J)=>({_$litType$:X,strings:W,values:J}),ke$1=P$1(1),R=Symbol.for("lit-noChange"),D$1=Symbol.for("lit-nothing"),V$3=new WeakMap,I$2=w$6.createTreeWalker(w$6,129);function N$2(X,W){if(!g$m(X)||!X.hasOwnProperty("raw"))throw Error("invalid template strings array");return h$r!==void 0?h$r.createHTML(W):W}const U$1=(X,W)=>{const J=X.length-1,te=[];let re,ne=W===2?"<svg>":W===3?"<math>":"",oe=T
|
|
85
|
+
\f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E$4=/-->/g,k$4=/>/g,O$2=RegExp(`>|${x$6}(?:([^\\s"'>=/]+)(${x$6}*=${x$6}*(?:[^
|
|
86
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),S$c=/'/g,j$1=/"/g,M$3=/^(?:script|style|textarea|title)$/i,P$1=X=>(W,...J)=>({_$litType$:X,strings:W,values:J}),ke$1=P$1(1),R=Symbol.for("lit-noChange"),D$1=Symbol.for("lit-nothing"),V$3=new WeakMap,I$2=w$6.createTreeWalker(w$6,129);function N$2(X,W){if(!g$m(X)||!X.hasOwnProperty("raw"))throw Error("invalid template strings array");return h$r!==void 0?h$r.createHTML(W):W}const U$1=(X,W)=>{const J=X.length-1,te=[];let re,ne=W===2?"<svg>":W===3?"<math>":"",oe=T;for(let de=0;de<J;de++){const ue=X[de];let ce,he,pe=-1,fe=0;for(;fe<ue.length&&(oe.lastIndex=fe,he=oe.exec(ue),he!==null);)fe=oe.lastIndex,oe===T?he[1]==="!--"?oe=E$4:he[1]!==void 0?oe=k$4:he[2]!==void 0?(M$3.test(he[2])&&(re=RegExp("</"+he[2],"g")),oe=O$2):he[3]!==void 0&&(oe=O$2):oe===O$2?he[0]===">"?(oe=re??T,pe=-1):he[1]===void 0?pe=-2:(pe=oe.lastIndex-he[2].length,ce=he[1],oe=he[3]===void 0?O$2:he[3]==='"'?j$1:S$c):oe===j$1||oe===S$c?oe=O$2:oe===E$4||oe===k$4?oe=T:(oe=O$2,re=void 0);const ge=oe===O$2&&X[de+1].startsWith("/>")?" ":"";ne+=oe===T?ue+_$i:pe>=0?(te.push(ce),ue.slice(0,pe)+f$l+ue.slice(pe)+v$f+ge):ue+v$f+(pe===-2?de:ge)}return[N$2(X,ne+(X[J]||"<?>")+(W===2?"</svg>":W===3?"</math>":"")),te]};let B$3=class qr{constructor({strings:W,_$litType$:J},te){let re;this.parts=[];let ne=0,oe=0;const de=W.length-1,ue=this.parts,[ce,he]=U$1(W,J);if(this.el=qr.createElement(ce,te),I$2.currentNode=this.el.content,J===2||J===3){const pe=this.el.content.firstChild;pe.replaceWith(...pe.childNodes)}for(;(re=I$2.nextNode())!==null&&ue.length<de;){if(re.nodeType===1){if(re.hasAttributes())for(const pe of re.getAttributeNames())if(pe.endsWith(f$l)){const fe=he[oe++],ge=re.getAttribute(pe).split(v$f),be=/([.?@])?(.*)/.exec(fe);ue.push({type:1,index:ne,name:be[2],strings:ge,ctor:be[1]==="."?Y:be[1]==="?"?Z$1:be[1]==="@"?q$2:G}),re.removeAttribute(pe)}else pe.startsWith(v$f)&&(ue.push({type:6,index:ne}),re.removeAttribute(pe));if(M$3.test(re.tagName)){const pe=re.textContent.split(v$f),fe=pe.length-1;if(fe>0){re.textContent=c$l?c$l.emptyScript:"";for(let ge=0;ge<fe;ge++)re.append(pe[ge],lt$1()),I$2.nextNode(),ue.push({type:2,index:++ne});re.append(pe[fe],lt$1())}}}else if(re.nodeType===8)if(re.data===m$e)ue.push({type:2,index:ne});else{let pe=-1;for(;(pe=re.data.indexOf(v$f,pe+1))!==-1;)ue.push({type:7,index:ne}),pe+=v$f.length-1}ne++}}static createElement(W,J){const te=w$6.createElement("template");return te.innerHTML=W,te}};function z$3(X,W,J=X,te){var oe,de;if(W===R)return W;let re=te!==void 0?(oe=J.o)==null?void 0:oe[te]:J.l;const ne=st(W)?void 0:W._$litDirective$;return(re==null?void 0:re.constructor)!==ne&&((de=re==null?void 0:re._$AO)==null||de.call(re,!1),ne===void 0?re=void 0:(re=new ne(X),re._$AT(X,J,te)),te!==void 0?(J.o??(J.o=[]))[te]=re:J.l=re),re!==void 0&&(W=z$3(X,re._$AS(X,W.values),re,te)),W}let F$2=class{constructor(W,J){this._$AV=[],this._$AN=void 0,this._$AD=W,this._$AM=J}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(W){const{el:{content:J},parts:te}=this._$AD,re=((W==null?void 0:W.creationScope)??w$6).importNode(J,!0);I$2.currentNode=re;let ne=I$2.nextNode(),oe=0,de=0,ue=te[0];for(;ue!==void 0;){if(oe===ue.index){let ce;ue.type===2?ce=new et$1(ne,ne.nextSibling,this,W):ue.type===1?ce=new ue.ctor(ne,ue.name,ue.strings,this,W):ue.type===6&&(ce=new K(ne,this,W)),this._$AV.push(ce),ue=te[++de]}oe!==(ue==null?void 0:ue.index)&&(ne=I$2.nextNode(),oe++)}return I$2.currentNode=w$6,re}p(W){let J=0;for(const te of this._$AV)te!==void 0&&(te.strings!==void 0?(te._$AI(W,te,J),J+=te.strings.length-2):te._$AI(W[J])),J++}},et$1=class Pr{get _$AU(){var W;return((W=this._$AM)==null?void 0:W._$AU)??this.v}constructor(W,J,te,re){this.type=2,this._$AH=D$1,this._$AN=void 0,this._$AA=W,this._$AB=J,this._$AM=te,this.options=re,this.v=(re==null?void 0:re.isConnected)??!0}get parentNode(){let W=this._$AA.parentNode;const J=this._$AM;return J!==void 0&&(W==null?void 0:W.nodeType)===11&&(W=J.parentNode),W}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(W,J=this){W=z$3(this,W,J),st(W)?W===D$1||W==null||W===""?(this._$AH!==D$1&&this._$AR(),this._$AH=D$1):W!==this._$AH&&W!==R&&this._(W):W._$litType$!==void 0?this.$(W):W.nodeType!==void 0?this.T(W):$$9(W)?this.k(W):this._(W)}O(W){return this._$AA.parentNode.insertBefore(W,this._$AB)}T(W){this._$AH!==W&&(this._$AR(),this._$AH=this.O(W))}_(W){this._$AH!==D$1&&st(this._$AH)?this._$AA.nextSibling.data=W:this.T(w$6.createTextNode(W)),this._$AH=W}$(W){var ne;const{values:J,_$litType$:te}=W,re=typeof te=="number"?this._$AC(W):(te.el===void 0&&(te.el=B$3.createElement(N$2(te.h,te.h[0]),this.options)),te);if(((ne=this._$AH)==null?void 0:ne._$AD)===re)this._$AH.p(J);else{const oe=new F$2(re,this),de=oe.u(this.options);oe.p(J),this.T(de),this._$AH=oe}}_$AC(W){let J=V$3.get(W.strings);return J===void 0&&V$3.set(W.strings,J=new B$3(W)),J}k(W){g$m(this._$AH)||(this._$AH=[],this._$AR());const J=this._$AH;let te,re=0;for(const ne of W)re===J.length?J.push(te=new Pr(this.O(lt$1()),this.O(lt$1()),this,this.options)):te=J[re],te._$AI(ne),re++;re<J.length&&(this._$AR(te&&te._$AB.nextSibling,re),J.length=re)}_$AR(W=this._$AA.nextSibling,J){var te;for((te=this._$AP)==null?void 0:te.call(this,!1,!0,J);W&&W!==this._$AB;){const re=W.nextSibling;W.remove(),W=re}}setConnected(W){var J;this._$AM===void 0&&(this.v=W,(J=this._$AP)==null||J.call(this,W))}};class G{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(W,J,te,re,ne){this.type=1,this._$AH=D$1,this._$AN=void 0,this.element=W,this.name=J,this._$AM=re,this.options=ne,te.length>2||te[0]!==""||te[1]!==""?(this._$AH=Array(te.length-1).fill(new String),this.strings=te):this._$AH=D$1}_$AI(W,J=this,te,re){const ne=this.strings;let oe=!1;if(ne===void 0)W=z$3(this,W,J,0),oe=!st(W)||W!==this._$AH&&W!==R,oe&&(this._$AH=W);else{const de=W;let ue,ce;for(W=ne[0],ue=0;ue<ne.length-1;ue++)ce=z$3(this,de[te+ue],J,ue),ce===R&&(ce=this._$AH[ue]),oe||(oe=!st(ce)||ce!==this._$AH[ue]),ce===D$1?W=D$1:W!==D$1&&(W+=(ce??"")+ne[ue+1]),this._$AH[ue]=ce}oe&&!re&&this.j(W)}j(W){W===D$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,W??"")}}class Y extends G{constructor(){super(...arguments),this.type=3}j(W){this.element[this.name]=W===D$1?void 0:W}}let Z$1=class extends G{constructor(){super(...arguments),this.type=4}j(W){this.element.toggleAttribute(this.name,!!W&&W!==D$1)}},q$2=class extends G{constructor(W,J,te,re,ne){super(W,J,te,re,ne),this.type=5}_$AI(W,J=this){if((W=z$3(this,W,J,0)??D$1)===R)return;const te=this._$AH,re=W===D$1&&te!==D$1||W.capture!==te.capture||W.once!==te.once||W.passive!==te.passive,ne=W!==D$1&&(te===D$1||re);re&&this.element.removeEventListener(this.name,this,te),ne&&this.element.addEventListener(this.name,this,W),this._$AH=W}handleEvent(W){var J;typeof this._$AH=="function"?this._$AH.call(((J=this.options)==null?void 0:J.host)??this.element,W):this._$AH.handleEvent(W)}};class K{constructor(W,J,te){this.element=W,this.type=6,this._$AN=void 0,this._$AM=J,this.options=te}get _$AU(){return this._$AM._$AU}_$AI(W){z$3(this,W)}}const si={M:f$l,P:v$f,A:m$e,C:1,L:U$1,R:F$2,D:$$9,V:z$3,I:et$1,H:G,N:Z$1,U:q$2,B:Y,F:K},Re=n$x.litHtmlPolyfillSupport;Re==null||Re(B$3,et$1),(n$x.litHtmlVersions??(n$x.litHtmlVersions=[])).push("3.2.0");const Q=(X,W,J)=>{const te=(J==null?void 0:J.renderBefore)??W;let re=te._$litPart$;if(re===void 0){const ne=(J==null?void 0:J.renderBefore)??null;te._$litPart$=re=new et$1(W.insertBefore(lt$1(),ne),ne,void 0,J??{})}return re._$AI(X),re};/**
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2017 Google LLC
|
|
89
89
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -108,12 +108,12 @@
|
|
|
108
108
|
const handlerResult = handler({...notification});
|
|
109
109
|
return handlerResult instanceof Promise ? handlerResult : Promise.resolve(handlerResult);
|
|
110
110
|
}
|
|
111
|
-
}`)(X)},createBroker=()=>new Broker;class EcapEventManager{}class EcapEventManagerImpl{publish(W,J,te){const re=this.createEcapEvent(W,J,te??{});this.raiseEcapEvent(re)}createEcapEvent(W,J,te){return{TipusEvent:W,Accio:J,...te}}raiseEcapEvent(W){window.parent&&window.parent.postMessage(JSON.stringify(W),"*"),console.log("method",JSON.stringify(W))}}const ecapEventManager$1=new EcapEventManagerImpl,createEcapEventManager=()=>ecapEventManager$1;class PrimariaGlobalStateManagerImpl{constructor(W){this.broker=W,this.state={}}setData(W,J){this.state[W]=J,this.broker.publish("data_set",{key:W,value:J})}getData(W){return this.state[W]}clearData(){this.state={}}}const createGlobalStateManager=X=>new PrimariaGlobalStateManagerImpl(X);function bind$1(X,W){return function(){return X.apply(W,arguments)}}const{toString:toString$2}=Object.prototype,{getPrototypeOf:getPrototypeOf$1}=Object,kindOf=(X=>W=>{const J=toString$2.call(W);return X[J]||(X[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=X=>(X=X.toLowerCase(),W=>kindOf(W)===X),typeOfTest=X=>W=>typeof W===X,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(X){return X!==null&&!isUndefined(X)&&X.constructor!==null&&!isUndefined(X.constructor)&&isFunction(X.constructor.isBuffer)&&X.constructor.isBuffer(X)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(X){let W;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?W=ArrayBuffer.isView(X):W=X&&X.buffer&&isArrayBuffer(X.buffer),W}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=X=>X!==null&&typeof X=="object",isBoolean$1=X=>X===!0||X===!1,isPlainObject$2=X=>{if(kindOf(X)!=="object")return!1;const W=getPrototypeOf$1(X);return(W===null||W===Object.prototype||Object.getPrototypeOf(W)===null)&&!(Symbol.toStringTag in X)&&!(Symbol.iterator in X)},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=X=>isObject(X)&&isFunction(X.pipe),isFormData=X=>{let W;return X&&(typeof FormData=="function"&&X instanceof FormData||isFunction(X.append)&&((W=kindOf(X))==="formdata"||W==="object"&&isFunction(X.toString)&&X.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=X=>X.trim?X.trim():X.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(X,W,{allOwnKeys:J=!1}={}){if(X===null||typeof X>"u")return;let te,re;if(typeof X!="object"&&(X=[X]),isArray(X))for(te=0,re=X.length;te<re;te++)W.call(null,X[te],te,X);else{const ne=J?Object.getOwnPropertyNames(X):Object.keys(X),oe=ne.length;let de;for(te=0;te<oe;te++)de=ne[te],W.call(null,X[de],de,X)}}function findKey$1(X,W){W=W.toLowerCase();const J=Object.keys(X);let te=J.length,re;for(;te-- >0;)if(re=J[te],W===re.toLowerCase())return re;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=X=>!isUndefined(X)&&X!==_global;function merge(){const{caseless:X}=isContextDefined(this)&&this||{},W={},J=(te,re)=>{const ne=X&&findKey$1(W,re)||re;isPlainObject$2(W[ne])&&isPlainObject$2(te)?W[ne]=merge(W[ne],te):isPlainObject$2(te)?W[ne]=merge({},te):isArray(te)?W[ne]=te.slice():W[ne]=te};for(let te=0,re=arguments.length;te<re;te++)arguments[te]&&forEach(arguments[te],J);return W}const extend=(X,W,J,{allOwnKeys:te}={})=>(forEach(W,(re,ne)=>{J&&isFunction(re)?X[ne]=bind$1(re,J):X[ne]=re},{allOwnKeys:te}),X),stripBOM=X=>(X.charCodeAt(0)===65279&&(X=X.slice(1)),X),inherits=(X,W,J,te)=>{X.prototype=Object.create(W.prototype,te),X.prototype.constructor=X,Object.defineProperty(X,"super",{value:W.prototype}),J&&Object.assign(X.prototype,J)},toFlatObject=(X,W,J,te)=>{let re,ne,oe;const de={};if(W=W||{},X==null)return W;do{for(re=Object.getOwnPropertyNames(X),ne=re.length;ne-- >0;)oe=re[ne],(!te||te(oe,X,W))&&!de[oe]&&(W[oe]=X[oe],de[oe]=!0);X=J!==!1&&getPrototypeOf$1(X)}while(X&&(!J||J(X,W))&&X!==Object.prototype);return W},endsWith=(X,W,J)=>{X=String(X),(J===void 0||J>X.length)&&(J=X.length),J-=W.length;const te=X.indexOf(W,J);return te!==-1&&te===J},toArray=X=>{if(!X)return null;if(isArray(X))return X;let W=X.length;if(!isNumber(W))return null;const J=new Array(W);for(;W-- >0;)J[W]=X[W];return J},isTypedArray=(X=>W=>X&&W instanceof X)(typeof Uint8Array<"u"&&getPrototypeOf$1(Uint8Array)),forEachEntry=(X,W)=>{const te=(X&&X[Symbol.iterator]).call(X);let re;for(;(re=te.next())&&!re.done;){const ne=re.value;W.call(X,ne[0],ne[1])}},matchAll=(X,W)=>{let J;const te=[];for(;(J=X.exec(W))!==null;)te.push(J);return te},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=X=>X.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(J,te,re){return te.toUpperCase()+re}),hasOwnProperty=(({hasOwnProperty:X})=>(W,J)=>X.call(W,J))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(X,W)=>{const J=Object.getOwnPropertyDescriptors(X),te={};forEach(J,(re,ne)=>{let oe;(oe=W(re,ne,X))!==!1&&(te[ne]=oe||re)}),Object.defineProperties(X,te)},freezeMethods=X=>{reduceDescriptors(X,(W,J)=>{if(isFunction(X)&&["arguments","caller","callee"].indexOf(J)!==-1)return!1;const te=X[J];if(isFunction(te)){if(W.enumerable=!1,"writable"in W){W.writable=!1;return}W.set||(W.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")})}})},toObjectSet=(X,W)=>{const J={},te=re=>{re.forEach(ne=>{J[ne]=!0})};return isArray(X)?te(X):te(String(X).split(W)),J},noop$1=()=>{},toFiniteNumber=(X,W)=>X!=null&&Number.isFinite(X=+X)?X:W,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(X=16,W=ALPHABET.ALPHA_DIGIT)=>{let J="";const{length:te}=W;for(;X--;)J+=W[Math.random()*te|0];return J};function isSpecCompliantForm(X){return!!(X&&isFunction(X.append)&&X[Symbol.toStringTag]==="FormData"&&X[Symbol.iterator])}const toJSONObject=X=>{const W=new Array(10),J=(te,re)=>{if(isObject(te)){if(W.indexOf(te)>=0)return;if(!("toJSON"in te)){W[re]=te;const ne=isArray(te)?[]:{};return forEach(te,(oe,de)=>{const ue=J(oe,re+1);!isUndefined(ue)&&(ne[de]=ue)}),W[re]=void 0,ne}}return te};return J(X,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=X=>X&&(isObject(X)||isFunction(X))&&isFunction(X.then)&&isFunction(X.catch),_setImmediate=((X,W)=>X?setImmediate:W?((J,te)=>(_global.addEventListener("message",({source:re,data:ne})=>{re===_global&&ne===J&&te.length&&te.shift()()},!1),re=>{te.push(re),_global.postMessage(J,"*")}))(`axios@${Math.random()}`,[]):J=>setTimeout(J))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean:isBoolean$1,isObject,isPlainObject:isPlainObject$2,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate:isDate$1,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey:findKey$1,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(X,W,J,te,re){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=X,this.name="AxiosError",W&&(this.code=W),J&&(this.config=J),te&&(this.request=te),re&&(this.response=re,this.status=re.status?re.status:null)}utils$1.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(X=>{descriptors[X]={value:X}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(X,W,J,te,re,ne)=>{const oe=Object.create(prototype$1);return utils$1.toFlatObject(X,oe,function(ue){return ue!==Error.prototype},de=>de!=="isAxiosError"),AxiosError.call(oe,X.message,W,J,te,re),oe.cause=X,oe.name=X.name,ne&&Object.assign(oe,ne),oe};const httpAdapter=null;function isVisitable(X){return utils$1.isPlainObject(X)||utils$1.isArray(X)}function removeBrackets(X){return utils$1.endsWith(X,"[]")?X.slice(0,-2):X}function renderKey(X,W,J){return X?X.concat(W).map(function(re,ne){return re=removeBrackets(re),!J&&ne?"["+re+"]":re}).join(J?".":""):W}function isFlatArray(X){return utils$1.isArray(X)&&!X.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(W){return/^is[A-Z]/.test(W)});function toFormData(X,W,J){if(!utils$1.isObject(X))throw new TypeError("target must be an object");W=W||new FormData,J=utils$1.toFlatObject(J,{metaTokens:!0,dots:!1,indexes:!1},!1,function(me,ve){return!utils$1.isUndefined(ve[me])});const te=J.metaTokens,re=J.visitor||he,ne=J.dots,oe=J.indexes,ue=(J.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(W);if(!utils$1.isFunction(re))throw new TypeError("visitor must be a function");function ce(be){if(be===null)return"";if(utils$1.isDate(be))return be.toISOString();if(!ue&&utils$1.isBlob(be))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(be)||utils$1.isTypedArray(be)?ue&&typeof Blob=="function"?new Blob([be]):Buffer.from(be):be}function he(be,me,ve){let ye=be;if(be&&!ve&&typeof be=="object"){if(utils$1.endsWith(me,"{}"))me=te?me:me.slice(0,-2),be=JSON.stringify(be);else if(utils$1.isArray(be)&&isFlatArray(be)||(utils$1.isFileList(be)||utils$1.endsWith(me,"[]"))&&(ye=utils$1.toArray(be)))return me=removeBrackets(me),ye.forEach(function(Se,_e){!(utils$1.isUndefined(Se)||Se===null)&&W.append(oe===!0?renderKey([me],_e,ne):oe===null?me:me+"[]",ce(Se))}),!1}return isVisitable(be)?!0:(W.append(renderKey(ve,me,ne),ce(be)),!1)}const pe=[],fe=Object.assign(predicates,{defaultVisitor:he,convertValue:ce,isVisitable});function ge(be,me){if(!utils$1.isUndefined(be)){if(pe.indexOf(be)!==-1)throw Error("Circular reference detected in "+me.join("."));pe.push(be),utils$1.forEach(be,function(ye,we){(!(utils$1.isUndefined(ye)||ye===null)&&re.call(W,ye,utils$1.isString(we)?we.trim():we,me,fe))===!0&&ge(ye,me?me.concat(we):[we])}),pe.pop()}}if(!utils$1.isObject(X))throw new TypeError("data must be an object");return ge(X),W}function encode$1(X){const W={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(X).replace(/[!'()~]|%20|%00/g,function(te){return W[te]})}function AxiosURLSearchParams(X,W){this._pairs=[],X&&toFormData(X,this,W)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(W,J){this._pairs.push([W,J])},prototype.toString=function(W){const J=W?function(te){return W.call(this,te,encode$1)}:encode$1;return this._pairs.map(function(re){return J(re[0])+"="+J(re[1])},"").join("&")};function encode(X){return encodeURIComponent(X).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(X,W,J){if(!W)return X;const te=J&&J.encode||encode,re=J&&J.serialize;let ne;if(re?ne=re(W,J):ne=utils$1.isURLSearchParams(W)?W.toString():new AxiosURLSearchParams(W,J).toString(te),ne){const oe=X.indexOf("#");oe!==-1&&(X=X.slice(0,oe)),X+=(X.indexOf("?")===-1?"?":"&")+ne}return X}class InterceptorManager{constructor(){this.handlers=[]}use(W,J,te){return this.handlers.push({fulfilled:W,rejected:J,synchronous:te?te.synchronous:!1,runWhen:te?te.runWhen:null}),this.handlers.length-1}eject(W){this.handlers[W]&&(this.handlers[W]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(W){utils$1.forEach(this.handlers,function(te){te!==null&&W(te)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(X,W){return toFormData(X,new platform.classes.URLSearchParams,Object.assign({visitor:function(J,te,re,ne){return platform.isNode&&utils$1.isBuffer(J)?(this.append(te,J.toString("base64")),!1):ne.defaultVisitor.apply(this,arguments)}},W))}function parsePropPath(X){return utils$1.matchAll(/\w+|\[(\w*)]/g,X).map(W=>W[0]==="[]"?"":W[1]||W[0])}function arrayToObject(X){const W={},J=Object.keys(X);let te;const re=J.length;let ne;for(te=0;te<re;te++)ne=J[te],W[ne]=X[ne];return W}function formDataToJSON(X){function W(J,te,re,ne){let oe=J[ne++];if(oe==="__proto__")return!0;const de=Number.isFinite(+oe),ue=ne>=J.length;return oe=!oe&&utils$1.isArray(re)?re.length:oe,ue?(utils$1.hasOwnProp(re,oe)?re[oe]=[re[oe],te]:re[oe]=te,!de):((!re[oe]||!utils$1.isObject(re[oe]))&&(re[oe]=[]),W(J,te,re[oe],ne)&&utils$1.isArray(re[oe])&&(re[oe]=arrayToObject(re[oe])),!de)}if(utils$1.isFormData(X)&&utils$1.isFunction(X.entries)){const J={};return utils$1.forEachEntry(X,(te,re)=>{W(parsePropPath(te),re,J,0)}),J}return null}function stringifySafely(X,W,J){if(utils$1.isString(X))try{return(W||JSON.parse)(X),utils$1.trim(X)}catch(te){if(te.name!=="SyntaxError")throw te}return(0,JSON.stringify)(X)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(W,J){const te=J.getContentType()||"",re=te.indexOf("application/json")>-1,ne=utils$1.isObject(W);if(ne&&utils$1.isHTMLForm(W)&&(W=new FormData(W)),utils$1.isFormData(W))return re?JSON.stringify(formDataToJSON(W)):W;if(utils$1.isArrayBuffer(W)||utils$1.isBuffer(W)||utils$1.isStream(W)||utils$1.isFile(W)||utils$1.isBlob(W)||utils$1.isReadableStream(W))return W;if(utils$1.isArrayBufferView(W))return W.buffer;if(utils$1.isURLSearchParams(W))return J.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),W.toString();let de;if(ne){if(te.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(W,this.formSerializer).toString();if((de=utils$1.isFileList(W))||te.indexOf("multipart/form-data")>-1){const ue=this.env&&this.env.FormData;return toFormData(de?{"files[]":W}:W,ue&&new ue,this.formSerializer)}}return ne||re?(J.setContentType("application/json",!1),stringifySafely(W)):W}],transformResponse:[function(W){const J=this.transitional||defaults.transitional,te=J&&J.forcedJSONParsing,re=this.responseType==="json";if(utils$1.isResponse(W)||utils$1.isReadableStream(W))return W;if(W&&utils$1.isString(W)&&(te&&!this.responseType||re)){const oe=!(J&&J.silentJSONParsing)&&re;try{return JSON.parse(W)}catch(de){if(oe)throw de.name==="SyntaxError"?AxiosError.from(de,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):de}}return W}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(W){return W>=200&&W<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],X=>{defaults.headers[X]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=X=>{const W={};let J,te,re;return X&&X.split(`
|
|
111
|
+
}`)(X)},createBroker=()=>new Broker;class EcapEventManager{}class EcapEventManagerImpl{publish(W,J,te){const re=this.createEcapEvent(W,J,te??{});this.raiseEcapEvent(re)}createEcapEvent(W,J,te){return{TipusEvent:W,Accio:J,...te}}raiseEcapEvent(W){window.parent&&window.parent.postMessage(JSON.stringify(W),"*"),console.log("method",JSON.stringify(W))}}const ecapEventManager$1=new EcapEventManagerImpl,createEcapEventManager=()=>ecapEventManager$1;class PrimariaGlobalStateManagerImpl{constructor(W){this.broker=W,this.state={}}setData(W,J){this.state[W]=J,this.broker.publish("data_set",{key:W,value:J})}getData(W){return this.state[W]}clearData(){this.state={}}}const createGlobalStateManager=X=>new PrimariaGlobalStateManagerImpl(X);function bind(X,W){return function(){return X.apply(W,arguments)}}const{toString}=Object.prototype,{getPrototypeOf:getPrototypeOf$1}=Object,kindOf=(X=>W=>{const J=toString.call(W);return X[J]||(X[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=X=>(X=X.toLowerCase(),W=>kindOf(W)===X),typeOfTest=X=>W=>typeof W===X,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(X){return X!==null&&!isUndefined(X)&&X.constructor!==null&&!isUndefined(X.constructor)&&isFunction(X.constructor.isBuffer)&&X.constructor.isBuffer(X)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(X){let W;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?W=ArrayBuffer.isView(X):W=X&&X.buffer&&isArrayBuffer(X.buffer),W}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=X=>X!==null&&typeof X=="object",isBoolean$1=X=>X===!0||X===!1,isPlainObject$2=X=>{if(kindOf(X)!=="object")return!1;const W=getPrototypeOf$1(X);return(W===null||W===Object.prototype||Object.getPrototypeOf(W)===null)&&!(Symbol.toStringTag in X)&&!(Symbol.iterator in X)},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=X=>isObject(X)&&isFunction(X.pipe),isFormData=X=>{let W;return X&&(typeof FormData=="function"&&X instanceof FormData||isFunction(X.append)&&((W=kindOf(X))==="formdata"||W==="object"&&isFunction(X.toString)&&X.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=X=>X.trim?X.trim():X.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(X,W,{allOwnKeys:J=!1}={}){if(X===null||typeof X>"u")return;let te,re;if(typeof X!="object"&&(X=[X]),isArray(X))for(te=0,re=X.length;te<re;te++)W.call(null,X[te],te,X);else{const ne=J?Object.getOwnPropertyNames(X):Object.keys(X),oe=ne.length;let de;for(te=0;te<oe;te++)de=ne[te],W.call(null,X[de],de,X)}}function findKey$1(X,W){W=W.toLowerCase();const J=Object.keys(X);let te=J.length,re;for(;te-- >0;)if(re=J[te],W===re.toLowerCase())return re;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=X=>!isUndefined(X)&&X!==_global;function merge(){const{caseless:X}=isContextDefined(this)&&this||{},W={},J=(te,re)=>{const ne=X&&findKey$1(W,re)||re;isPlainObject$2(W[ne])&&isPlainObject$2(te)?W[ne]=merge(W[ne],te):isPlainObject$2(te)?W[ne]=merge({},te):isArray(te)?W[ne]=te.slice():W[ne]=te};for(let te=0,re=arguments.length;te<re;te++)arguments[te]&&forEach(arguments[te],J);return W}const extend=(X,W,J,{allOwnKeys:te}={})=>(forEach(W,(re,ne)=>{J&&isFunction(re)?X[ne]=bind(re,J):X[ne]=re},{allOwnKeys:te}),X),stripBOM=X=>(X.charCodeAt(0)===65279&&(X=X.slice(1)),X),inherits=(X,W,J,te)=>{X.prototype=Object.create(W.prototype,te),X.prototype.constructor=X,Object.defineProperty(X,"super",{value:W.prototype}),J&&Object.assign(X.prototype,J)},toFlatObject=(X,W,J,te)=>{let re,ne,oe;const de={};if(W=W||{},X==null)return W;do{for(re=Object.getOwnPropertyNames(X),ne=re.length;ne-- >0;)oe=re[ne],(!te||te(oe,X,W))&&!de[oe]&&(W[oe]=X[oe],de[oe]=!0);X=J!==!1&&getPrototypeOf$1(X)}while(X&&(!J||J(X,W))&&X!==Object.prototype);return W},endsWith=(X,W,J)=>{X=String(X),(J===void 0||J>X.length)&&(J=X.length),J-=W.length;const te=X.indexOf(W,J);return te!==-1&&te===J},toArray=X=>{if(!X)return null;if(isArray(X))return X;let W=X.length;if(!isNumber(W))return null;const J=new Array(W);for(;W-- >0;)J[W]=X[W];return J},isTypedArray=(X=>W=>X&&W instanceof X)(typeof Uint8Array<"u"&&getPrototypeOf$1(Uint8Array)),forEachEntry=(X,W)=>{const te=(X&&X[Symbol.iterator]).call(X);let re;for(;(re=te.next())&&!re.done;){const ne=re.value;W.call(X,ne[0],ne[1])}},matchAll=(X,W)=>{let J;const te=[];for(;(J=X.exec(W))!==null;)te.push(J);return te},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=X=>X.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(J,te,re){return te.toUpperCase()+re}),hasOwnProperty=(({hasOwnProperty:X})=>(W,J)=>X.call(W,J))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(X,W)=>{const J=Object.getOwnPropertyDescriptors(X),te={};forEach(J,(re,ne)=>{let oe;(oe=W(re,ne,X))!==!1&&(te[ne]=oe||re)}),Object.defineProperties(X,te)},freezeMethods=X=>{reduceDescriptors(X,(W,J)=>{if(isFunction(X)&&["arguments","caller","callee"].indexOf(J)!==-1)return!1;const te=X[J];if(isFunction(te)){if(W.enumerable=!1,"writable"in W){W.writable=!1;return}W.set||(W.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")})}})},toObjectSet=(X,W)=>{const J={},te=re=>{re.forEach(ne=>{J[ne]=!0})};return isArray(X)?te(X):te(String(X).split(W)),J},noop$1=()=>{},toFiniteNumber=(X,W)=>X!=null&&Number.isFinite(X=+X)?X:W,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(X=16,W=ALPHABET.ALPHA_DIGIT)=>{let J="";const{length:te}=W;for(;X--;)J+=W[Math.random()*te|0];return J};function isSpecCompliantForm(X){return!!(X&&isFunction(X.append)&&X[Symbol.toStringTag]==="FormData"&&X[Symbol.iterator])}const toJSONObject=X=>{const W=new Array(10),J=(te,re)=>{if(isObject(te)){if(W.indexOf(te)>=0)return;if(!("toJSON"in te)){W[re]=te;const ne=isArray(te)?[]:{};return forEach(te,(oe,de)=>{const ue=J(oe,re+1);!isUndefined(ue)&&(ne[de]=ue)}),W[re]=void 0,ne}}return te};return J(X,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=X=>X&&(isObject(X)||isFunction(X))&&isFunction(X.then)&&isFunction(X.catch),_setImmediate=((X,W)=>X?setImmediate:W?((J,te)=>(_global.addEventListener("message",({source:re,data:ne})=>{re===_global&&ne===J&&te.length&&te.shift()()},!1),re=>{te.push(re),_global.postMessage(J,"*")}))(`axios@${Math.random()}`,[]):J=>setTimeout(J))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean:isBoolean$1,isObject,isPlainObject:isPlainObject$2,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate:isDate$1,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey:findKey$1,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(X,W,J,te,re){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=X,this.name="AxiosError",W&&(this.code=W),J&&(this.config=J),te&&(this.request=te),re&&(this.response=re,this.status=re.status?re.status:null)}utils$1.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(X=>{descriptors[X]={value:X}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(X,W,J,te,re,ne)=>{const oe=Object.create(prototype$1);return utils$1.toFlatObject(X,oe,function(ue){return ue!==Error.prototype},de=>de!=="isAxiosError"),AxiosError.call(oe,X.message,W,J,te,re),oe.cause=X,oe.name=X.name,ne&&Object.assign(oe,ne),oe};const httpAdapter=null;function isVisitable(X){return utils$1.isPlainObject(X)||utils$1.isArray(X)}function removeBrackets(X){return utils$1.endsWith(X,"[]")?X.slice(0,-2):X}function renderKey(X,W,J){return X?X.concat(W).map(function(re,ne){return re=removeBrackets(re),!J&&ne?"["+re+"]":re}).join(J?".":""):W}function isFlatArray(X){return utils$1.isArray(X)&&!X.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(W){return/^is[A-Z]/.test(W)});function toFormData(X,W,J){if(!utils$1.isObject(X))throw new TypeError("target must be an object");W=W||new FormData,J=utils$1.toFlatObject(J,{metaTokens:!0,dots:!1,indexes:!1},!1,function(me,ve){return!utils$1.isUndefined(ve[me])});const te=J.metaTokens,re=J.visitor||he,ne=J.dots,oe=J.indexes,ue=(J.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(W);if(!utils$1.isFunction(re))throw new TypeError("visitor must be a function");function ce(be){if(be===null)return"";if(utils$1.isDate(be))return be.toISOString();if(!ue&&utils$1.isBlob(be))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(be)||utils$1.isTypedArray(be)?ue&&typeof Blob=="function"?new Blob([be]):Buffer.from(be):be}function he(be,me,ve){let ye=be;if(be&&!ve&&typeof be=="object"){if(utils$1.endsWith(me,"{}"))me=te?me:me.slice(0,-2),be=JSON.stringify(be);else if(utils$1.isArray(be)&&isFlatArray(be)||(utils$1.isFileList(be)||utils$1.endsWith(me,"[]"))&&(ye=utils$1.toArray(be)))return me=removeBrackets(me),ye.forEach(function(Se,_e){!(utils$1.isUndefined(Se)||Se===null)&&W.append(oe===!0?renderKey([me],_e,ne):oe===null?me:me+"[]",ce(Se))}),!1}return isVisitable(be)?!0:(W.append(renderKey(ve,me,ne),ce(be)),!1)}const pe=[],fe=Object.assign(predicates,{defaultVisitor:he,convertValue:ce,isVisitable});function ge(be,me){if(!utils$1.isUndefined(be)){if(pe.indexOf(be)!==-1)throw Error("Circular reference detected in "+me.join("."));pe.push(be),utils$1.forEach(be,function(ye,we){(!(utils$1.isUndefined(ye)||ye===null)&&re.call(W,ye,utils$1.isString(we)?we.trim():we,me,fe))===!0&&ge(ye,me?me.concat(we):[we])}),pe.pop()}}if(!utils$1.isObject(X))throw new TypeError("data must be an object");return ge(X),W}function encode$1(X){const W={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(X).replace(/[!'()~]|%20|%00/g,function(te){return W[te]})}function AxiosURLSearchParams(X,W){this._pairs=[],X&&toFormData(X,this,W)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(W,J){this._pairs.push([W,J])},prototype.toString=function(W){const J=W?function(te){return W.call(this,te,encode$1)}:encode$1;return this._pairs.map(function(re){return J(re[0])+"="+J(re[1])},"").join("&")};function encode(X){return encodeURIComponent(X).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(X,W,J){if(!W)return X;const te=J&&J.encode||encode,re=J&&J.serialize;let ne;if(re?ne=re(W,J):ne=utils$1.isURLSearchParams(W)?W.toString():new AxiosURLSearchParams(W,J).toString(te),ne){const oe=X.indexOf("#");oe!==-1&&(X=X.slice(0,oe)),X+=(X.indexOf("?")===-1?"?":"&")+ne}return X}class InterceptorManager{constructor(){this.handlers=[]}use(W,J,te){return this.handlers.push({fulfilled:W,rejected:J,synchronous:te?te.synchronous:!1,runWhen:te?te.runWhen:null}),this.handlers.length-1}eject(W){this.handlers[W]&&(this.handlers[W]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(W){utils$1.forEach(this.handlers,function(te){te!==null&&W(te)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(X,W){return toFormData(X,new platform.classes.URLSearchParams,Object.assign({visitor:function(J,te,re,ne){return platform.isNode&&utils$1.isBuffer(J)?(this.append(te,J.toString("base64")),!1):ne.defaultVisitor.apply(this,arguments)}},W))}function parsePropPath(X){return utils$1.matchAll(/\w+|\[(\w*)]/g,X).map(W=>W[0]==="[]"?"":W[1]||W[0])}function arrayToObject(X){const W={},J=Object.keys(X);let te;const re=J.length;let ne;for(te=0;te<re;te++)ne=J[te],W[ne]=X[ne];return W}function formDataToJSON(X){function W(J,te,re,ne){let oe=J[ne++];if(oe==="__proto__")return!0;const de=Number.isFinite(+oe),ue=ne>=J.length;return oe=!oe&&utils$1.isArray(re)?re.length:oe,ue?(utils$1.hasOwnProp(re,oe)?re[oe]=[re[oe],te]:re[oe]=te,!de):((!re[oe]||!utils$1.isObject(re[oe]))&&(re[oe]=[]),W(J,te,re[oe],ne)&&utils$1.isArray(re[oe])&&(re[oe]=arrayToObject(re[oe])),!de)}if(utils$1.isFormData(X)&&utils$1.isFunction(X.entries)){const J={};return utils$1.forEachEntry(X,(te,re)=>{W(parsePropPath(te),re,J,0)}),J}return null}function stringifySafely(X,W,J){if(utils$1.isString(X))try{return(W||JSON.parse)(X),utils$1.trim(X)}catch(te){if(te.name!=="SyntaxError")throw te}return(0,JSON.stringify)(X)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(W,J){const te=J.getContentType()||"",re=te.indexOf("application/json")>-1,ne=utils$1.isObject(W);if(ne&&utils$1.isHTMLForm(W)&&(W=new FormData(W)),utils$1.isFormData(W))return re?JSON.stringify(formDataToJSON(W)):W;if(utils$1.isArrayBuffer(W)||utils$1.isBuffer(W)||utils$1.isStream(W)||utils$1.isFile(W)||utils$1.isBlob(W)||utils$1.isReadableStream(W))return W;if(utils$1.isArrayBufferView(W))return W.buffer;if(utils$1.isURLSearchParams(W))return J.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),W.toString();let de;if(ne){if(te.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(W,this.formSerializer).toString();if((de=utils$1.isFileList(W))||te.indexOf("multipart/form-data")>-1){const ue=this.env&&this.env.FormData;return toFormData(de?{"files[]":W}:W,ue&&new ue,this.formSerializer)}}return ne||re?(J.setContentType("application/json",!1),stringifySafely(W)):W}],transformResponse:[function(W){const J=this.transitional||defaults.transitional,te=J&&J.forcedJSONParsing,re=this.responseType==="json";if(utils$1.isResponse(W)||utils$1.isReadableStream(W))return W;if(W&&utils$1.isString(W)&&(te&&!this.responseType||re)){const oe=!(J&&J.silentJSONParsing)&&re;try{return JSON.parse(W)}catch(de){if(oe)throw de.name==="SyntaxError"?AxiosError.from(de,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):de}}return W}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(W){return W>=200&&W<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],X=>{defaults.headers[X]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=X=>{const W={};let J,te,re;return X&&X.split(`
|
|
112
112
|
`).forEach(function(oe){re=oe.indexOf(":"),J=oe.substring(0,re).trim().toLowerCase(),te=oe.substring(re+1).trim(),!(!J||W[J]&&ignoreDuplicateOf[J])&&(J==="set-cookie"?W[J]?W[J].push(te):W[J]=[te]:W[J]=W[J]?W[J]+", "+te:te)}),W},$internals=Symbol("internals");function normalizeHeader(X){return X&&String(X).trim().toLowerCase()}function normalizeValue(X){return X===!1||X==null?X:utils$1.isArray(X)?X.map(normalizeValue):String(X)}function parseTokens(X){const W=Object.create(null),J=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let te;for(;te=J.exec(X);)W[te[1]]=te[2];return W}const isValidHeaderName=X=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(X.trim());function matchHeaderValue(X,W,J,te,re){if(utils$1.isFunction(te))return te.call(this,W,J);if(re&&(W=J),!!utils$1.isString(W)){if(utils$1.isString(te))return W.indexOf(te)!==-1;if(utils$1.isRegExp(te))return te.test(W)}}function formatHeader(X){return X.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(W,J,te)=>J.toUpperCase()+te)}function buildAccessors(X,W){const J=utils$1.toCamelCase(" "+W);["get","set","has"].forEach(te=>{Object.defineProperty(X,te+J,{value:function(re,ne,oe){return this[te].call(this,W,re,ne,oe)},configurable:!0})})}class AxiosHeaders{constructor(W){W&&this.set(W)}set(W,J,te){const re=this;function ne(de,ue,ce){const he=normalizeHeader(ue);if(!he)throw new Error("header name must be a non-empty string");const pe=utils$1.findKey(re,he);(!pe||re[pe]===void 0||ce===!0||ce===void 0&&re[pe]!==!1)&&(re[pe||ue]=normalizeValue(de))}const oe=(de,ue)=>utils$1.forEach(de,(ce,he)=>ne(ce,he,ue));if(utils$1.isPlainObject(W)||W instanceof this.constructor)oe(W,J);else if(utils$1.isString(W)&&(W=W.trim())&&!isValidHeaderName(W))oe(parseHeaders(W),J);else if(utils$1.isHeaders(W))for(const[de,ue]of W.entries())ne(ue,de,te);else W!=null&&ne(J,W,te);return this}get(W,J){if(W=normalizeHeader(W),W){const te=utils$1.findKey(this,W);if(te){const re=this[te];if(!J)return re;if(J===!0)return parseTokens(re);if(utils$1.isFunction(J))return J.call(this,re,te);if(utils$1.isRegExp(J))return J.exec(re);throw new TypeError("parser must be boolean|regexp|function")}}}has(W,J){if(W=normalizeHeader(W),W){const te=utils$1.findKey(this,W);return!!(te&&this[te]!==void 0&&(!J||matchHeaderValue(this,this[te],te,J)))}return!1}delete(W,J){const te=this;let re=!1;function ne(oe){if(oe=normalizeHeader(oe),oe){const de=utils$1.findKey(te,oe);de&&(!J||matchHeaderValue(te,te[de],de,J))&&(delete te[de],re=!0)}}return utils$1.isArray(W)?W.forEach(ne):ne(W),re}clear(W){const J=Object.keys(this);let te=J.length,re=!1;for(;te--;){const ne=J[te];(!W||matchHeaderValue(this,this[ne],ne,W,!0))&&(delete this[ne],re=!0)}return re}normalize(W){const J=this,te={};return utils$1.forEach(this,(re,ne)=>{const oe=utils$1.findKey(te,ne);if(oe){J[oe]=normalizeValue(re),delete J[ne];return}const de=W?formatHeader(ne):String(ne).trim();de!==ne&&delete J[ne],J[de]=normalizeValue(re),te[de]=!0}),this}concat(...W){return this.constructor.concat(this,...W)}toJSON(W){const J=Object.create(null);return utils$1.forEach(this,(te,re)=>{te!=null&&te!==!1&&(J[re]=W&&utils$1.isArray(te)?te.join(", "):te)}),J}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([W,J])=>W+": "+J).join(`
|
|
113
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(W){return W instanceof this?W:new this(W)}static concat(W,...J){const te=new this(W);return J.forEach(re=>te.set(re)),te}static accessor(W){const te=(this[$internals]=this[$internals]={accessors:{}}).accessors,re=this.prototype;function ne(oe){const de=normalizeHeader(oe);te[de]||(buildAccessors(re,oe),te[de]=!0)}return utils$1.isArray(W)?W.forEach(ne):ne(W),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:X},W)=>{let J=W[0].toUpperCase()+W.slice(1);return{get:()=>X,set(te){this[J]=te}}}),utils$1.freezeMethods(AxiosHeaders);function transformData(X,W){const J=this||defaults,te=W||J,re=AxiosHeaders.from(te.headers);let ne=te.data;return utils$1.forEach(X,function(de){ne=de.call(J,ne,re.normalize(),W?W.status:void 0)}),re.normalize(),ne}function isCancel(X){return!!(X&&X.__CANCEL__)}function CanceledError(X,W,J){AxiosError.call(this,X??"canceled",AxiosError.ERR_CANCELED,W,J),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(X,W,J){const te=J.config.validateStatus;!J.status||!te||te(J.status)?X(J):W(new AxiosError("Request failed with status code "+J.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(J.status/100)-4],J.config,J.request,J))}function parseProtocol(X){const W=/^([-+\w]{1,25})(:?\/\/|:)/.exec(X);return W&&W[1]||""}function speedometer(X,W){X=X||10;const J=new Array(X),te=new Array(X);let re=0,ne=0,oe;return W=W!==void 0?W:1e3,function(ue){const ce=Date.now(),he=te[ne];oe||(oe=ce),J[re]=ue,te[re]=ce;let pe=ne,fe=0;for(;pe!==re;)fe+=J[pe++],pe=pe%X;if(re=(re+1)%X,re===ne&&(ne=(ne+1)%X),ce-oe<W)return;const ge=he&&ce-he;return ge?Math.round(fe*1e3/ge):void 0}}function throttle(X,W){let J=0,te=1e3/W,re,ne;const oe=(ce,he=Date.now())=>{J=he,re=null,ne&&(clearTimeout(ne),ne=null),X.apply(null,ce)};return[(...ce)=>{const he=Date.now(),pe=he-J;pe>=te?oe(ce,he):(re=ce,ne||(ne=setTimeout(()=>{ne=null,oe(re)},te-pe)))},()=>re&&oe(re)]}const progressEventReducer=(X,W,J=3)=>{let te=0;const re=speedometer(50,250);return throttle(ne=>{const oe=ne.loaded,de=ne.lengthComputable?ne.total:void 0,ue=oe-te,ce=re(ue),he=oe<=de;te=oe;const pe={loaded:oe,total:de,progress:de?oe/de:void 0,bytes:ue,rate:ce||void 0,estimated:ce&&de&&he?(de-oe)/ce:void 0,event:ne,lengthComputable:de!=null,[W?"download":"upload"]:!0};X(pe)},J)},progressEventDecorator=(X,W)=>{const J=X!=null;return[te=>W[0]({lengthComputable:J,total:X,loaded:te}),W[1]]},asyncDecorator=X=>(...W)=>utils$1.asap(()=>X(...W)),isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const W=platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent),J=document.createElement("a");let te;function re(ne){let oe=ne;return W&&(J.setAttribute("href",oe),oe=J.href),J.setAttribute("href",oe),{href:J.href,protocol:J.protocol?J.protocol.replace(/:$/,""):"",host:J.host,search:J.search?J.search.replace(/^\?/,""):"",hash:J.hash?J.hash.replace(/^#/,""):"",hostname:J.hostname,port:J.port,pathname:J.pathname.charAt(0)==="/"?J.pathname:"/"+J.pathname}}return te=re(window.location.href),function(oe){const de=utils$1.isString(oe)?re(oe):oe;return de.protocol===te.protocol&&de.host===te.host}}():function(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(X,W,J,te,re,ne){const oe=[X+"="+encodeURIComponent(W)];utils$1.isNumber(J)&&oe.push("expires="+new Date(J).toGMTString()),utils$1.isString(te)&&oe.push("path="+te),utils$1.isString(re)&&oe.push("domain="+re),ne===!0&&oe.push("secure"),document.cookie=oe.join("; ")},read(X){const W=document.cookie.match(new RegExp("(^|;\\s*)("+X+")=([^;]*)"));return W?decodeURIComponent(W[3]):null},remove(X){this.write(X,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(X){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(X)}function combineURLs(X,W){return W?X.replace(/\/?\/$/,"")+"/"+W.replace(/^\/+/,""):X}function buildFullPath(X,W){return X&&!isAbsoluteURL(W)?combineURLs(X,W):W}const headersToObject=X=>X instanceof AxiosHeaders?{...X}:X;function mergeConfig$1(X,W){W=W||{};const J={};function te(ce,he,pe){return utils$1.isPlainObject(ce)&&utils$1.isPlainObject(he)?utils$1.merge.call({caseless:pe},ce,he):utils$1.isPlainObject(he)?utils$1.merge({},he):utils$1.isArray(he)?he.slice():he}function re(ce,he,pe){if(utils$1.isUndefined(he)){if(!utils$1.isUndefined(ce))return te(void 0,ce,pe)}else return te(ce,he,pe)}function ne(ce,he){if(!utils$1.isUndefined(he))return te(void 0,he)}function oe(ce,he){if(utils$1.isUndefined(he)){if(!utils$1.isUndefined(ce))return te(void 0,ce)}else return te(void 0,he)}function de(ce,he,pe){if(pe in W)return te(ce,he);if(pe in X)return te(void 0,ce)}const ue={url:ne,method:ne,data:ne,baseURL:oe,transformRequest:oe,transformResponse:oe,paramsSerializer:oe,timeout:oe,timeoutMessage:oe,withCredentials:oe,withXSRFToken:oe,adapter:oe,responseType:oe,xsrfCookieName:oe,xsrfHeaderName:oe,onUploadProgress:oe,onDownloadProgress:oe,decompress:oe,maxContentLength:oe,maxBodyLength:oe,beforeRedirect:oe,transport:oe,httpAgent:oe,httpsAgent:oe,cancelToken:oe,socketPath:oe,responseEncoding:oe,validateStatus:de,headers:(ce,he)=>re(headersToObject(ce),headersToObject(he),!0)};return utils$1.forEach(Object.keys(Object.assign({},X,W)),function(he){const pe=ue[he]||re,fe=pe(X[he],W[he],he);utils$1.isUndefined(fe)&&pe!==de||(J[he]=fe)}),J}const resolveConfig=X=>{const W=mergeConfig$1({},X);let{data:J,withXSRFToken:te,xsrfHeaderName:re,xsrfCookieName:ne,headers:oe,auth:de}=W;W.headers=oe=AxiosHeaders.from(oe),W.url=buildURL(buildFullPath(W.baseURL,W.url),X.params,X.paramsSerializer),de&&oe.set("Authorization","Basic "+btoa((de.username||"")+":"+(de.password?unescape(encodeURIComponent(de.password)):"")));let ue;if(utils$1.isFormData(J)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)oe.setContentType(void 0);else if((ue=oe.getContentType())!==!1){const[ce,...he]=ue?ue.split(";").map(pe=>pe.trim()).filter(Boolean):[];oe.setContentType([ce||"multipart/form-data",...he].join("; "))}}if(platform.hasStandardBrowserEnv&&(te&&utils$1.isFunction(te)&&(te=te(W)),te||te!==!1&&isURLSameOrigin(W.url))){const ce=re&&ne&&cookies.read(ne);ce&&oe.set(re,ce)}return W},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(X){return new Promise(function(J,te){const re=resolveConfig(X);let ne=re.data;const oe=AxiosHeaders.from(re.headers).normalize();let{responseType:de,onUploadProgress:ue,onDownloadProgress:ce}=re,he,pe,fe,ge,be;function me(){ge&&ge(),be&&be(),re.cancelToken&&re.cancelToken.unsubscribe(he),re.signal&&re.signal.removeEventListener("abort",he)}let ve=new XMLHttpRequest;ve.open(re.method.toUpperCase(),re.url,!0),ve.timeout=re.timeout;function ye(){if(!ve)return;const Se=AxiosHeaders.from("getAllResponseHeaders"in ve&&ve.getAllResponseHeaders()),Ce={data:!de||de==="text"||de==="json"?ve.responseText:ve.response,status:ve.status,statusText:ve.statusText,headers:Se,config:X,request:ve};settle(function(Pe){J(Pe),me()},function(Pe){te(Pe),me()},Ce),ve=null}"onloadend"in ve?ve.onloadend=ye:ve.onreadystatechange=function(){!ve||ve.readyState!==4||ve.status===0&&!(ve.responseURL&&ve.responseURL.indexOf("file:")===0)||setTimeout(ye)},ve.onabort=function(){ve&&(te(new AxiosError("Request aborted",AxiosError.ECONNABORTED,X,ve)),ve=null)},ve.onerror=function(){te(new AxiosError("Network Error",AxiosError.ERR_NETWORK,X,ve)),ve=null},ve.ontimeout=function(){let _e=re.timeout?"timeout of "+re.timeout+"ms exceeded":"timeout exceeded";const Ce=re.transitional||transitionalDefaults;re.timeoutErrorMessage&&(_e=re.timeoutErrorMessage),te(new AxiosError(_e,Ce.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,X,ve)),ve=null},ne===void 0&&oe.setContentType(null),"setRequestHeader"in ve&&utils$1.forEach(oe.toJSON(),function(_e,Ce){ve.setRequestHeader(Ce,_e)}),utils$1.isUndefined(re.withCredentials)||(ve.withCredentials=!!re.withCredentials),de&&de!=="json"&&(ve.responseType=re.responseType),ce&&([fe,be]=progressEventReducer(ce,!0),ve.addEventListener("progress",fe)),ue&&ve.upload&&([pe,ge]=progressEventReducer(ue),ve.upload.addEventListener("progress",pe),ve.upload.addEventListener("loadend",ge)),(re.cancelToken||re.signal)&&(he=Se=>{ve&&(te(!Se||Se.type?new CanceledError(null,X,ve):Se),ve.abort(),ve=null)},re.cancelToken&&re.cancelToken.subscribe(he),re.signal&&(re.signal.aborted?he():re.signal.addEventListener("abort",he)));const we=parseProtocol(re.url);if(we&&platform.protocols.indexOf(we)===-1){te(new AxiosError("Unsupported protocol "+we+":",AxiosError.ERR_BAD_REQUEST,X));return}ve.send(ne||null)})},composeSignals=(X,W)=>{const{length:J}=X=X?X.filter(Boolean):[];if(W||J){let te=new AbortController,re;const ne=function(ce){if(!re){re=!0,de();const he=ce instanceof Error?ce:this.reason;te.abort(he instanceof AxiosError?he:new CanceledError(he instanceof Error?he.message:he))}};let oe=W&&setTimeout(()=>{oe=null,ne(new AxiosError(`timeout ${W} of ms exceeded`,AxiosError.ETIMEDOUT))},W);const de=()=>{X&&(oe&&clearTimeout(oe),oe=null,X.forEach(ce=>{ce.unsubscribe?ce.unsubscribe(ne):ce.removeEventListener("abort",ne)}),X=null)};X.forEach(ce=>ce.addEventListener("abort",ne));const{signal:ue}=te;return ue.unsubscribe=()=>utils$1.asap(de),ue}},streamChunk=function*(X,W){let J=X.byteLength;if(J<W){yield X;return}let te=0,re;for(;te<J;)re=te+W,yield X.slice(te,re),te=re},readBytes=async function*(X,W){for await(const J of readStream(X))yield*streamChunk(J,W)},readStream=async function*(X){if(X[Symbol.asyncIterator]){yield*X;return}const W=X.getReader();try{for(;;){const{done:J,value:te}=await W.read();if(J)break;yield te}}finally{await W.cancel()}},trackStream=(X,W,J,te)=>{const re=readBytes(X,W);let ne=0,oe,de=ue=>{oe||(oe=!0,te&&te(ue))};return new ReadableStream({async pull(ue){try{const{done:ce,value:he}=await re.next();if(ce){de(),ue.close();return}let pe=he.byteLength;if(J){let fe=ne+=pe;J(fe)}ue.enqueue(new Uint8Array(he))}catch(ce){throw de(ce),ce}},cancel(ue){return de(ue),re.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(X=>W=>X.encode(W))(new TextEncoder):async X=>new Uint8Array(await new Response(X).arrayBuffer())),test=(X,...W)=>{try{return!!X(...W)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let X=!1;const W=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return X=!0,"half"}}).headers.has("Content-Type");return X&&!W}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(X=>X.body)};isFetchSupported&&(X=>{["text","arrayBuffer","blob","formData","stream"].forEach(W=>{!resolvers[W]&&(resolvers[W]=utils$1.isFunction(X[W])?J=>J[W]():(J,te)=>{throw new AxiosError(`Response type '${W}' is not supported`,AxiosError.ERR_NOT_SUPPORT,te)})})})(new Response);const getBodyLength=async X=>{if(X==null)return 0;if(utils$1.isBlob(X))return X.size;if(utils$1.isSpecCompliantForm(X))return(await new Request(platform.origin,{method:"POST",body:X}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(X)||utils$1.isArrayBuffer(X))return X.byteLength;if(utils$1.isURLSearchParams(X)&&(X=X+""),utils$1.isString(X))return(await encodeText(X)).byteLength},resolveBodyLength=async(X,W)=>{const J=utils$1.toFiniteNumber(X.getContentLength());return J??getBodyLength(W)},fetchAdapter=isFetchSupported&&(async X=>{let{url:W,method:J,data:te,signal:re,cancelToken:ne,timeout:oe,onDownloadProgress:de,onUploadProgress:ue,responseType:ce,headers:he,withCredentials:pe="same-origin",fetchOptions:fe}=resolveConfig(X);ce=ce?(ce+"").toLowerCase():"text";let ge=composeSignals([re,ne&&ne.toAbortSignal()],oe),be;const me=ge&&ge.unsubscribe&&(()=>{ge.unsubscribe()});let ve;try{if(ue&&supportsRequestStream&&J!=="get"&&J!=="head"&&(ve=await resolveBodyLength(he,te))!==0){let Ce=new Request(W,{method:"POST",body:te,duplex:"half"}),Le;if(utils$1.isFormData(te)&&(Le=Ce.headers.get("content-type"))&&he.setContentType(Le),Ce.body){const[Pe,Ie]=progressEventDecorator(ve,progressEventReducer(asyncDecorator(ue)));te=trackStream(Ce.body,DEFAULT_CHUNK_SIZE,Pe,Ie)}}utils$1.isString(pe)||(pe=pe?"include":"omit");const ye="credentials"in Request.prototype;be=new Request(W,{...fe,signal:ge,method:J.toUpperCase(),headers:he.normalize().toJSON(),body:te,duplex:"half",credentials:ye?pe:void 0});let we=await fetch(be);const Se=supportsResponseStream&&(ce==="stream"||ce==="response");if(supportsResponseStream&&(de||Se&&me)){const Ce={};["status","statusText","headers"].forEach(Fe=>{Ce[Fe]=we[Fe]});const Le=utils$1.toFiniteNumber(we.headers.get("content-length")),[Pe,Ie]=de&&progressEventDecorator(Le,progressEventReducer(asyncDecorator(de),!0))||[];we=new Response(trackStream(we.body,DEFAULT_CHUNK_SIZE,Pe,()=>{Ie&&Ie(),me&&me()}),Ce)}ce=ce||"text";let _e=await resolvers[utils$1.findKey(resolvers,ce)||"text"](we,X);return!Se&&me&&me(),await new Promise((Ce,Le)=>{settle(Ce,Le,{data:_e,headers:AxiosHeaders.from(we.headers),status:we.status,statusText:we.statusText,config:X,request:be})})}catch(ye){throw me&&me(),ye&&ye.name==="TypeError"&&/fetch/i.test(ye.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,X,be),{cause:ye.cause||ye}):AxiosError.from(ye,ye&&ye.code,X,be)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(X,W)=>{if(X){try{Object.defineProperty(X,"name",{value:W})}catch{}Object.defineProperty(X,"adapterName",{value:W})}});const renderReason=X=>`- ${X}`,isResolvedHandle=X=>utils$1.isFunction(X)||X===null||X===!1,adapters={getAdapter:X=>{X=utils$1.isArray(X)?X:[X];const{length:W}=X;let J,te;const re={};for(let ne=0;ne<W;ne++){J=X[ne];let oe;if(te=J,!isResolvedHandle(J)&&(te=knownAdapters[(oe=String(J)).toLowerCase()],te===void 0))throw new AxiosError(`Unknown adapter '${oe}'`);if(te)break;re[oe||"#"+ne]=te}if(!te){const ne=Object.entries(re).map(([de,ue])=>`adapter ${de} `+(ue===!1?"is not supported by the environment":"is not available in the build"));let oe=W?ne.length>1?`since :
|
|
113
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(W){return W instanceof this?W:new this(W)}static concat(W,...J){const te=new this(W);return J.forEach(re=>te.set(re)),te}static accessor(W){const te=(this[$internals]=this[$internals]={accessors:{}}).accessors,re=this.prototype;function ne(oe){const de=normalizeHeader(oe);te[de]||(buildAccessors(re,oe),te[de]=!0)}return utils$1.isArray(W)?W.forEach(ne):ne(W),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:X},W)=>{let J=W[0].toUpperCase()+W.slice(1);return{get:()=>X,set(te){this[J]=te}}}),utils$1.freezeMethods(AxiosHeaders);function transformData(X,W){const J=this||defaults,te=W||J,re=AxiosHeaders.from(te.headers);let ne=te.data;return utils$1.forEach(X,function(de){ne=de.call(J,ne,re.normalize(),W?W.status:void 0)}),re.normalize(),ne}function isCancel(X){return!!(X&&X.__CANCEL__)}function CanceledError(X,W,J){AxiosError.call(this,X??"canceled",AxiosError.ERR_CANCELED,W,J),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(X,W,J){const te=J.config.validateStatus;!J.status||!te||te(J.status)?X(J):W(new AxiosError("Request failed with status code "+J.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(J.status/100)-4],J.config,J.request,J))}function parseProtocol(X){const W=/^([-+\w]{1,25})(:?\/\/|:)/.exec(X);return W&&W[1]||""}function speedometer(X,W){X=X||10;const J=new Array(X),te=new Array(X);let re=0,ne=0,oe;return W=W!==void 0?W:1e3,function(ue){const ce=Date.now(),he=te[ne];oe||(oe=ce),J[re]=ue,te[re]=ce;let pe=ne,fe=0;for(;pe!==re;)fe+=J[pe++],pe=pe%X;if(re=(re+1)%X,re===ne&&(ne=(ne+1)%X),ce-oe<W)return;const ge=he&&ce-he;return ge?Math.round(fe*1e3/ge):void 0}}function throttle(X,W){let J=0,te=1e3/W,re,ne;const oe=(ce,he=Date.now())=>{J=he,re=null,ne&&(clearTimeout(ne),ne=null),X.apply(null,ce)};return[(...ce)=>{const he=Date.now(),pe=he-J;pe>=te?oe(ce,he):(re=ce,ne||(ne=setTimeout(()=>{ne=null,oe(re)},te-pe)))},()=>re&&oe(re)]}const progressEventReducer=(X,W,J=3)=>{let te=0;const re=speedometer(50,250);return throttle(ne=>{const oe=ne.loaded,de=ne.lengthComputable?ne.total:void 0,ue=oe-te,ce=re(ue),he=oe<=de;te=oe;const pe={loaded:oe,total:de,progress:de?oe/de:void 0,bytes:ue,rate:ce||void 0,estimated:ce&&de&&he?(de-oe)/ce:void 0,event:ne,lengthComputable:de!=null,[W?"download":"upload"]:!0};X(pe)},J)},progressEventDecorator=(X,W)=>{const J=X!=null;return[te=>W[0]({lengthComputable:J,total:X,loaded:te}),W[1]]},asyncDecorator=X=>(...W)=>utils$1.asap(()=>X(...W)),isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const W=platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent),J=document.createElement("a");let te;function re(ne){let oe=ne;return W&&(J.setAttribute("href",oe),oe=J.href),J.setAttribute("href",oe),{href:J.href,protocol:J.protocol?J.protocol.replace(/:$/,""):"",host:J.host,search:J.search?J.search.replace(/^\?/,""):"",hash:J.hash?J.hash.replace(/^#/,""):"",hostname:J.hostname,port:J.port,pathname:J.pathname.charAt(0)==="/"?J.pathname:"/"+J.pathname}}return te=re(window.location.href),function(oe){const de=utils$1.isString(oe)?re(oe):oe;return de.protocol===te.protocol&&de.host===te.host}}():function(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(X,W,J,te,re,ne){const oe=[X+"="+encodeURIComponent(W)];utils$1.isNumber(J)&&oe.push("expires="+new Date(J).toGMTString()),utils$1.isString(te)&&oe.push("path="+te),utils$1.isString(re)&&oe.push("domain="+re),ne===!0&&oe.push("secure"),document.cookie=oe.join("; ")},read(X){const W=document.cookie.match(new RegExp("(^|;\\s*)("+X+")=([^;]*)"));return W?decodeURIComponent(W[3]):null},remove(X){this.write(X,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(X){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(X)}function combineURLs(X,W){return W?X.replace(/\/?\/$/,"")+"/"+W.replace(/^\/+/,""):X}function buildFullPath(X,W){return X&&!isAbsoluteURL(W)?combineURLs(X,W):W}const headersToObject=X=>X instanceof AxiosHeaders?{...X}:X;function mergeConfig$1(X,W){W=W||{};const J={};function te(ce,he,pe){return utils$1.isPlainObject(ce)&&utils$1.isPlainObject(he)?utils$1.merge.call({caseless:pe},ce,he):utils$1.isPlainObject(he)?utils$1.merge({},he):utils$1.isArray(he)?he.slice():he}function re(ce,he,pe){if(utils$1.isUndefined(he)){if(!utils$1.isUndefined(ce))return te(void 0,ce,pe)}else return te(ce,he,pe)}function ne(ce,he){if(!utils$1.isUndefined(he))return te(void 0,he)}function oe(ce,he){if(utils$1.isUndefined(he)){if(!utils$1.isUndefined(ce))return te(void 0,ce)}else return te(void 0,he)}function de(ce,he,pe){if(pe in W)return te(ce,he);if(pe in X)return te(void 0,ce)}const ue={url:ne,method:ne,data:ne,baseURL:oe,transformRequest:oe,transformResponse:oe,paramsSerializer:oe,timeout:oe,timeoutMessage:oe,withCredentials:oe,withXSRFToken:oe,adapter:oe,responseType:oe,xsrfCookieName:oe,xsrfHeaderName:oe,onUploadProgress:oe,onDownloadProgress:oe,decompress:oe,maxContentLength:oe,maxBodyLength:oe,beforeRedirect:oe,transport:oe,httpAgent:oe,httpsAgent:oe,cancelToken:oe,socketPath:oe,responseEncoding:oe,validateStatus:de,headers:(ce,he)=>re(headersToObject(ce),headersToObject(he),!0)};return utils$1.forEach(Object.keys(Object.assign({},X,W)),function(he){const pe=ue[he]||re,fe=pe(X[he],W[he],he);utils$1.isUndefined(fe)&&pe!==de||(J[he]=fe)}),J}const resolveConfig=X=>{const W=mergeConfig$1({},X);let{data:J,withXSRFToken:te,xsrfHeaderName:re,xsrfCookieName:ne,headers:oe,auth:de}=W;W.headers=oe=AxiosHeaders.from(oe),W.url=buildURL(buildFullPath(W.baseURL,W.url),X.params,X.paramsSerializer),de&&oe.set("Authorization","Basic "+btoa((de.username||"")+":"+(de.password?unescape(encodeURIComponent(de.password)):"")));let ue;if(utils$1.isFormData(J)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)oe.setContentType(void 0);else if((ue=oe.getContentType())!==!1){const[ce,...he]=ue?ue.split(";").map(pe=>pe.trim()).filter(Boolean):[];oe.setContentType([ce||"multipart/form-data",...he].join("; "))}}if(platform.hasStandardBrowserEnv&&(te&&utils$1.isFunction(te)&&(te=te(W)),te||te!==!1&&isURLSameOrigin(W.url))){const ce=re&&ne&&cookies.read(ne);ce&&oe.set(re,ce)}return W},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(X){return new Promise(function(J,te){const re=resolveConfig(X);let ne=re.data;const oe=AxiosHeaders.from(re.headers).normalize();let{responseType:de,onUploadProgress:ue,onDownloadProgress:ce}=re,he,pe,fe,ge,be;function me(){ge&&ge(),be&&be(),re.cancelToken&&re.cancelToken.unsubscribe(he),re.signal&&re.signal.removeEventListener("abort",he)}let ve=new XMLHttpRequest;ve.open(re.method.toUpperCase(),re.url,!0),ve.timeout=re.timeout;function ye(){if(!ve)return;const Se=AxiosHeaders.from("getAllResponseHeaders"in ve&&ve.getAllResponseHeaders()),Ce={data:!de||de==="text"||de==="json"?ve.responseText:ve.response,status:ve.status,statusText:ve.statusText,headers:Se,config:X,request:ve};settle(function(Pe){J(Pe),me()},function(Pe){te(Pe),me()},Ce),ve=null}"onloadend"in ve?ve.onloadend=ye:ve.onreadystatechange=function(){!ve||ve.readyState!==4||ve.status===0&&!(ve.responseURL&&ve.responseURL.indexOf("file:")===0)||setTimeout(ye)},ve.onabort=function(){ve&&(te(new AxiosError("Request aborted",AxiosError.ECONNABORTED,X,ve)),ve=null)},ve.onerror=function(){te(new AxiosError("Network Error",AxiosError.ERR_NETWORK,X,ve)),ve=null},ve.ontimeout=function(){let _e=re.timeout?"timeout of "+re.timeout+"ms exceeded":"timeout exceeded";const Ce=re.transitional||transitionalDefaults;re.timeoutErrorMessage&&(_e=re.timeoutErrorMessage),te(new AxiosError(_e,Ce.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,X,ve)),ve=null},ne===void 0&&oe.setContentType(null),"setRequestHeader"in ve&&utils$1.forEach(oe.toJSON(),function(_e,Ce){ve.setRequestHeader(Ce,_e)}),utils$1.isUndefined(re.withCredentials)||(ve.withCredentials=!!re.withCredentials),de&&de!=="json"&&(ve.responseType=re.responseType),ce&&([fe,be]=progressEventReducer(ce,!0),ve.addEventListener("progress",fe)),ue&&ve.upload&&([pe,ge]=progressEventReducer(ue),ve.upload.addEventListener("progress",pe),ve.upload.addEventListener("loadend",ge)),(re.cancelToken||re.signal)&&(he=Se=>{ve&&(te(!Se||Se.type?new CanceledError(null,X,ve):Se),ve.abort(),ve=null)},re.cancelToken&&re.cancelToken.subscribe(he),re.signal&&(re.signal.aborted?he():re.signal.addEventListener("abort",he)));const we=parseProtocol(re.url);if(we&&platform.protocols.indexOf(we)===-1){te(new AxiosError("Unsupported protocol "+we+":",AxiosError.ERR_BAD_REQUEST,X));return}ve.send(ne||null)})},composeSignals=(X,W)=>{const{length:J}=X=X?X.filter(Boolean):[];if(W||J){let te=new AbortController,re;const ne=function(ce){if(!re){re=!0,de();const he=ce instanceof Error?ce:this.reason;te.abort(he instanceof AxiosError?he:new CanceledError(he instanceof Error?he.message:he))}};let oe=W&&setTimeout(()=>{oe=null,ne(new AxiosError(`timeout ${W} of ms exceeded`,AxiosError.ETIMEDOUT))},W);const de=()=>{X&&(oe&&clearTimeout(oe),oe=null,X.forEach(ce=>{ce.unsubscribe?ce.unsubscribe(ne):ce.removeEventListener("abort",ne)}),X=null)};X.forEach(ce=>ce.addEventListener("abort",ne));const{signal:ue}=te;return ue.unsubscribe=()=>utils$1.asap(de),ue}},streamChunk=function*(X,W){let J=X.byteLength;if(J<W){yield X;return}let te=0,re;for(;te<J;)re=te+W,yield X.slice(te,re),te=re},readBytes=async function*(X,W){for await(const J of readStream(X))yield*streamChunk(J,W)},readStream=async function*(X){if(X[Symbol.asyncIterator]){yield*X;return}const W=X.getReader();try{for(;;){const{done:J,value:te}=await W.read();if(J)break;yield te}}finally{await W.cancel()}},trackStream=(X,W,J,te)=>{const re=readBytes(X,W);let ne=0,oe,de=ue=>{oe||(oe=!0,te&&te(ue))};return new ReadableStream({async pull(ue){try{const{done:ce,value:he}=await re.next();if(ce){de(),ue.close();return}let pe=he.byteLength;if(J){let fe=ne+=pe;J(fe)}ue.enqueue(new Uint8Array(he))}catch(ce){throw de(ce),ce}},cancel(ue){return de(ue),re.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(X=>W=>X.encode(W))(new TextEncoder):async X=>new Uint8Array(await new Response(X).arrayBuffer())),test=(X,...W)=>{try{return!!X(...W)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let X=!1;const W=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return X=!0,"half"}}).headers.has("Content-Type");return X&&!W}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(X=>X.body)};isFetchSupported&&(X=>{["text","arrayBuffer","blob","formData","stream"].forEach(W=>{!resolvers[W]&&(resolvers[W]=utils$1.isFunction(X[W])?J=>J[W]():(J,te)=>{throw new AxiosError(`Response type '${W}' is not supported`,AxiosError.ERR_NOT_SUPPORT,te)})})})(new Response);const getBodyLength=async X=>{if(X==null)return 0;if(utils$1.isBlob(X))return X.size;if(utils$1.isSpecCompliantForm(X))return(await new Request(platform.origin,{method:"POST",body:X}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(X)||utils$1.isArrayBuffer(X))return X.byteLength;if(utils$1.isURLSearchParams(X)&&(X=X+""),utils$1.isString(X))return(await encodeText(X)).byteLength},resolveBodyLength=async(X,W)=>{const J=utils$1.toFiniteNumber(X.getContentLength());return J??getBodyLength(W)},fetchAdapter=isFetchSupported&&(async X=>{let{url:W,method:J,data:te,signal:re,cancelToken:ne,timeout:oe,onDownloadProgress:de,onUploadProgress:ue,responseType:ce,headers:he,withCredentials:pe="same-origin",fetchOptions:fe}=resolveConfig(X);ce=ce?(ce+"").toLowerCase():"text";let ge=composeSignals([re,ne&&ne.toAbortSignal()],oe),be;const me=ge&&ge.unsubscribe&&(()=>{ge.unsubscribe()});let ve;try{if(ue&&supportsRequestStream&&J!=="get"&&J!=="head"&&(ve=await resolveBodyLength(he,te))!==0){let Ce=new Request(W,{method:"POST",body:te,duplex:"half"}),Le;if(utils$1.isFormData(te)&&(Le=Ce.headers.get("content-type"))&&he.setContentType(Le),Ce.body){const[Pe,Ie]=progressEventDecorator(ve,progressEventReducer(asyncDecorator(ue)));te=trackStream(Ce.body,DEFAULT_CHUNK_SIZE,Pe,Ie)}}utils$1.isString(pe)||(pe=pe?"include":"omit");const ye="credentials"in Request.prototype;be=new Request(W,{...fe,signal:ge,method:J.toUpperCase(),headers:he.normalize().toJSON(),body:te,duplex:"half",credentials:ye?pe:void 0});let we=await fetch(be);const Se=supportsResponseStream&&(ce==="stream"||ce==="response");if(supportsResponseStream&&(de||Se&&me)){const Ce={};["status","statusText","headers"].forEach(Ne=>{Ce[Ne]=we[Ne]});const Le=utils$1.toFiniteNumber(we.headers.get("content-length")),[Pe,Ie]=de&&progressEventDecorator(Le,progressEventReducer(asyncDecorator(de),!0))||[];we=new Response(trackStream(we.body,DEFAULT_CHUNK_SIZE,Pe,()=>{Ie&&Ie(),me&&me()}),Ce)}ce=ce||"text";let _e=await resolvers[utils$1.findKey(resolvers,ce)||"text"](we,X);return!Se&&me&&me(),await new Promise((Ce,Le)=>{settle(Ce,Le,{data:_e,headers:AxiosHeaders.from(we.headers),status:we.status,statusText:we.statusText,config:X,request:be})})}catch(ye){throw me&&me(),ye&&ye.name==="TypeError"&&/fetch/i.test(ye.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,X,be),{cause:ye.cause||ye}):AxiosError.from(ye,ye&&ye.code,X,be)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(X,W)=>{if(X){try{Object.defineProperty(X,"name",{value:W})}catch{}Object.defineProperty(X,"adapterName",{value:W})}});const renderReason=X=>`- ${X}`,isResolvedHandle=X=>utils$1.isFunction(X)||X===null||X===!1,adapters={getAdapter:X=>{X=utils$1.isArray(X)?X:[X];const{length:W}=X;let J,te;const re={};for(let ne=0;ne<W;ne++){J=X[ne];let oe;if(te=J,!isResolvedHandle(J)&&(te=knownAdapters[(oe=String(J)).toLowerCase()],te===void 0))throw new AxiosError(`Unknown adapter '${oe}'`);if(te)break;re[oe||"#"+ne]=te}if(!te){const ne=Object.entries(re).map(([de,ue])=>`adapter ${de} `+(ue===!1?"is not supported by the environment":"is not available in the build"));let oe=W?ne.length>1?`since :
|
|
114
114
|
`+ne.map(renderReason).join(`
|
|
115
115
|
`):" "+renderReason(ne[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+oe,"ERR_NOT_SUPPORT")}return te},adapters:knownAdapters};function throwIfCancellationRequested(X){if(X.cancelToken&&X.cancelToken.throwIfRequested(),X.signal&&X.signal.aborted)throw new CanceledError(null,X)}function dispatchRequest(X){return throwIfCancellationRequested(X),X.headers=AxiosHeaders.from(X.headers),X.data=transformData.call(X,X.transformRequest),["post","put","patch"].indexOf(X.method)!==-1&&X.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(X.adapter||defaults.adapter)(X).then(function(te){return throwIfCancellationRequested(X),te.data=transformData.call(X,X.transformResponse,te),te.headers=AxiosHeaders.from(te.headers),te},function(te){return isCancel(te)||(throwIfCancellationRequested(X),te&&te.response&&(te.response.data=transformData.call(X,X.transformResponse,te.response),te.response.headers=AxiosHeaders.from(te.response.headers))),Promise.reject(te)})}const VERSION="1.7.7",validators$1={};["object","boolean","number","function","string","symbol"].forEach((X,W)=>{validators$1[X]=function(te){return typeof te===X||"a"+(W<1?"n ":" ")+X}});const deprecatedWarnings={};validators$1.transitional=function(W,J,te){function re(ne,oe){return"[Axios v"+VERSION+"] Transitional option '"+ne+"'"+oe+(te?". "+te:"")}return(ne,oe,de)=>{if(W===!1)throw new AxiosError(re(oe," has been removed"+(J?" in "+J:"")),AxiosError.ERR_DEPRECATED);return J&&!deprecatedWarnings[oe]&&(deprecatedWarnings[oe]=!0,console.warn(re(oe," has been deprecated since v"+J+" and will be removed in the near future"))),W?W(ne,oe,de):!0}};function assertOptions(X,W,J){if(typeof X!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const te=Object.keys(X);let re=te.length;for(;re-- >0;){const ne=te[re],oe=W[ne];if(oe){const de=X[ne],ue=de===void 0||oe(de,ne,X);if(ue!==!0)throw new AxiosError("option "+ne+" must be "+ue,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(J!==!0)throw new AxiosError("Unknown option "+ne,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(W){this.defaults=W,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(W,J){try{return await this._request(W,J)}catch(te){if(te instanceof Error){let re;Error.captureStackTrace?Error.captureStackTrace(re={}):re=new Error;const ne=re.stack?re.stack.replace(/^.+\n/,""):"";try{te.stack?ne&&!String(te.stack).endsWith(ne.replace(/^.+\n.+\n/,""))&&(te.stack+=`
|
|
116
|
-
`+ne):te.stack=ne}catch{}}throw te}}_request(W,J){typeof W=="string"?(J=J||{},J.url=W):J=W||{},J=mergeConfig$1(this.defaults,J);const{transitional:te,paramsSerializer:re,headers:ne}=J;te!==void 0&&validator.assertOptions(te,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),re!=null&&(utils$1.isFunction(re)?J.paramsSerializer={serialize:re}:validator.assertOptions(re,{encode:validators.function,serialize:validators.function},!0)),J.method=(J.method||this.defaults.method||"get").toLowerCase();let oe=ne&&utils$1.merge(ne.common,ne[J.method]);ne&&utils$1.forEach(["delete","get","head","post","put","patch","common"],be=>{delete ne[be]}),J.headers=AxiosHeaders.concat(oe,ne);const de=[];let ue=!0;this.interceptors.request.forEach(function(me){typeof me.runWhen=="function"&&me.runWhen(J)===!1||(ue=ue&&me.synchronous,de.unshift(me.fulfilled,me.rejected))});const ce=[];this.interceptors.response.forEach(function(me){ce.push(me.fulfilled,me.rejected)});let he,pe=0,fe;if(!ue){const be=[dispatchRequest.bind(this),void 0];for(be.unshift.apply(be,de),be.push.apply(be,ce),fe=be.length,he=Promise.resolve(J);pe<fe;)he=he.then(be[pe++],be[pe++]);return he}fe=de.length;let ge=J;for(pe=0;pe<fe;){const be=de[pe++],me=de[pe++];try{ge=be(ge)}catch(ve){me.call(this,ve);break}}try{he=dispatchRequest.call(this,ge)}catch(be){return Promise.reject(be)}for(pe=0,fe=ce.length;pe<fe;)he=he.then(ce[pe++],ce[pe++]);return he}getUri(W){W=mergeConfig$1(this.defaults,W);const J=buildFullPath(W.baseURL,W.url);return buildURL(J,W.params,W.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(W){Axios.prototype[W]=function(J,te){return this.request(mergeConfig$1(te||{},{method:W,url:J,data:(te||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(W){function J(te){return function(ne,oe,de){return this.request(mergeConfig$1(de||{},{method:W,headers:te?{"Content-Type":"multipart/form-data"}:{},url:ne,data:oe}))}}Axios.prototype[W]=J(),Axios.prototype[W+"Form"]=J(!0)});class CancelToken{constructor(W){if(typeof W!="function")throw new TypeError("executor must be a function.");let J;this.promise=new Promise(function(ne){J=ne});const te=this;this.promise.then(re=>{if(!te._listeners)return;let ne=te._listeners.length;for(;ne-- >0;)te._listeners[ne](re);te._listeners=null}),this.promise.then=re=>{let ne;const oe=new Promise(de=>{te.subscribe(de),ne=de}).then(re);return oe.cancel=function(){te.unsubscribe(ne)},oe},W(function(ne,oe,de){te.reason||(te.reason=new CanceledError(ne,oe,de),J(te.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(W){if(this.reason){W(this.reason);return}this._listeners?this._listeners.push(W):this._listeners=[W]}unsubscribe(W){if(!this._listeners)return;const J=this._listeners.indexOf(W);J!==-1&&this._listeners.splice(J,1)}toAbortSignal(){const W=new AbortController,J=te=>{W.abort(te)};return this.subscribe(J),W.signal.unsubscribe=()=>this.unsubscribe(J),W.signal}static source(){let W;return{token:new CancelToken(function(re){W=re}),cancel:W}}}function spread(X){return function(J){return X.apply(null,J)}}function isAxiosError(X){return utils$1.isObject(X)&&X.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([X,W])=>{HttpStatusCode[W]=X});function createInstance(X){const W=new Axios(X),J=bind
|
|
116
|
+
`+ne):te.stack=ne}catch{}}throw te}}_request(W,J){typeof W=="string"?(J=J||{},J.url=W):J=W||{},J=mergeConfig$1(this.defaults,J);const{transitional:te,paramsSerializer:re,headers:ne}=J;te!==void 0&&validator.assertOptions(te,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),re!=null&&(utils$1.isFunction(re)?J.paramsSerializer={serialize:re}:validator.assertOptions(re,{encode:validators.function,serialize:validators.function},!0)),J.method=(J.method||this.defaults.method||"get").toLowerCase();let oe=ne&&utils$1.merge(ne.common,ne[J.method]);ne&&utils$1.forEach(["delete","get","head","post","put","patch","common"],be=>{delete ne[be]}),J.headers=AxiosHeaders.concat(oe,ne);const de=[];let ue=!0;this.interceptors.request.forEach(function(me){typeof me.runWhen=="function"&&me.runWhen(J)===!1||(ue=ue&&me.synchronous,de.unshift(me.fulfilled,me.rejected))});const ce=[];this.interceptors.response.forEach(function(me){ce.push(me.fulfilled,me.rejected)});let he,pe=0,fe;if(!ue){const be=[dispatchRequest.bind(this),void 0];for(be.unshift.apply(be,de),be.push.apply(be,ce),fe=be.length,he=Promise.resolve(J);pe<fe;)he=he.then(be[pe++],be[pe++]);return he}fe=de.length;let ge=J;for(pe=0;pe<fe;){const be=de[pe++],me=de[pe++];try{ge=be(ge)}catch(ve){me.call(this,ve);break}}try{he=dispatchRequest.call(this,ge)}catch(be){return Promise.reject(be)}for(pe=0,fe=ce.length;pe<fe;)he=he.then(ce[pe++],ce[pe++]);return he}getUri(W){W=mergeConfig$1(this.defaults,W);const J=buildFullPath(W.baseURL,W.url);return buildURL(J,W.params,W.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(W){Axios.prototype[W]=function(J,te){return this.request(mergeConfig$1(te||{},{method:W,url:J,data:(te||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(W){function J(te){return function(ne,oe,de){return this.request(mergeConfig$1(de||{},{method:W,headers:te?{"Content-Type":"multipart/form-data"}:{},url:ne,data:oe}))}}Axios.prototype[W]=J(),Axios.prototype[W+"Form"]=J(!0)});class CancelToken{constructor(W){if(typeof W!="function")throw new TypeError("executor must be a function.");let J;this.promise=new Promise(function(ne){J=ne});const te=this;this.promise.then(re=>{if(!te._listeners)return;let ne=te._listeners.length;for(;ne-- >0;)te._listeners[ne](re);te._listeners=null}),this.promise.then=re=>{let ne;const oe=new Promise(de=>{te.subscribe(de),ne=de}).then(re);return oe.cancel=function(){te.unsubscribe(ne)},oe},W(function(ne,oe,de){te.reason||(te.reason=new CanceledError(ne,oe,de),J(te.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(W){if(this.reason){W(this.reason);return}this._listeners?this._listeners.push(W):this._listeners=[W]}unsubscribe(W){if(!this._listeners)return;const J=this._listeners.indexOf(W);J!==-1&&this._listeners.splice(J,1)}toAbortSignal(){const W=new AbortController,J=te=>{W.abort(te)};return this.subscribe(J),W.signal.unsubscribe=()=>this.unsubscribe(J),W.signal}static source(){let W;return{token:new CancelToken(function(re){W=re}),cancel:W}}}function spread(X){return function(J){return X.apply(null,J)}}function isAxiosError(X){return utils$1.isObject(X)&&X.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([X,W])=>{HttpStatusCode[W]=X});function createInstance(X){const W=new Axios(X),J=bind(Axios.prototype.request,W);return utils$1.extend(J,Axios.prototype,W,{allOwnKeys:!0}),utils$1.extend(J,W,null,{allOwnKeys:!0}),J.create=function(re){return createInstance(mergeConfig$1(X,re))},J}const axios=createInstance(defaults);axios.Axios=Axios,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(W){return Promise.all(W)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders,axios.formToJSON=X=>formDataToJSON(utils$1.isHTMLForm(X)?new FormData(X):X),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode,axios.default=axios;const shellEvents={openClinicalMonitoringRequested:"openClinicalMonitoringRequested",appCrashed:"appCrashed",mainViewChanged:"mainViewChanged",refreshTokenFailed:"refreshTokenFailed",mpidHeaderInvalid:"mpidHeaderInvalid",quickActionBusyChanged:"quickActionBusyChanged",refresh_history_data_requested:"refresh_history_data_requested"};class InvalidTokenError extends Error{}InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(X){return decodeURIComponent(atob(X).replace(/(.)/g,(W,J)=>{let te=J.charCodeAt(0).toString(16).toUpperCase();return te.length<2&&(te="0"+te),"%"+te}))}function base64UrlDecode(X){let W=X.replace(/-/g,"+").replace(/_/g,"/");switch(W.length%4){case 0:break;case 2:W+="==";break;case 3:W+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(W)}catch{return atob(W)}}function jwtDecode(X,W){if(typeof X!="string")throw new InvalidTokenError("Invalid token specified: must be a string");W||(W={});const J=W.header===!0?0:1,te=X.split(".")[J];if(typeof te!="string")throw new InvalidTokenError(`Invalid token specified: missing part #${J+1}`);let re;try{re=base64UrlDecode(te)}catch(ne){throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${J+1} (${ne.message})`)}try{return JSON.parse(re)}catch(ne){throw new InvalidTokenError(`Invalid token specified: invalid json for part #${J+1} (${ne.message})`)}}const mpidHeader="x-catsalut-mpid",obtainMpid=X=>{var J;return(J=jwtDecode(X).access_info)==null?void 0:J.mpi_patient_id};class MissingMpidHeaderError extends Error{constructor(W){super(W),this.name="MissingMpidHeaderError"}}class InvalidMpidHeaderError extends Error{constructor(W){super(W),this.name="InvalidMpidHeaderError"}}const validateMpidHeader=(X,W)=>{const J=X.headers[mpidHeader];if(!J)throw new MissingMpidHeaderError("Mpid header is missing");if(J!==obtainMpid(W.getToken()))throw new InvalidMpidHeaderError("Mpid header value is invalid");return!0},createAxiosInstance=(X,W,J=!1)=>{const te=axios.create();return te.interceptors.request.use(re=>(re.headers.Authorization=`Bearer ${X.getToken()}`,re)),te.interceptors.response.use(re=>{try{return J&&validateMpidHeader(re,X),re}catch(ne){return ne instanceof InvalidMpidHeaderError&&W.publish(shellEvents.mpidHeaderInvalid,{request:re.config}),Promise.reject(ne)}},async re=>{var oe;const ne=re.config;if(((oe=re.response)==null?void 0:oe.status)===401&&!ne._retry){ne._retry=!0;try{const de=await X.refreshToken();return ne.headers.Authorization=`Bearer ${de}`,te(ne)}catch(de){return console.error("Error refreshing token:",de),W.publish(shellEvents.refreshTokenFailed,{request:ne}),Promise.reject(re)}}return Promise.reject(re)}),te};let instance;const createHttpClient=(X,W)=>(instance||(instance=createAxiosInstance(X,W)),{request:instance.request});var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
|
|
117
117
|
* @license React
|
|
118
118
|
* react-jsx-runtime.production.js
|
|
119
119
|
*
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
* This source code is licensed under the MIT license found in the
|
|
123
123
|
* LICENSE file in the root directory of this source tree.
|
|
124
124
|
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(X,W,J){var te=null;if(J!==void 0&&(te=""+J),W.key!==void 0&&(te=""+W.key),"key"in W){J={};for(var re in W)re!=="key"&&(J[re]=W[re])}else J=W;return W=J.ref,{$$typeof:REACT_ELEMENT_TYPE,type:X,key:te,ref:W!==void 0?W:null,props:J}}reactJsxRuntime_production.Fragment=REACT_FRAGMENT_TYPE,reactJsxRuntime_production.jsx=jsxProd,reactJsxRuntime_production.jsxs=jsxProd,jsxRuntime.exports=reactJsxRuntime_production;var jsxRuntimeExports=jsxRuntime.exports;class PrimariaInteractionService{}const ConfirmationMessage=({data:X})=>jsxRuntimeExports.jsx("div",{children:X}),modalStyles=`.modal {
|
|
125
|
-
font-family: "Open Sans";
|
|
125
|
+
font-family: "Open Sans", sans-serif;
|
|
126
126
|
display: block;
|
|
127
127
|
position: fixed;
|
|
128
128
|
z-index: 400;
|
|
@@ -189,9 +189,9 @@
|
|
|
189
189
|
padding: 24px;
|
|
190
190
|
border-bottom-left-radius: 16px;
|
|
191
191
|
border-bottom-right-radius: 16px;
|
|
192
|
-
}`,defaultOptions$1={title:"Confirmació",showConfirmButton:!0,showCancelButton:!0,confirmButtonText:"Acceptar",cancelButtonText:"Cancel·lar",showCloseButton:!0,fullCustomization:!1,closeOnOutsideClick:!1};class ParimariaInteractionServiceImpl extends PrimariaInteractionService{confirm(W,J,te){const re={...defaultOptions$1,...te||{}};return new Promise(ne=>{const oe=document.createElement("div");document.body.appendChild(oe);const de=document.createElement("style");de.textContent=modalStyles,document.head.appendChild(de);const ue=()=>{const[he,pe]=c$r.useState(),[fe,ge]=c$r.useState(!0),be=c$r.useRef(null),me=c$r.useRef(null),ve=c$r.useRef(null),ye=typeof J=="function"&&J.prototype instanceof HTMLElement;c$r.useEffect(()=>{window.addEventListener("keydown",we)},[]);const we=qe=>{qe.key==="Escape"&&_e(!1)},Se=qe=>{me.current&&qe.target===ve.current&&re.closeOnOutsideClick&&_e(!1)};c$r.useEffect(()=>{if(ye&&be.current){const qe=be.current,Ae=new J;return Ae.data=W,Ae.setResult=pe,Ae.setIsValid=ge,Ae.confirm=()=>fe&&_e(!0),Ae.confirmResult=De=>fe&&Ce(De),Ae.cancel=()=>_e(!1),qe.appendChild(Ae),()=>{qe.removeChild(Ae)}}},[J,W]);const _e=qe=>{Le(he,qe)},Ce=qe=>{Le(qe,!0)},Le=(qe,Ae)=>{setTimeout(()=>{ne({result:Ae?qe:void 0,confirmed:Ae}),document.body.removeChild(oe),document.head.removeChild(de),window.removeEventListener("keydown",we)},300)},Pe=()=>re.state==="error"?"error":re.state==="success"?"success":re.state==="info"?"primary":re.state==="alert"?"warning":"primary",Ie=()=>re.state?"alternative-dark":"secondary",Fe=()=>ye?jsxRuntimeExports.jsx("div",{ref:be}):jsxRuntimeExports.jsx(J,{data:W,setResult:pe,setIsValid:ge,confirm:()=>fe&&_e(!0),cancel:()=>_e(!1)});return jsxRuntimeExports.jsx("div",{className:"modal",ref:ve,onClick:Se,children:jsxRuntimeExports.jsxs("div",{className:"dialog",ref:me,children:[!re.fullCustomization&&jsxRuntimeExports.jsxs("div",{className:"dss-dialog-header",children:[jsxRuntimeExports.jsx("div",{className:"dss-dialog-header-title",children:re.title}),re.showCloseButton&&jsxRuntimeExports.jsx("dss-icon-button",{class:"dss-dialog-header-close",size:"md",variant:"neutral",icon:"close",onClick:()=>_e(!1)})]}),jsxRuntimeExports.jsx("div",{className:`modal-content ${re.fullCustomization?"full-customization":""}`,children:Fe()}),!re.fullCustomization&&jsxRuntimeExports.jsxs("div",{className:"dss-modal-footer",hidden:!re.showCancelButton&&!re.showConfirmButton,children:[re.showCancelButton&&jsxRuntimeExports.jsx("dss-button",{label:re.cancelButtonText,onClick:()=>_e(!1),size:"md",variant:Ie()}),re.showConfirmButton&&jsxRuntimeExports.jsx("dss-button",{onClick:()=>fe&&_e(!0),label:re.confirmButtonText,disabled:!fe,size:"md",variant:Pe()})]})]})})};r$N.createRoot(oe).render(jsxRuntimeExports.jsx(ue,{}))})}confirmMessage(W,J){return this.confirm(W,ConfirmationMessage,J)}}function _concat(X,W){X=X||[],W=W||[];var J,te=X.length,re=W.length,ne=[];for(J=0;J<te;)ne[ne.length]=X[J],J+=1;for(J=0;J<re;)ne[ne.length]=W[J],J+=1;return ne}var ap=_curry2$1(function(W,J){return typeof J["fantasy-land/ap"]=="function"?J["fantasy-land/ap"](W):typeof W.ap=="function"?W.ap(J):typeof W=="function"?function(te){return W(te)(J(te))}:_reduce(function(te,re){return _concat(te,map$1(re,J))},[],W)}),assoc=_curry3$1(function(W,J,te){var re={};for(var ne in te)re[ne]=te[ne];return re[W]=J,re}),assocPath=_curry3$1(function X(W,J,te){if(W.length===0)return J;var re=W[0];if(W.length>1){var ne=!isNil$1(te)&&_has$1(re,te)?te[re]:_isInteger(W[1])?[]:{};J=X(Array.prototype.slice.call(W,1),J,ne)}if(_isInteger(re)&&_isArray$1(te)){var oe=[].concat(te);return oe[re]=J,oe}else return assoc(re,J,te)}),liftN=_curry2$1(function(W,J){var te=curryN$1(W,J);return curryN$1(W,function(){return _reduce(ap,map$1(te,arguments[0]),Array.prototype.slice.call(arguments,1))})}),lift=_curry1$1(function(W){return liftN(W.length,W)}),not=_curry1$1(function(W){return!W}),complement=lift(not),lens=_curry2$1(function(W,J){return function(te){return function(re){return map$1(function(ne){return J(ne,re)},te(W(re)))}}}),lensPath=_curry1$1(function(W){return lens(path(W),assocPath(W))}),mergeWithKey=_curry3$1(function(W,J,te){var re={},ne;for(ne in J)_has$1(ne,J)&&(re[ne]=_has$1(ne,te)?W(ne,J[ne],te[ne]):J[ne]);for(ne in te)_has$1(ne,te)&&!_has$1(ne,re)&&(re[ne]=te[ne]);return re}),mergeDeepWithKey=_curry3$1(function X(W,J,te){return mergeWithKey(function(re,ne,oe){return _isObject$1(ne)&&_isObject$1(oe)?X(W,ne,oe):W(re,ne,oe)},J,te)}),mergeDeepRight=_curry2$1(function(W,J){return mergeDeepWithKey(function(te,re,ne){return ne},W,J)}),Const=function(X){return{value:X,"fantasy-land/map":function(){return this}}},view=_curry2$1(function(W,J){return W(Const)(J).value});const t$h=complement(isNil$1);function _arity(X,W){switch(X){case 0:return function(){return W.apply(this,arguments)};case 1:return function(J){return W.apply(this,arguments)};case 2:return function(J,te){return W.apply(this,arguments)};case 3:return function(J,te,re){return W.apply(this,arguments)};case 4:return function(J,te,re,ne){return W.apply(this,arguments)};case 5:return function(J,te,re,ne,oe){return W.apply(this,arguments)};case 6:return function(J,te,re,ne,oe,de){return W.apply(this,arguments)};case 7:return function(J,te,re,ne,oe,de,ue){return W.apply(this,arguments)};case 8:return function(J,te,re,ne,oe,de,ue,ce){return W.apply(this,arguments)};case 9:return function(J,te,re,ne,oe,de,ue,ce,he){return W.apply(this,arguments)};case 10:return function(J,te,re,ne,oe,de,ue,ce,he,pe){return W.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _isPlaceholder(X){return X!=null&&typeof X=="object"&&X["@@functional/placeholder"]===!0}function _curry1(X){return function W(J){return arguments.length===0||_isPlaceholder(J)?W:X.apply(this,arguments)}}function _arrayReduce(X,W,J){for(var te=0,re=J.length;te<re;)W=X(W,J[te]),te+=1;return W}function _curry2(X){return function W(J,te){switch(arguments.length){case 0:return W;case 1:return _isPlaceholder(J)?W:_curry1(function(re){return X(J,re)});default:return _isPlaceholder(J)&&_isPlaceholder(te)?W:_isPlaceholder(J)?_curry1(function(re){return X(re,te)}):_isPlaceholder(te)?_curry1(function(re){return X(J,re)}):X(J,te)}}}const _isArray=Array.isArray||function(W){return W!=null&&W.length>=0&&Object.prototype.toString.call(W)==="[object Array]"};function _isTransformer(X){return X!=null&&typeof X["@@transducer/step"]=="function"}function _dispatchable(X,W,J){return function(){if(arguments.length===0)return J();var te=arguments[arguments.length-1];if(!_isArray(te)){for(var re=0;re<X.length;){if(typeof te[X[re]]=="function")return te[X[re]].apply(te,Array.prototype.slice.call(arguments,0,-1));re+=1}if(_isTransformer(te)){var ne=W.apply(null,Array.prototype.slice.call(arguments,0,-1));return ne(te)}}return J.apply(this,arguments)}}function _map(X,W){for(var J=0,te=W.length,re=Array(te);J<te;)re[J]=X(W[J]),J+=1;return re}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(X){return this.xf["@@transducer/result"](X)}};var XMap=function(){function X(W,J){this.xf=J,this.f=W}return X.prototype["@@transducer/init"]=_xfBase.init,X.prototype["@@transducer/result"]=_xfBase.result,X.prototype["@@transducer/step"]=function(W,J){return this.xf["@@transducer/step"](W,this.f(J))},X}(),_xmap=function(W){return function(J){return new XMap(W,J)}};function _curryN(X,W,J){return function(){for(var te=[],re=0,ne=X,oe=0,de=!1;oe<W.length||re<arguments.length;){var ue;oe<W.length&&(!_isPlaceholder(W[oe])||re>=arguments.length)?ue=W[oe]:(ue=arguments[re],re+=1),te[oe]=ue,_isPlaceholder(ue)?de=!0:ne-=1,oe+=1}return!de&&ne<=0?J.apply(this,te):_arity(Math.max(0,ne),_curryN(X,te,J))}}var curryN=_curry2(function(W,J){return W===1?_curry1(J):_arity(W,_curryN(W,[],J))});function _has(X,W){return Object.prototype.hasOwnProperty.call(W,X)}var toString$1=Object.prototype.toString,_isArguments=function(){return toString$1.call(arguments)==="[object Arguments]"?function(W){return toString$1.call(W)==="[object Arguments]"}:function(W){return _has("callee",W)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains$1=function(W,J){for(var te=0;te<W.length;){if(W[te]===J)return!0;te+=1}return!1},keys=_curry1(typeof Object.keys=="function"&&!hasArgsEnumBug?function(W){return Object(W)!==W?[]:Object.keys(W)}:function(W){if(Object(W)!==W)return[];var J,te,re=[],ne=hasArgsEnumBug&&_isArguments(W);for(J in W)_has(J,W)&&(!ne||J!=="length")&&(re[re.length]=J);if(hasEnumBug)for(te=nonEnumerableProps.length-1;te>=0;)J=nonEnumerableProps[te],_has(J,W)&&!contains$1(re,J)&&(re[re.length]=J),te-=1;return re}),map=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,function(W,J){switch(Object.prototype.toString.call(J)){case"[object Function]":return curryN(J.length,function(){return W.call(this,J.apply(this,arguments))});case"[object Object]":return _arrayReduce(function(te,re){return te[re]=W(J[re]),te},{},keys(J));default:return _map(W,J)}}));function _arrayFromIterator(X){for(var W=[],J;!(J=X.next()).done;)W.push(J.value);return W}function _includesWith(X,W,J){for(var te=0,re=J.length;te<re;){if(X(W,J[te]))return!0;te+=1}return!1}function _functionName(X){var W=String(X).match(/^function (\w*)/);return W==null?"":W[1]}function _objectIs(X,W){return X===W?X!==0||1/X===1/W:X!==X&&W!==W}const _objectIs$1=typeof Object.is=="function"?Object.is:_objectIs;var type=_curry1(function(W){return W===null?"Null":W===void 0?"Undefined":Object.prototype.toString.call(W).slice(8,-1)});function _uniqContentEquals(X,W,J,te){var re=_arrayFromIterator(X),ne=_arrayFromIterator(W);function oe(de,ue){return _equals(de,ue,J.slice(),te.slice())}return!_includesWith(function(de,ue){return!_includesWith(oe,ue,de)},ne,re)}function _equals(X,W,J,te){if(_objectIs$1(X,W))return!0;var re=type(X);if(re!==type(W))return!1;if(typeof X["fantasy-land/equals"]=="function"||typeof W["fantasy-land/equals"]=="function")return typeof X["fantasy-land/equals"]=="function"&&X["fantasy-land/equals"](W)&&typeof W["fantasy-land/equals"]=="function"&&W["fantasy-land/equals"](X);if(typeof X.equals=="function"||typeof W.equals=="function")return typeof X.equals=="function"&&X.equals(W)&&typeof W.equals=="function"&&W.equals(X);switch(re){case"Arguments":case"Array":case"Object":if(typeof X.constructor=="function"&&_functionName(X.constructor)==="Promise")return X===W;break;case"Boolean":case"Number":case"String":if(!(typeof X==typeof W&&_objectIs$1(X.valueOf(),W.valueOf())))return!1;break;case"Date":if(!_objectIs$1(X.valueOf(),W.valueOf()))return!1;break;case"Error":return X.name===W.name&&X.message===W.message;case"RegExp":if(!(X.source===W.source&&X.global===W.global&&X.ignoreCase===W.ignoreCase&&X.multiline===W.multiline&&X.sticky===W.sticky&&X.unicode===W.unicode))return!1;break}for(var ne=J.length-1;ne>=0;){if(J[ne]===X)return te[ne]===W;ne-=1}switch(re){case"Map":return X.size!==W.size?!1:_uniqContentEquals(X.entries(),W.entries(),J.concat([X]),te.concat([W]));case"Set":return X.size!==W.size?!1:_uniqContentEquals(X.values(),W.values(),J.concat([X]),te.concat([W]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var oe=keys(X);if(oe.length!==keys(W).length)return!1;var de=J.concat([X]),ue=te.concat([W]);for(ne=oe.length-1;ne>=0;){var ce=oe[ne];if(!(_has(ce,W)&&_equals(W[ce],X[ce],de,ue)))return!1;ne-=1}return!0}var equals=_curry2(function(W,J){return _equals(W,J,[],[])});function _indexOf(X,W,J){var te,re;if(typeof X.indexOf=="function")switch(typeof W){case"number":if(W===0){for(te=1/W;J<X.length;){if(re=X[J],re===0&&1/re===te)return J;J+=1}return-1}else if(W!==W){for(;J<X.length;){if(re=X[J],typeof re=="number"&&re!==re)return J;J+=1}return-1}return X.indexOf(W,J);case"string":case"boolean":case"function":case"undefined":return X.indexOf(W,J);case"object":if(W===null)return X.indexOf(W,J)}for(;J<X.length;){if(equals(X[J],W))return J;J+=1}return-1}function _includes(X,W){return _indexOf(W,X,0)>=0}function _quote(X){var W=X.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+W.replace(/"/g,'\\"')+'"'}var pad=function(W){return(W<10?"0":"")+W},_toISOString=typeof Date.prototype.toISOString=="function"?function(W){return W.toISOString()}:function(W){return W.getUTCFullYear()+"-"+pad(W.getUTCMonth()+1)+"-"+pad(W.getUTCDate())+"T"+pad(W.getUTCHours())+":"+pad(W.getUTCMinutes())+":"+pad(W.getUTCSeconds())+"."+(W.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function _complement(X){return function(){return!X.apply(this,arguments)}}function _filter(X,W){for(var J=0,te=W.length,re=[];J<te;)X(W[J])&&(re[re.length]=W[J]),J+=1;return re}function _isObject(X){return Object.prototype.toString.call(X)==="[object Object]"}var XFilter=function(){function X(W,J){this.xf=J,this.f=W}return X.prototype["@@transducer/init"]=_xfBase.init,X.prototype["@@transducer/result"]=_xfBase.result,X.prototype["@@transducer/step"]=function(W,J){return this.f(J)?this.xf["@@transducer/step"](W,J):W},X}();function _xfilter(X){return function(W){return new XFilter(X,W)}}var filter=_curry2(_dispatchable(["fantasy-land/filter","filter"],_xfilter,function(X,W){return _isObject(W)?_arrayReduce(function(J,te){return X(W[te])&&(J[te]=W[te]),J},{},keys(W)):_filter(X,W)})),reject=_curry2(function(W,J){return filter(_complement(W),J)});function _toString(X,W){var J=function(oe){var de=W.concat([X]);return _includes(oe,de)?"<Circular>":_toString(oe,de)},te=function(ne,oe){return _map(function(de){return _quote(de)+": "+J(ne[de])},oe.slice().sort())};switch(Object.prototype.toString.call(X)){case"[object Arguments]":return"(function() { return arguments; }("+_map(J,X).join(", ")+"))";case"[object Array]":return"["+_map(J,X).concat(te(X,reject(function(ne){return/^\d+$/.test(ne)},keys(X)))).join(", ")+"]";case"[object Boolean]":return typeof X=="object"?"new Boolean("+J(X.valueOf())+")":X.toString();case"[object Date]":return"new Date("+(isNaN(X.valueOf())?J(NaN):_quote(_toISOString(X)))+")";case"[object Map]":return"new Map("+J(Array.from(X))+")";case"[object Null]":return"null";case"[object Number]":return typeof X=="object"?"new Number("+J(X.valueOf())+")":1/X===-1/0?"-0":X.toString(10);case"[object Set]":return"new Set("+J(Array.from(X).sort())+")";case"[object String]":return typeof X=="object"?"new String("+J(X.valueOf())+")":_quote(X);case"[object Undefined]":return"undefined";default:if(typeof X.toString=="function"){var re=X.toString();if(re!=="[object Object]")return re}return"{"+te(X,keys(X)).join(", ")+"}"}}var toString=_curry1(function(W){return _toString(W,[])}),max$1=_curry2(function(W,J){if(W===J)return J;function te(ue,ce){if(ue>ce!=ce>ue)return ce>ue?ce:ue}var re=te(W,J);if(re!==void 0)return re;var ne=te(typeof W,typeof J);if(ne!==void 0)return ne===typeof W?W:J;var oe=toString(W),de=te(oe,toString(J));return de!==void 0&&de===oe?W:J});function _curry3(X){return function W(J,te,re){switch(arguments.length){case 0:return W;case 1:return _isPlaceholder(J)?W:_curry2(function(ne,oe){return X(J,ne,oe)});case 2:return _isPlaceholder(J)&&_isPlaceholder(te)?W:_isPlaceholder(J)?_curry2(function(ne,oe){return X(ne,te,oe)}):_isPlaceholder(te)?_curry2(function(ne,oe){return X(J,ne,oe)}):_curry1(function(ne){return X(J,te,ne)});default:return _isPlaceholder(J)&&_isPlaceholder(te)&&_isPlaceholder(re)?W:_isPlaceholder(J)&&_isPlaceholder(te)?_curry2(function(ne,oe){return X(ne,oe,re)}):_isPlaceholder(J)&&_isPlaceholder(re)?_curry2(function(ne,oe){return X(ne,te,oe)}):_isPlaceholder(te)&&_isPlaceholder(re)?_curry2(function(ne,oe){return X(J,ne,oe)}):_isPlaceholder(J)?_curry1(function(ne){return X(ne,te,re)}):_isPlaceholder(te)?_curry1(function(ne){return X(J,ne,re)}):_isPlaceholder(re)?_curry1(function(ne){return X(J,te,ne)}):X(J,te,re)}}}function _isString(X){return Object.prototype.toString.call(X)==="[object String]"}var _isArrayLike=_curry1(function(W){return _isArray(W)?!0:!W||typeof W!="object"||_isString(W)?!1:W.length===0?!0:W.length>0?W.hasOwnProperty(0)&&W.hasOwnProperty(W.length-1):!1}),symIterator=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _createReduce(X,W,J){return function(re,ne,oe){if(_isArrayLike(oe))return X(re,ne,oe);if(oe==null)return ne;if(typeof oe["fantasy-land/reduce"]=="function")return W(re,ne,oe,"fantasy-land/reduce");if(oe[symIterator]!=null)return J(re,ne,oe[symIterator]());if(typeof oe.next=="function")return J(re,ne,oe);if(typeof oe.reduce=="function")return W(re,ne,oe,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function _xArrayReduce(X,W,J){for(var te=0,re=J.length;te<re;){if(W=X["@@transducer/step"](W,J[te]),W&&W["@@transducer/reduced"]){W=W["@@transducer/value"];break}te+=1}return X["@@transducer/result"](W)}var bind=_curry2(function(W,J){return _arity(W.length,function(){return W.apply(J,arguments)})});function _xIterableReduce(X,W,J){for(var te=J.next();!te.done;){if(W=X["@@transducer/step"](W,te.value),W&&W["@@transducer/reduced"]){W=W["@@transducer/value"];break}te=J.next()}return X["@@transducer/result"](W)}function _xMethodReduce(X,W,J,te){return X["@@transducer/result"](J[te](bind(X["@@transducer/step"],X),W))}var _xReduce=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce),XWrap=function(){function X(W){this.f=W}return X.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},X.prototype["@@transducer/result"]=function(W){return W},X.prototype["@@transducer/step"]=function(W,J){return this.f(W,J)},X}();function _xwrap(X){return new XWrap(X)}var reduce=_curry3(function(X,W,J){return _xReduce(typeof X=="function"?_xwrap(X):X,W,J)}),cond=_curry1(function(W){var J=reduce(max$1,0,map(function(te){return te[0].length},W));return _arity(J,function(){for(var te=0;te<W.length;){if(W[te][0].apply(this,arguments))return W[te][1].apply(this,arguments);te+=1}})}),isNil=_curry1(function(W){return W==null}),T=function(){return!0};const c$j=(X,W,J=":")=>te=>cond([[()=>isNil(X),()=>{throw new Error("prefix is needed")}],[()=>t$h(W),()=>`${X}${J}${te}${J}${W}`],[T,()=>`${X}${J}${te}`]])(),E$3=c$j("LOCALIZATION",void 0,"::");E$3("LOCALES-RESET");const o$M=E$3("LOCALES-UPDATED"),n$u=E$3("LANGUAGE-UPDATED");E$3("LANGUAGE-RESET"),E$3("FORMATERS-UPDATED"),E$3("FORMATERS-RESET");let o$L=class{constructor(W,J){this.messageType=W,this.callback=J}handle(W){W instanceof this.messageType&&this.callback.call(null,W)}};const c$i=(X,W,J)=>{try{X(W,J)}catch(te){console.error(te)}},b$q=(X,W)=>{try{X.handle(W)}catch(J){console.error(J)}};let p$d=class{constructor(){this.eventLookup={},this.messageHandlers=[]}publish(W,J){let te,re;if(!W)throw new Error("Event channel/type is invalid.");if(typeof W=="string"){if(te=this.eventLookup[W],te)for(te=te.slice(),re=te.length;re--;)c$i(te[re],J,W)}else for(te=this.messageHandlers.slice(),re=te.length;re--;)b$q(te[re],W)}subscribe(W,J){let te,re;if(!W)throw new Error("Event channel/type is invalid.");return typeof W=="string"?(te=J,re=this.eventLookup[W]||(this.eventLookup[W]=[])):(te=new o$L(W,J),re=this.messageHandlers),re.push(te),{dispose(){const ne=re.indexOf(te);ne!==-1&&re.splice(ne,1)}}}subscribeOnce(W,J){const te=this.subscribe(W,(re,ne)=>(te.dispose(),J(re,ne)));return te}};const i$z=new p$d;i$z.subscribe.bind(i$z),i$z.subscribeOnce.bind(i$z);const u$p=i$z.publish.bind(i$z),t$g="en";let e$L=t$g;const L$3=X=>{e$L=X,u$p(n$u,X)},p$c=()=>e$L;var TYPE;(function(X){X[X.literal=0]="literal",X[X.argument=1]="argument",X[X.number=2]="number",X[X.date=3]="date",X[X.time=4]="time",X[X.select=5]="select",X[X.plural=6]="plural",X[X.pound=7]="pound"})(TYPE||(TYPE={}));function isLiteralElement(X){return X.type===TYPE.literal}function isArgumentElement(X){return X.type===TYPE.argument}function isNumberElement(X){return X.type===TYPE.number}function isDateElement(X){return X.type===TYPE.date}function isTimeElement(X){return X.type===TYPE.time}function isSelectElement(X){return X.type===TYPE.select}function isPluralElement(X){return X.type===TYPE.plural}function isPoundElement(X){return X.type===TYPE.pound}function isNumberSkeleton(X){return!!(X&&typeof X=="object"&&X.type===0)}function isDateTimeSkeleton(X){return!!(X&&typeof X=="object"&&X.type===1)}var __extends$1=function(){var X=function(W,J){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,re){te.__proto__=re}||function(te,re){for(var ne in re)re.hasOwnProperty(ne)&&(te[ne]=re[ne])},X(W,J)};return function(W,J){X(W,J);function te(){this.constructor=W}W.prototype=J===null?Object.create(J):(te.prototype=J.prototype,new te)}}(),__assign$4=function(){return __assign$4=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign$4.apply(this,arguments)},SyntaxError=function(X){__extends$1(W,X);function W(J,te,re,ne){var oe=X.call(this)||this;return oe.message=J,oe.expected=te,oe.found=re,oe.location=ne,oe.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(oe,W),oe}return W.buildMessage=function(J,te){function re(he){return he.charCodeAt(0).toString(16).toUpperCase()}function ne(he){return he.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(pe){return"\\x0"+re(pe)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(pe){return"\\x"+re(pe)})}function oe(he){return he.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(pe){return"\\x0"+re(pe)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(pe){return"\\x"+re(pe)})}function de(he){switch(he.type){case"literal":return'"'+ne(he.text)+'"';case"class":var pe=he.parts.map(function(fe){return Array.isArray(fe)?oe(fe[0])+"-"+oe(fe[1]):oe(fe)});return"["+(he.inverted?"^":"")+pe+"]";case"any":return"any character";case"end":return"end of input";case"other":return he.description}}function ue(he){var pe=he.map(de),fe,ge;if(pe.sort(),pe.length>0){for(fe=1,ge=1;fe<pe.length;fe++)pe[fe-1]!==pe[fe]&&(pe[ge]=pe[fe],ge++);pe.length=ge}switch(pe.length){case 1:return pe[0];case 2:return pe[0]+" or "+pe[1];default:return pe.slice(0,-1).join(", ")+", or "+pe[pe.length-1]}}function ce(he){return he?'"'+ne(he)+'"':"end of input"}return"Expected "+ue(J)+" but "+ce(te)+" found."},W}(Error);function peg$parse(X,W){W=W!==void 0?W:{};var J={},te={start:fr},re=fr,ne=function(Oe){return Oe.join("")},oe=function(Oe){return __assign$4({type:TYPE.literal,value:Oe},Ti())},de="#",ue=_i("#",!1),ce=function(){return __assign$4({type:TYPE.pound},Ti())},he=Si("argumentElement"),pe="{",fe=_i("{",!1),ge="}",be=_i("}",!1),me=function(Oe){return __assign$4({type:TYPE.argument,value:Oe},Ti())},ve=Si("numberSkeletonId"),ye=/^['\/{}]/,we=Pi(["'","/","{","}"],!1,!1),Se=jr(),_e=Si("numberSkeletonTokenOption"),Ce="/",Le=_i("/",!1),Pe=function(Oe){return Oe},Ie=Si("numberSkeletonToken"),Fe=function(Oe,Ue){return{stem:Oe,options:Ue}},qe=function(Oe){return __assign$4({type:0,tokens:Oe},Ti())},Ae="::",De=_i("::",!1),Me=function(Oe){return Oe},Be=function(){return Ai.push("numberArgStyle"),!0},Ve=function(Oe){return Ai.pop(),Oe.replace(/\s*$/,"")},Je=",",Ye=_i(",",!1),kt="number",Qe=_i("number",!1),We=function(Oe,Ue,tt){return __assign$4({type:Ue==="number"?TYPE.number:Ue==="date"?TYPE.date:TYPE.time,style:tt&&tt[2],value:Oe},Ti())},Ne="'",He=_i("'",!1),Ge=/^[^']/,Xe=Pi(["'"],!0,!1),Ke=/^[^a-zA-Z'{}]/,je=Pi([["a","z"],["A","Z"],"'","{","}"],!0,!1),Ze=/^[a-zA-Z]/,nt=Pi([["a","z"],["A","Z"]],!1,!1),ot=function(Oe){return __assign$4({type:1,pattern:Oe},Ti())},Ct=function(){return Ai.push("dateOrTimeArgStyle"),!0},Lt="date",Bt=_i("date",!1),jt="time",Kt=_i("time",!1),ei="plural",mi=_i("plural",!1),di="selectordinal",xt=_i("selectordinal",!1),St="offset:",qt=_i("offset:",!1),Dt=function(Oe,Ue,tt,vt){return __assign$4({type:TYPE.plural,pluralType:Ue==="plural"?"cardinal":"ordinal",value:Oe,offset:tt?tt[2]:0,options:vt.reduce(function(Ot,Vt){var ui=Vt.id,ti=Vt.value,ki=Vt.location;return ui in Ot&&hr('Duplicate option "'+ui+'" in plural element: "'+ur()+'"',sr()),Ot[ui]={value:ti,location:ki},Ot},{})},Ti())},Tt="select",Gt=_i("select",!1),Wt=function(Oe,Ue){return __assign$4({type:TYPE.select,value:Oe,options:Ue.reduce(function(tt,vt){var Ot=vt.id,Vt=vt.value,ui=vt.location;return Ot in tt&&hr('Duplicate option "'+Ot+'" in select element: "'+ur()+'"',sr()),tt[Ot]={value:Vt,location:ui},tt},{})},Ti())},Yt="=",pi=_i("=",!1),yi=function(Oe){return Ai.push("select"),!0},ai=function(Oe,Ue){return Ai.pop(),__assign$4({id:Oe,value:Ue},Ti())},Ii=function(Oe){return Ai.push("plural"),!0},ci=function(Oe,Ue){return Ai.pop(),__assign$4({id:Oe,value:Ue},Ti())},it=Si("whitespace"),ft=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Et=Pi([[" ","\r"]," ","
"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),Pt=Si("syntax pattern"),Ut=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,vi=Pi([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←",""],["─","❵"],["➔","⯿"],["⸀",""],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),bi=Si("optional whitespace"),Xt=Si("number"),Mt="-",Nt=_i("-",!1),Ft=function(Oe,Ue){return Ue?Oe?-Ue:Ue:0},Ht=Si("double apostrophes"),Zt="''",li=_i("''",!1),fi=function(){return"'"},xi=function(Oe,Ue){return Oe+Ue.replace("''","'")},Ni=function(Oe){return Oe!=="{"&&!(Ar()&&Oe==="#")&&!(ds()&&Oe==="}")},Xi=`
|
|
192
|
+
}`,defaultOptions$1={title:"Confirmació",showConfirmButton:!0,showCancelButton:!0,confirmButtonText:"Acceptar",cancelButtonText:"Cancel·lar",showCloseButton:!0,fullCustomization:!1,closeOnOutsideClick:!1};class ParimariaInteractionServiceImpl extends PrimariaInteractionService{confirm(W,J,te){const re={...defaultOptions$1,...te||{}};return new Promise(ne=>{const oe=document.createElement("div");document.body.appendChild(oe);const de=document.createElement("style");de.textContent=modalStyles,document.head.appendChild(de);const ue=()=>{const[he,pe]=c$r.useState(),[fe,ge]=c$r.useState(!0),be=c$r.useRef(null),me=c$r.useRef(null),ve=c$r.useRef(null),ye=typeof J=="function"&&J.prototype instanceof HTMLElement;c$r.useEffect(()=>{window.addEventListener("keydown",we)},[]);const we=qe=>{qe.key==="Escape"&&_e(!1)},Se=qe=>{me.current&&qe.target===ve.current&&re.closeOnOutsideClick&&_e(!1)};c$r.useEffect(()=>{if(ye&&be.current){const qe=be.current,Ae=new J;return Ae.data=W,Ae.setResult=pe,Ae.setIsValid=ge,Ae.confirm=()=>fe&&_e(!0),Ae.confirmResult=De=>fe&&Ce(De),Ae.cancel=()=>_e(!1),qe.appendChild(Ae),()=>{qe.removeChild(Ae)}}},[J,W]);const _e=qe=>{Le(he,qe)},Ce=qe=>{Le(qe,!0)},Le=(qe,Ae)=>{setTimeout(()=>{ne({result:Ae?qe:void 0,confirmed:Ae}),document.body.removeChild(oe),document.head.removeChild(de),window.removeEventListener("keydown",we)},300)},Pe=()=>re.state==="error"?"error":re.state==="success"?"success":re.state==="info"?"primary":re.state==="alert"?"warning":"primary",Ie=()=>re.state?"alternative-dark":"secondary",Ne=()=>ye?jsxRuntimeExports.jsx("div",{ref:be}):jsxRuntimeExports.jsx(J,{data:W,setResult:pe,setIsValid:ge,confirm:()=>fe&&_e(!0),cancel:()=>_e(!1)});return jsxRuntimeExports.jsx("div",{className:"modal",ref:ve,onClick:Se,children:jsxRuntimeExports.jsxs("div",{className:"dialog",ref:me,children:[!re.fullCustomization&&jsxRuntimeExports.jsxs("div",{className:"dss-dialog-header",children:[jsxRuntimeExports.jsx("div",{className:"dss-dialog-header-title",children:re.title}),re.showCloseButton&&jsxRuntimeExports.jsx("dss-icon-button",{class:"dss-dialog-header-close",size:"md",variant:"neutral",icon:"close",onClick:()=>_e(!1)})]}),jsxRuntimeExports.jsx("div",{className:`modal-content ${re.fullCustomization?"full-customization":""}`,children:Ne()}),!re.fullCustomization&&jsxRuntimeExports.jsxs("div",{className:"dss-modal-footer",hidden:!re.showCancelButton&&!re.showConfirmButton,children:[re.showCancelButton&&jsxRuntimeExports.jsx("dss-button",{label:re.cancelButtonText,onClick:()=>_e(!1),size:"md",variant:Ie()}),re.showConfirmButton&&jsxRuntimeExports.jsx("dss-button",{onClick:()=>fe&&_e(!0),label:re.confirmButtonText,disabled:!fe,size:"md",variant:Pe()})]})]})})};r$N.createRoot(oe).render(jsxRuntimeExports.jsx(ue,{}))})}confirmMessage(W,J){return this.confirm(W,ConfirmationMessage,J)}}function _concat(X,W){X=X||[],W=W||[];var J,te=X.length,re=W.length,ne=[];for(J=0;J<te;)ne[ne.length]=X[J],J+=1;for(J=0;J<re;)ne[ne.length]=W[J],J+=1;return ne}var ap=_curry2(function(W,J){return typeof J["fantasy-land/ap"]=="function"?J["fantasy-land/ap"](W):typeof W.ap=="function"?W.ap(J):typeof W=="function"?function(te){return W(te)(J(te))}:_reduce(function(te,re){return _concat(te,map(re,J))},[],W)}),assoc=_curry3(function(W,J,te){var re={};for(var ne in te)re[ne]=te[ne];return re[W]=J,re}),assocPath=_curry3(function X(W,J,te){if(W.length===0)return J;var re=W[0];if(W.length>1){var ne=!isNil(te)&&_has(re,te)?te[re]:_isInteger(W[1])?[]:{};J=X(Array.prototype.slice.call(W,1),J,ne)}if(_isInteger(re)&&_isArray(te)){var oe=[].concat(te);return oe[re]=J,oe}else return assoc(re,J,te)}),liftN=_curry2(function(W,J){var te=curryN(W,J);return curryN(W,function(){return _reduce(ap,map(te,arguments[0]),Array.prototype.slice.call(arguments,1))})}),lift=_curry1(function(W){return liftN(W.length,W)}),not=_curry1(function(W){return!W}),complement=lift(not),lens=_curry2(function(W,J){return function(te){return function(re){return map(function(ne){return J(ne,re)},te(W(re)))}}}),lensPath=_curry1(function(W){return lens(path(W),assocPath(W))}),mergeWithKey=_curry3(function(W,J,te){var re={},ne;for(ne in J)_has(ne,J)&&(re[ne]=_has(ne,te)?W(ne,J[ne],te[ne]):J[ne]);for(ne in te)_has(ne,te)&&!_has(ne,re)&&(re[ne]=te[ne]);return re}),mergeDeepWithKey=_curry3(function X(W,J,te){return mergeWithKey(function(re,ne,oe){return _isObject(ne)&&_isObject(oe)?X(W,ne,oe):W(re,ne,oe)},J,te)}),mergeDeepRight=_curry2(function(W,J){return mergeDeepWithKey(function(te,re,ne){return ne},W,J)}),Const=function(X){return{value:X,"fantasy-land/map":function(){return this}}},view=_curry2(function(W,J){return W(Const)(J).value});const t$h=complement(isNil),c$j=(X,W,J=":")=>te=>cond([[()=>isNil(X),()=>{throw new Error("prefix is needed")}],[()=>t$h(W),()=>`${X}${J}${te}${J}${W}`],[T$2,()=>`${X}${J}${te}`]])(),E$3=c$j("LOCALIZATION",void 0,"::");E$3("LOCALES-RESET");const o$M=E$3("LOCALES-UPDATED"),n$u=E$3("LANGUAGE-UPDATED");E$3("LANGUAGE-RESET"),E$3("FORMATERS-UPDATED"),E$3("FORMATERS-RESET");let o$L=class{constructor(W,J){this.messageType=W,this.callback=J}handle(W){W instanceof this.messageType&&this.callback.call(null,W)}};const c$i=(X,W,J)=>{try{X(W,J)}catch(te){console.error(te)}},b$q=(X,W)=>{try{X.handle(W)}catch(J){console.error(J)}};let p$d=class{constructor(){this.eventLookup={},this.messageHandlers=[]}publish(W,J){let te,re;if(!W)throw new Error("Event channel/type is invalid.");if(typeof W=="string"){if(te=this.eventLookup[W],te)for(te=te.slice(),re=te.length;re--;)c$i(te[re],J,W)}else for(te=this.messageHandlers.slice(),re=te.length;re--;)b$q(te[re],W)}subscribe(W,J){let te,re;if(!W)throw new Error("Event channel/type is invalid.");return typeof W=="string"?(te=J,re=this.eventLookup[W]||(this.eventLookup[W]=[])):(te=new o$L(W,J),re=this.messageHandlers),re.push(te),{dispose(){const ne=re.indexOf(te);ne!==-1&&re.splice(ne,1)}}}subscribeOnce(W,J){const te=this.subscribe(W,(re,ne)=>(te.dispose(),J(re,ne)));return te}};const i$z=new p$d;i$z.subscribe.bind(i$z),i$z.subscribeOnce.bind(i$z);const u$p=i$z.publish.bind(i$z),t$g="en";let e$L=t$g;const L$3=X=>{e$L=X,u$p(n$u,X)},p$c=()=>e$L;var TYPE;(function(X){X[X.literal=0]="literal",X[X.argument=1]="argument",X[X.number=2]="number",X[X.date=3]="date",X[X.time=4]="time",X[X.select=5]="select",X[X.plural=6]="plural",X[X.pound=7]="pound"})(TYPE||(TYPE={}));function isLiteralElement(X){return X.type===TYPE.literal}function isArgumentElement(X){return X.type===TYPE.argument}function isNumberElement(X){return X.type===TYPE.number}function isDateElement(X){return X.type===TYPE.date}function isTimeElement(X){return X.type===TYPE.time}function isSelectElement(X){return X.type===TYPE.select}function isPluralElement(X){return X.type===TYPE.plural}function isPoundElement(X){return X.type===TYPE.pound}function isNumberSkeleton(X){return!!(X&&typeof X=="object"&&X.type===0)}function isDateTimeSkeleton(X){return!!(X&&typeof X=="object"&&X.type===1)}var __extends$1=function(){var X=function(W,J){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,re){te.__proto__=re}||function(te,re){for(var ne in re)re.hasOwnProperty(ne)&&(te[ne]=re[ne])},X(W,J)};return function(W,J){X(W,J);function te(){this.constructor=W}W.prototype=J===null?Object.create(J):(te.prototype=J.prototype,new te)}}(),__assign$4=function(){return __assign$4=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign$4.apply(this,arguments)},SyntaxError=function(X){__extends$1(W,X);function W(J,te,re,ne){var oe=X.call(this)||this;return oe.message=J,oe.expected=te,oe.found=re,oe.location=ne,oe.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(oe,W),oe}return W.buildMessage=function(J,te){function re(he){return he.charCodeAt(0).toString(16).toUpperCase()}function ne(he){return he.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(pe){return"\\x0"+re(pe)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(pe){return"\\x"+re(pe)})}function oe(he){return he.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(pe){return"\\x0"+re(pe)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(pe){return"\\x"+re(pe)})}function de(he){switch(he.type){case"literal":return'"'+ne(he.text)+'"';case"class":var pe=he.parts.map(function(fe){return Array.isArray(fe)?oe(fe[0])+"-"+oe(fe[1]):oe(fe)});return"["+(he.inverted?"^":"")+pe+"]";case"any":return"any character";case"end":return"end of input";case"other":return he.description}}function ue(he){var pe=he.map(de),fe,ge;if(pe.sort(),pe.length>0){for(fe=1,ge=1;fe<pe.length;fe++)pe[fe-1]!==pe[fe]&&(pe[ge]=pe[fe],ge++);pe.length=ge}switch(pe.length){case 1:return pe[0];case 2:return pe[0]+" or "+pe[1];default:return pe.slice(0,-1).join(", ")+", or "+pe[pe.length-1]}}function ce(he){return he?'"'+ne(he)+'"':"end of input"}return"Expected "+ue(J)+" but "+ce(te)+" found."},W}(Error);function peg$parse(X,W){W=W!==void 0?W:{};var J={},te={start:fr},re=fr,ne=function(Oe){return Oe.join("")},oe=function(Oe){return __assign$4({type:TYPE.literal,value:Oe},Ti())},de="#",ue=_i("#",!1),ce=function(){return __assign$4({type:TYPE.pound},Ti())},he=Si("argumentElement"),pe="{",fe=_i("{",!1),ge="}",be=_i("}",!1),me=function(Oe){return __assign$4({type:TYPE.argument,value:Oe},Ti())},ve=Si("numberSkeletonId"),ye=/^['\/{}]/,we=Pi(["'","/","{","}"],!1,!1),Se=jr(),_e=Si("numberSkeletonTokenOption"),Ce="/",Le=_i("/",!1),Pe=function(Oe){return Oe},Ie=Si("numberSkeletonToken"),Ne=function(Oe,Ue){return{stem:Oe,options:Ue}},qe=function(Oe){return __assign$4({type:0,tokens:Oe},Ti())},Ae="::",De=_i("::",!1),Me=function(Oe){return Oe},Be=function(){return Ai.push("numberArgStyle"),!0},Ve=function(Oe){return Ai.pop(),Oe.replace(/\s*$/,"")},Je=",",Ye=_i(",",!1),kt="number",Qe=_i("number",!1),We=function(Oe,Ue,tt){return __assign$4({type:Ue==="number"?TYPE.number:Ue==="date"?TYPE.date:TYPE.time,style:tt&&tt[2],value:Oe},Ti())},Fe="'",He=_i("'",!1),Ge=/^[^']/,Xe=Pi(["'"],!0,!1),Ke=/^[^a-zA-Z'{}]/,je=Pi([["a","z"],["A","Z"],"'","{","}"],!0,!1),Ze=/^[a-zA-Z]/,nt=Pi([["a","z"],["A","Z"]],!1,!1),ot=function(Oe){return __assign$4({type:1,pattern:Oe},Ti())},Ct=function(){return Ai.push("dateOrTimeArgStyle"),!0},Lt="date",Bt=_i("date",!1),jt="time",Kt=_i("time",!1),ei="plural",mi=_i("plural",!1),di="selectordinal",xt=_i("selectordinal",!1),St="offset:",qt=_i("offset:",!1),Dt=function(Oe,Ue,tt,vt){return __assign$4({type:TYPE.plural,pluralType:Ue==="plural"?"cardinal":"ordinal",value:Oe,offset:tt?tt[2]:0,options:vt.reduce(function(Ot,Vt){var ui=Vt.id,ti=Vt.value,ki=Vt.location;return ui in Ot&&hr('Duplicate option "'+ui+'" in plural element: "'+ur()+'"',sr()),Ot[ui]={value:ti,location:ki},Ot},{})},Ti())},Tt="select",Gt=_i("select",!1),Wt=function(Oe,Ue){return __assign$4({type:TYPE.select,value:Oe,options:Ue.reduce(function(tt,vt){var Ot=vt.id,Vt=vt.value,ui=vt.location;return Ot in tt&&hr('Duplicate option "'+Ot+'" in select element: "'+ur()+'"',sr()),tt[Ot]={value:Vt,location:ui},tt},{})},Ti())},Yt="=",pi=_i("=",!1),yi=function(Oe){return Ai.push("select"),!0},ai=function(Oe,Ue){return Ai.pop(),__assign$4({id:Oe,value:Ue},Ti())},Ii=function(Oe){return Ai.push("plural"),!0},ci=function(Oe,Ue){return Ai.pop(),__assign$4({id:Oe,value:Ue},Ti())},it=Si("whitespace"),ft=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Et=Pi([[" ","\r"]," ","
"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),Pt=Si("syntax pattern"),Ut=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,vi=Pi([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←",""],["─","❵"],["➔","⯿"],["⸀",""],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),bi=Si("optional whitespace"),Xt=Si("number"),Mt="-",Ft=_i("-",!1),Nt=function(Oe,Ue){return Ue?Oe?-Ue:Ue:0},Ht=Si("double apostrophes"),Zt="''",li=_i("''",!1),fi=function(){return"'"},xi=function(Oe,Ue){return Oe+Ue.replace("''","'")},Fi=function(Oe){return Oe!=="{"&&!(Ar()&&Oe==="#")&&!(ds()&&Oe==="}")},Xi=`
|
|
193
193
|
`,ir=_i(`
|
|
194
|
-
`,!1),Rr=function(Oe){return Oe==="{"||Oe==="}"||Ar()&&Oe==="#"},Ir=Si("argNameOrNumber"),Lr=Si("argNumber"),Mr="0",Nr=_i("0",!1),zr=function(){return 0},Fr=/^[1-9]/,Hr=Pi([["1","9"]],!1,!1),dr=/^[0-9]/,cr=Pi([["0","9"]],!1,!1),Br=function(Oe){return parseInt(Oe.join(""),10)},Ur=Si("argName"),ze=0,ni=0,zi=[{line:1,column:1}],Ei=0,rr=[],At=0,Fi;if(W.startRule!==void 0){if(!(W.startRule in te))throw new Error(`Can't start parsing from rule "`+W.startRule+'".');re=te[W.startRule]}function ur(){return X.substring(ni,ze)}function sr(){return Hi(ni,ze)}function hr(Oe,Ue){throw Ue=Ue!==void 0?Ue:Hi(ni,ze),Wr(Oe,Ue)}function _i(Oe,Ue){return{type:"literal",text:Oe,ignoreCase:Ue}}function Pi(Oe,Ue,tt){return{type:"class",parts:Oe,inverted:Ue,ignoreCase:tt}}function jr(){return{type:"any"}}function Vr(){return{type:"end"}}function Si(Oe){return{type:"other",description:Oe}}function pr(Oe){var Ue=zi[Oe],tt;if(Ue)return Ue;for(tt=Oe-1;!zi[tt];)tt--;for(Ue=zi[tt],Ue={line:Ue.line,column:Ue.column};tt<Oe;)X.charCodeAt(tt)===10?(Ue.line++,Ue.column=1):Ue.column++,tt++;return zi[Oe]=Ue,Ue}function Hi(Oe,Ue){var tt=pr(Oe),vt=pr(Ue);return{start:{offset:Oe,line:tt.line,column:tt.column},end:{offset:Ue,line:vt.line,column:vt.column}}}function It(Oe){ze<Ei||(ze>Ei&&(Ei=ze,rr=[]),rr.push(Oe))}function Wr(Oe,Ue){return new SyntaxError(Oe,[],"",Ue)}function Gr(Oe,Ue,tt){return new SyntaxError(SyntaxError.buildMessage(Oe,Ue),Oe,Ue,tt)}function fr(){var Oe;return Oe=nr(),Oe}function nr(){var Oe,Ue;for(Oe=[],Ue=gr();Ue!==J;)Oe.push(Ue),Ue=gr();return Oe}function gr(){var Oe;return Oe=Jr(),Oe===J&&(Oe=Zr(),Oe===J&&(Oe=ss(),Oe===J&&(Oe=ns(),Oe===J&&(Oe=os(),Oe===J&&(Oe=Yr()))))),Oe}function or(){var Oe,Ue,tt;if(Oe=ze,Ue=[],tt=Ri(),tt===J&&(tt=Sr(),tt===J&&(tt=Cr())),tt!==J)for(;tt!==J;)Ue.push(tt),tt=Ri(),tt===J&&(tt=Sr(),tt===J&&(tt=Cr()));else Ue=J;return Ue!==J&&(ni=Oe,Ue=ne(Ue)),Oe=Ue,Oe}function Jr(){var Oe,Ue;return Oe=ze,Ue=or(),Ue!==J&&(ni=Oe,Ue=oe(Ue)),Oe=Ue,Oe}function Yr(){var Oe,Ue;return Oe=ze,X.charCodeAt(ze)===35?(Ue=de,ze++):(Ue=J,At===0&&It(ue)),Ue!==J&&(ni=Oe,Ue=ce()),Oe=Ue,Oe}function Zr(){var Oe,Ue,tt,vt,Ot,Vt;return At++,Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J?(tt=ii(),tt!==J?(vt=Li(),vt!==J?(Ot=ii(),Ot!==J?(X.charCodeAt(ze)===125?(Vt=ge,ze++):(Vt=J,At===0&&It(be)),Vt!==J?(ni=Oe,Ue=me(vt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),At--,Oe===J&&(Ue=J,At===0&&It(he)),Oe}function mr(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,Ue=[],tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(ye.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(we))),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J),tt!==J)for(;tt!==J;)Ue.push(tt),tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(ye.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(we))),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J);else Ue=J;return Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(ve)),Oe}function br(){var Oe,Ue,tt;return At++,Oe=ze,X.charCodeAt(ze)===47?(Ue=Ce,ze++):(Ue=J,At===0&&It(Le)),Ue!==J?(tt=mr(),tt!==J?(ni=Oe,Ue=Pe(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),At--,Oe===J&&(Ue=J,At===0&&It(_e)),Oe}function vr(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,Ue=ii(),Ue!==J)if(tt=mr(),tt!==J){for(vt=[],Ot=br();Ot!==J;)vt.push(Ot),Ot=br();vt!==J?(ni=Oe,Ue=Fe(tt,vt),Oe=Ue):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;return At--,Oe===J&&(Ue=J,At===0&&It(Ie)),Oe}function Kr(){var Oe,Ue,tt;if(Oe=ze,Ue=[],tt=vr(),tt!==J)for(;tt!==J;)Ue.push(tt),tt=vr();else Ue=J;return Ue!==J&&(ni=Oe,Ue=qe(Ue)),Oe=Ue,Oe}function Qr(){var Oe,Ue,tt;return Oe=ze,X.substr(ze,2)===Ae?(Ue=Ae,ze+=2):(Ue=J,At===0&&It(De)),Ue!==J?(tt=Kr(),tt!==J?(ni=Oe,Ue=Me(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe===J&&(Oe=ze,ni=ze,Ue=Be(),Ue?Ue=void 0:Ue=J,Ue!==J?(tt=or(),tt!==J?(ni=Oe,Ue=Ve(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)),Oe}function Xr(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi;return Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J?(tt=ii(),tt!==J?(vt=Li(),vt!==J?(Ot=ii(),Ot!==J?(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J?(ui=ii(),ui!==J?(X.substr(ze,6)===kt?(ti=kt,ze+=6):(ti=J,At===0&&It(Qe)),ti!==J?(ki=ii(),ki!==J?(ri=ze,X.charCodeAt(ze)===44?(gi=Je,ze++):(gi=J,At===0&&It(Ye)),gi!==J?(oi=ii(),oi!==J?(hi=Qr(),hi!==J?(gi=[gi,oi,hi],ri=gi):(ze=ri,ri=J)):(ze=ri,ri=J)):(ze=ri,ri=J),ri===J&&(ri=null),ri!==J?(gi=ii(),gi!==J?(X.charCodeAt(ze)===125?(oi=ge,ze++):(oi=J,At===0&&It(be)),oi!==J?(ni=Oe,Ue=We(vt,ti,ri),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function _r(){var Oe,Ue,tt,vt;if(Oe=ze,X.charCodeAt(ze)===39?(Ue=Ne,ze++):(Ue=J,At===0&&It(He)),Ue!==J){if(tt=[],vt=Ri(),vt===J&&(Ge.test(X.charAt(ze))?(vt=X.charAt(ze),ze++):(vt=J,At===0&&It(Xe))),vt!==J)for(;vt!==J;)tt.push(vt),vt=Ri(),vt===J&&(Ge.test(X.charAt(ze))?(vt=X.charAt(ze),ze++):(vt=J,At===0&&It(Xe)));else tt=J;tt!==J?(X.charCodeAt(ze)===39?(vt=Ne,ze++):(vt=J,At===0&&It(He)),vt!==J?(Ue=[Ue,tt,vt],Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;if(Oe===J)if(Oe=[],Ue=Ri(),Ue===J&&(Ke.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(je))),Ue!==J)for(;Ue!==J;)Oe.push(Ue),Ue=Ri(),Ue===J&&(Ke.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(je)));else Oe=J;return Oe}function yr(){var Oe,Ue;if(Oe=[],Ze.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(nt)),Ue!==J)for(;Ue!==J;)Oe.push(Ue),Ze.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(nt));else Oe=J;return Oe}function es(){var Oe,Ue,tt,vt;if(Oe=ze,Ue=ze,tt=[],vt=_r(),vt===J&&(vt=yr()),vt!==J)for(;vt!==J;)tt.push(vt),vt=_r(),vt===J&&(vt=yr());else tt=J;return tt!==J?Ue=X.substring(Ue,ze):Ue=tt,Ue!==J&&(ni=Oe,Ue=ot(Ue)),Oe=Ue,Oe}function ts(){var Oe,Ue,tt;return Oe=ze,X.substr(ze,2)===Ae?(Ue=Ae,ze+=2):(Ue=J,At===0&&It(De)),Ue!==J?(tt=es(),tt!==J?(ni=Oe,Ue=Me(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe===J&&(Oe=ze,ni=ze,Ue=Ct(),Ue?Ue=void 0:Ue=J,Ue!==J?(tt=or(),tt!==J?(ni=Oe,Ue=Ve(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)),Oe}function rs(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi;return Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J?(tt=ii(),tt!==J?(vt=Li(),vt!==J?(Ot=ii(),Ot!==J?(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J?(ui=ii(),ui!==J?(X.substr(ze,4)===Lt?(ti=Lt,ze+=4):(ti=J,At===0&&It(Bt)),ti===J&&(X.substr(ze,4)===jt?(ti=jt,ze+=4):(ti=J,At===0&&It(Kt))),ti!==J?(ki=ii(),ki!==J?(ri=ze,X.charCodeAt(ze)===44?(gi=Je,ze++):(gi=J,At===0&&It(Ye)),gi!==J?(oi=ii(),oi!==J?(hi=ts(),hi!==J?(gi=[gi,oi,hi],ri=gi):(ze=ri,ri=J)):(ze=ri,ri=J)):(ze=ri,ri=J),ri===J&&(ri=null),ri!==J?(gi=ii(),gi!==J?(X.charCodeAt(ze)===125?(oi=ge,ze++):(oi=J,At===0&&It(be)),oi!==J?(ni=Oe,Ue=We(vt,ti,ri),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function ss(){var Oe;return Oe=Xr(),Oe===J&&(Oe=rs()),Oe}function ns(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi,Ci,Oi,lr;if(Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J)if(tt=ii(),tt!==J)if(vt=Li(),vt!==J)if(Ot=ii(),Ot!==J)if(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J)if(ui=ii(),ui!==J)if(X.substr(ze,6)===ei?(ti=ei,ze+=6):(ti=J,At===0&&It(mi)),ti===J&&(X.substr(ze,13)===di?(ti=di,ze+=13):(ti=J,At===0&&It(xt))),ti!==J)if(ki=ii(),ki!==J)if(X.charCodeAt(ze)===44?(ri=Je,ze++):(ri=J,At===0&&It(Ye)),ri!==J)if(gi=ii(),gi!==J)if(oi=ze,X.substr(ze,7)===St?(hi=St,ze+=7):(hi=J,At===0&&It(qt)),hi!==J?(Ci=ii(),Ci!==J?(Oi=kr(),Oi!==J?(hi=[hi,Ci,Oi],oi=hi):(ze=oi,oi=J)):(ze=oi,oi=J)):(ze=oi,oi=J),oi===J&&(oi=null),oi!==J)if(hi=ii(),hi!==J){if(Ci=[],Oi=wr(),Oi!==J)for(;Oi!==J;)Ci.push(Oi),Oi=wr();else Ci=J;Ci!==J?(Oi=ii(),Oi!==J?(X.charCodeAt(ze)===125?(lr=ge,ze++):(lr=J,At===0&&It(be)),lr!==J?(ni=Oe,Ue=Dt(vt,ti,oi,Ci),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;return Oe}function os(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi,Ci;if(Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J)if(tt=ii(),tt!==J)if(vt=Li(),vt!==J)if(Ot=ii(),Ot!==J)if(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J)if(ui=ii(),ui!==J)if(X.substr(ze,6)===Tt?(ti=Tt,ze+=6):(ti=J,At===0&&It(Gt)),ti!==J)if(ki=ii(),ki!==J)if(X.charCodeAt(ze)===44?(ri=Je,ze++):(ri=J,At===0&&It(Ye)),ri!==J)if(gi=ii(),gi!==J){if(oi=[],hi=$r(),hi!==J)for(;hi!==J;)oi.push(hi),hi=$r();else oi=J;oi!==J?(hi=ii(),hi!==J?(X.charCodeAt(ze)===125?(Ci=ge,ze++):(Ci=J,At===0&&It(be)),Ci!==J?(ni=Oe,Ue=Wt(vt,oi),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;return Oe}function as(){var Oe,Ue,tt,vt;return Oe=ze,Ue=ze,X.charCodeAt(ze)===61?(tt=Yt,ze++):(tt=J,At===0&&It(pi)),tt!==J?(vt=kr(),vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)):(ze=Ue,Ue=J),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,Oe===J&&(Oe=ar()),Oe}function $r(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti;return Oe=ze,Ue=ii(),Ue!==J?(tt=ar(),tt!==J?(vt=ii(),vt!==J?(X.charCodeAt(ze)===123?(Ot=pe,ze++):(Ot=J,At===0&&It(fe)),Ot!==J?(ni=ze,Vt=yi(),Vt?Vt=void 0:Vt=J,Vt!==J?(ui=nr(),ui!==J?(X.charCodeAt(ze)===125?(ti=ge,ze++):(ti=J,At===0&&It(be)),ti!==J?(ni=Oe,Ue=ai(tt,ui),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function wr(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti;return Oe=ze,Ue=ii(),Ue!==J?(tt=as(),tt!==J?(vt=ii(),vt!==J?(X.charCodeAt(ze)===123?(Ot=pe,ze++):(Ot=J,At===0&&It(fe)),Ot!==J?(ni=ze,Vt=Ii(),Vt?Vt=void 0:Vt=J,Vt!==J?(ui=nr(),ui!==J?(X.charCodeAt(ze)===125?(ti=ge,ze++):(ti=J,At===0&&It(be)),ti!==J?(ni=Oe,Ue=ci(tt,ui),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function Di(){var Oe;return At++,ft.test(X.charAt(ze))?(Oe=X.charAt(ze),ze++):(Oe=J,At===0&&It(Et)),At--,Oe===J&&At===0&&It(it),Oe}function xr(){var Oe;return At++,Ut.test(X.charAt(ze))?(Oe=X.charAt(ze),ze++):(Oe=J,At===0&&It(vi)),At--,Oe===J&&At===0&&It(Pt),Oe}function ii(){var Oe,Ue,tt;for(At++,Oe=ze,Ue=[],tt=Di();tt!==J;)Ue.push(tt),tt=Di();return Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(bi)),Oe}function kr(){var Oe,Ue,tt;return At++,Oe=ze,X.charCodeAt(ze)===45?(Ue=Mt,ze++):(Ue=J,At===0&&It(Nt)),Ue===J&&(Ue=null),Ue!==J?(tt=Er(),tt!==J?(ni=Oe,Ue=Ft(Ue,tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),At--,Oe===J&&(Ue=J,At===0&&It(Xt)),Oe}function Ri(){var Oe,Ue;return At++,Oe=ze,X.substr(ze,2)===Zt?(Ue=Zt,ze+=2):(Ue=J,At===0&&It(li)),Ue!==J&&(ni=Oe,Ue=fi()),Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(Ht)),Oe}function Sr(){var Oe,Ue,tt,vt,Ot,Vt;if(Oe=ze,X.charCodeAt(ze)===39?(Ue=Ne,ze++):(Ue=J,At===0&&It(He)),Ue!==J)if(tt=ls(),tt!==J){for(vt=ze,Ot=[],X.substr(ze,2)===Zt?(Vt=Zt,ze+=2):(Vt=J,At===0&&It(li)),Vt===J&&(Ge.test(X.charAt(ze))?(Vt=X.charAt(ze),ze++):(Vt=J,At===0&&It(Xe)));Vt!==J;)Ot.push(Vt),X.substr(ze,2)===Zt?(Vt=Zt,ze+=2):(Vt=J,At===0&&It(li)),Vt===J&&(Ge.test(X.charAt(ze))?(Vt=X.charAt(ze),ze++):(Vt=J,At===0&&It(Xe)));Ot!==J?vt=X.substring(vt,ze):vt=Ot,vt!==J?(X.charCodeAt(ze)===39?(Ot=Ne,ze++):(Ot=J,At===0&&It(He)),Ot===J&&(Ot=null),Ot!==J?(ni=Oe,Ue=xi(tt,vt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;return Oe}function Cr(){var Oe,Ue,tt,vt;return Oe=ze,Ue=ze,X.length>ze?(tt=X.charAt(ze),ze++):(tt=J,At===0&&It(Se)),tt!==J?(ni=ze,vt=Ni(tt),vt?vt=void 0:vt=J,vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)):(ze=Ue,Ue=J),Ue===J&&(X.charCodeAt(ze)===10?(Ue=Xi,ze++):(Ue=J,At===0&&It(ir))),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,Oe}function ls(){var Oe,Ue,tt,vt;return Oe=ze,Ue=ze,X.length>ze?(tt=X.charAt(ze),ze++):(tt=J,At===0&&It(Se)),tt!==J?(ni=ze,vt=Rr(tt),vt?vt=void 0:vt=J,vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)):(ze=Ue,Ue=J),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,Oe}function Li(){var Oe,Ue;return At++,Oe=ze,Ue=Er(),Ue===J&&(Ue=ar()),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(Ir)),Oe}function Er(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,X.charCodeAt(ze)===48?(Ue=Mr,ze++):(Ue=J,At===0&&It(Nr)),Ue!==J&&(ni=Oe,Ue=zr()),Oe=Ue,Oe===J){if(Oe=ze,Ue=ze,Fr.test(X.charAt(ze))?(tt=X.charAt(ze),ze++):(tt=J,At===0&&It(Hr)),tt!==J){for(vt=[],dr.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(cr));Ot!==J;)vt.push(Ot),dr.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(cr));vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)}else ze=Ue,Ue=J;Ue!==J&&(ni=Oe,Ue=Br(Ue)),Oe=Ue}return At--,Oe===J&&(Ue=J,At===0&&It(Lr)),Oe}function ar(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,Ue=[],tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(Ot=xr()),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J),tt!==J)for(;tt!==J;)Ue.push(tt),tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(Ot=xr()),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J);else Ue=J;return Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(Ur)),Oe}var Ai=["root"];function ds(){return Ai.length>1}function Ar(){return Ai[Ai.length-1]==="plural"}function Ti(){return W&&W.captureLocation?{location:sr()}:{}}if(Fi=re(),Fi!==J&&ze===X.length)return Fi;throw Fi!==J&&ze<X.length&&It(Vr()),Gr(rr,Ei<X.length?X.charAt(Ei):null,Ei<X.length?Hi(Ei,Ei+1):Hi(Ei,Ei))}var pegParse=peg$parse,__spreadArrays$2=function(){for(var X=0,W=0,J=arguments.length;W<J;W++)X+=arguments[W].length;for(var te=Array(X),re=0,W=0;W<J;W++)for(var ne=arguments[W],oe=0,de=ne.length;oe<de;oe++,re++)te[re]=ne[oe];return te},PLURAL_HASHTAG_REGEX=/(^|[^\\])#/g;function normalizeHashtagInPlural(X){X.forEach(function(W){!isPluralElement(W)&&!isSelectElement(W)||Object.keys(W.options).forEach(function(J){for(var te,re=W.options[J],ne=-1,oe=void 0,de=0;de<re.value.length;de++){var ue=re.value[de];if(isLiteralElement(ue)&&PLURAL_HASHTAG_REGEX.test(ue.value)){ne=de,oe=ue;break}}if(oe){var ce=oe.value.replace(PLURAL_HASHTAG_REGEX,"$1{"+W.value+", number}"),he=pegParse(ce);(te=re.value).splice.apply(te,__spreadArrays$2([ne,1],he))}normalizeHashtagInPlural(re.value)})})}var __assign$3=function(){return __assign$3=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign$3.apply(this,arguments)},DATE_TIME_REGEX=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function parseDateTimeSkeleton(X){var W={};return X.replace(DATE_TIME_REGEX,function(J){var te=J.length;switch(J[0]){case"G":W.era=te===4?"long":te===5?"narrow":"short";break;case"y":W.year=te===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":W.month=["numeric","2-digit","short","long","narrow"][te-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":W.day=["numeric","2-digit"][te-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":W.weekday=te===4?"short":te===5?"narrow":"short";break;case"e":if(te<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");W.weekday=["short","long","narrow","short"][te-4];break;case"c":if(te<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");W.weekday=["short","long","narrow","short"][te-4];break;case"a":W.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":W.hourCycle="h12",W.hour=["numeric","2-digit"][te-1];break;case"H":W.hourCycle="h23",W.hour=["numeric","2-digit"][te-1];break;case"K":W.hourCycle="h11",W.hour=["numeric","2-digit"][te-1];break;case"k":W.hourCycle="h24",W.hour=["numeric","2-digit"][te-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":W.minute=["numeric","2-digit"][te-1];break;case"s":W.second=["numeric","2-digit"][te-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":W.timeZoneName=te<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead")}return""}),W}function icuUnitToEcma(X){return X.replace(/^(.*?)-/,"")}var FRACTION_PRECISION_REGEX=/^\.(?:(0+)(\+|#+)?)?$/g,SIGNIFICANT_PRECISION_REGEX=/^(@+)?(\+|#+)?$/g;function parseSignificantPrecision(X){var W={};return X.replace(SIGNIFICANT_PRECISION_REGEX,function(J,te,re){return typeof re!="string"?(W.minimumSignificantDigits=te.length,W.maximumSignificantDigits=te.length):re==="+"?W.minimumSignificantDigits=te.length:te[0]==="#"?W.maximumSignificantDigits=te.length:(W.minimumSignificantDigits=te.length,W.maximumSignificantDigits=te.length+(typeof re=="string"?re.length:0)),""}),W}function parseSign(X){switch(X){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":return{currencySign:"accounting"};case"sign-always":return{signDisplay:"always"};case"sign-accounting-always":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":return{signDisplay:"never"}}}function parseNotationOptions(X){var W={},J=parseSign(X);return J||W}function convertNumberSkeletonToNumberFormatOptions(X){for(var W={},J=0,te=X;J<te.length;J++){var re=te[J];switch(re.stem){case"percent":W.style="percent";continue;case"currency":W.style="currency",W.currency=re.options[0];continue;case"group-off":W.useGrouping=!1;continue;case"precision-integer":W.maximumFractionDigits=0;continue;case"measure-unit":W.style="unit",W.unit=icuUnitToEcma(re.options[0]);continue;case"compact-short":W.notation="compact",W.compactDisplay="short";continue;case"compact-long":W.notation="compact",W.compactDisplay="long";continue;case"scientific":W=__assign$3(__assign$3(__assign$3({},W),{notation:"scientific"}),re.options.reduce(function(oe,de){return __assign$3(__assign$3({},oe),parseNotationOptions(de))},{}));continue;case"engineering":W=__assign$3(__assign$3(__assign$3({},W),{notation:"engineering"}),re.options.reduce(function(oe,de){return __assign$3(__assign$3({},oe),parseNotationOptions(de))},{}));continue;case"notation-simple":W.notation="standard";continue;case"unit-width-narrow":W.currencyDisplay="narrowSymbol",W.unitDisplay="narrow";continue;case"unit-width-short":W.currencyDisplay="code",W.unitDisplay="short";continue;case"unit-width-full-name":W.currencyDisplay="name",W.unitDisplay="long";continue;case"unit-width-iso-code":W.currencyDisplay="symbol";continue}if(FRACTION_PRECISION_REGEX.test(re.stem)){if(re.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");re.stem.replace(FRACTION_PRECISION_REGEX,function(oe,de,ue){return oe==="."?W.maximumFractionDigits=0:ue==="+"?W.minimumFractionDigits=ue.length:de[0]==="#"?W.maximumFractionDigits=de.length:(W.minimumFractionDigits=de.length,W.maximumFractionDigits=de.length+(typeof ue=="string"?ue.length:0)),""}),re.options.length&&(W=__assign$3(__assign$3({},W),parseSignificantPrecision(re.options[0])));continue}if(SIGNIFICANT_PRECISION_REGEX.test(re.stem)){W=__assign$3(__assign$3({},W),parseSignificantPrecision(re.stem));continue}var ne=parseSign(re.stem);ne&&(W=__assign$3(__assign$3({},W),ne))}return W}function parse$1(X,W){var J=pegParse(X,W);return(!W||W.normalizeHashtagInPlural!==!1)&&normalizeHashtagInPlural(J),J}var __spreadArrays$1=function(){for(var X=0,W=0,J=arguments.length;W<J;W++)X+=arguments[W].length;for(var te=Array(X),re=0,W=0;W<J;W++)for(var ne=arguments[W],oe=0,de=ne.length;oe<de;oe++,re++)te[re]=ne[oe];return te};function getCacheId(X){return JSON.stringify(X.map(function(W){return W&&typeof W=="object"?orderedProps(W):W}))}function orderedProps(X){return Object.keys(X).sort().map(function(W){var J;return J={},J[W]=X[W],J})}var memoizeFormatConstructor=function(X,W){return W===void 0&&(W={}),function(){for(var J,te=[],re=0;re<arguments.length;re++)te[re]=arguments[re];var ne=getCacheId(te),oe=ne&&W[ne];return oe||(oe=new((J=X).bind.apply(J,__spreadArrays$1([void 0],te))),ne&&(W[ne]=oe)),oe}},__extends=function(){var X=function(W,J){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,re){te.__proto__=re}||function(te,re){for(var ne in re)re.hasOwnProperty(ne)&&(te[ne]=re[ne])},X(W,J)};return function(W,J){X(W,J);function te(){this.constructor=W}W.prototype=J===null?Object.create(J):(te.prototype=J.prototype,new te)}}(),__spreadArrays=function(){for(var X=0,W=0,J=arguments.length;W<J;W++)X+=arguments[W].length;for(var te=Array(X),re=0,W=0;W<J;W++)for(var ne=arguments[W],oe=0,de=ne.length;oe<de;oe++,re++)te[re]=ne[oe];return te},FormatError=function(X){__extends(W,X);function W(J,te){var re=X.call(this,J)||this;return re.variableId=te,re}return W}(Error);function mergeLiteral(X){return X.length<2?X:X.reduce(function(W,J){var te=W[W.length-1];return!te||te.type!==0||J.type!==0?W.push(J):te.value+=J.value,W},[])}function formatToParts(X,W,J,te,re,ne,oe){if(X.length===1&&isLiteralElement(X[0]))return[{type:0,value:X[0].value}];for(var de=[],ue=0,ce=X;ue<ce.length;ue++){var he=ce[ue];if(isLiteralElement(he)){de.push({type:0,value:he.value});continue}if(isPoundElement(he)){typeof ne=="number"&&de.push({type:0,value:J.getNumberFormat(W).format(ne)});continue}var pe=he.value;if(!(re&&pe in re))throw new FormatError('The intl string context variable "'+pe+'" was not provided to the string "'+oe+'"');var fe=re[pe];if(isArgumentElement(he)){(!fe||typeof fe=="string"||typeof fe=="number")&&(fe=typeof fe=="string"||typeof fe=="number"?String(fe):""),de.push({type:1,value:fe});continue}if(isDateElement(he)){var ge=typeof he.style=="string"?te.date[he.style]:void 0;de.push({type:0,value:J.getDateTimeFormat(W,ge).format(fe)});continue}if(isTimeElement(he)){var ge=typeof he.style=="string"?te.time[he.style]:isDateTimeSkeleton(he.style)?parseDateTimeSkeleton(he.style.pattern):void 0;de.push({type:0,value:J.getDateTimeFormat(W,ge).format(fe)});continue}if(isNumberElement(he)){var ge=typeof he.style=="string"?te.number[he.style]:isNumberSkeleton(he.style)?convertNumberSkeletonToNumberFormatOptions(he.style.tokens):void 0;de.push({type:0,value:J.getNumberFormat(W,ge).format(fe)});continue}if(isSelectElement(he)){var be=he.options[fe]||he.options.other;if(!be)throw new RangeError('Invalid values for "'+he.value+'": "'+fe+'". Options are "'+Object.keys(he.options).join('", "')+'"');de.push.apply(de,formatToParts(be.value,W,J,te,re));continue}if(isPluralElement(he)){var be=he.options["="+fe];if(!be){if(!Intl.PluralRules)throw new FormatError(`Intl.PluralRules is not available in this environment.
|
|
194
|
+
`,!1),Rr=function(Oe){return Oe==="{"||Oe==="}"||Ar()&&Oe==="#"},Ir=Si("argNameOrNumber"),Lr=Si("argNumber"),Mr="0",Fr=_i("0",!1),zr=function(){return 0},Nr=/^[1-9]/,Hr=Pi([["1","9"]],!1,!1),dr=/^[0-9]/,cr=Pi([["0","9"]],!1,!1),Br=function(Oe){return parseInt(Oe.join(""),10)},Ur=Si("argName"),ze=0,ni=0,zi=[{line:1,column:1}],Ei=0,rr=[],At=0,Ni;if(W.startRule!==void 0){if(!(W.startRule in te))throw new Error(`Can't start parsing from rule "`+W.startRule+'".');re=te[W.startRule]}function ur(){return X.substring(ni,ze)}function sr(){return Hi(ni,ze)}function hr(Oe,Ue){throw Ue=Ue!==void 0?Ue:Hi(ni,ze),Wr(Oe,Ue)}function _i(Oe,Ue){return{type:"literal",text:Oe,ignoreCase:Ue}}function Pi(Oe,Ue,tt){return{type:"class",parts:Oe,inverted:Ue,ignoreCase:tt}}function jr(){return{type:"any"}}function Vr(){return{type:"end"}}function Si(Oe){return{type:"other",description:Oe}}function pr(Oe){var Ue=zi[Oe],tt;if(Ue)return Ue;for(tt=Oe-1;!zi[tt];)tt--;for(Ue=zi[tt],Ue={line:Ue.line,column:Ue.column};tt<Oe;)X.charCodeAt(tt)===10?(Ue.line++,Ue.column=1):Ue.column++,tt++;return zi[Oe]=Ue,Ue}function Hi(Oe,Ue){var tt=pr(Oe),vt=pr(Ue);return{start:{offset:Oe,line:tt.line,column:tt.column},end:{offset:Ue,line:vt.line,column:vt.column}}}function It(Oe){ze<Ei||(ze>Ei&&(Ei=ze,rr=[]),rr.push(Oe))}function Wr(Oe,Ue){return new SyntaxError(Oe,[],"",Ue)}function Gr(Oe,Ue,tt){return new SyntaxError(SyntaxError.buildMessage(Oe,Ue),Oe,Ue,tt)}function fr(){var Oe;return Oe=nr(),Oe}function nr(){var Oe,Ue;for(Oe=[],Ue=gr();Ue!==J;)Oe.push(Ue),Ue=gr();return Oe}function gr(){var Oe;return Oe=Jr(),Oe===J&&(Oe=Zr(),Oe===J&&(Oe=ss(),Oe===J&&(Oe=ns(),Oe===J&&(Oe=os(),Oe===J&&(Oe=Yr()))))),Oe}function or(){var Oe,Ue,tt;if(Oe=ze,Ue=[],tt=Ri(),tt===J&&(tt=Sr(),tt===J&&(tt=Cr())),tt!==J)for(;tt!==J;)Ue.push(tt),tt=Ri(),tt===J&&(tt=Sr(),tt===J&&(tt=Cr()));else Ue=J;return Ue!==J&&(ni=Oe,Ue=ne(Ue)),Oe=Ue,Oe}function Jr(){var Oe,Ue;return Oe=ze,Ue=or(),Ue!==J&&(ni=Oe,Ue=oe(Ue)),Oe=Ue,Oe}function Yr(){var Oe,Ue;return Oe=ze,X.charCodeAt(ze)===35?(Ue=de,ze++):(Ue=J,At===0&&It(ue)),Ue!==J&&(ni=Oe,Ue=ce()),Oe=Ue,Oe}function Zr(){var Oe,Ue,tt,vt,Ot,Vt;return At++,Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J?(tt=ii(),tt!==J?(vt=Li(),vt!==J?(Ot=ii(),Ot!==J?(X.charCodeAt(ze)===125?(Vt=ge,ze++):(Vt=J,At===0&&It(be)),Vt!==J?(ni=Oe,Ue=me(vt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),At--,Oe===J&&(Ue=J,At===0&&It(he)),Oe}function mr(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,Ue=[],tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(ye.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(we))),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J),tt!==J)for(;tt!==J;)Ue.push(tt),tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(ye.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(we))),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J);else Ue=J;return Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(ve)),Oe}function br(){var Oe,Ue,tt;return At++,Oe=ze,X.charCodeAt(ze)===47?(Ue=Ce,ze++):(Ue=J,At===0&&It(Le)),Ue!==J?(tt=mr(),tt!==J?(ni=Oe,Ue=Pe(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),At--,Oe===J&&(Ue=J,At===0&&It(_e)),Oe}function vr(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,Ue=ii(),Ue!==J)if(tt=mr(),tt!==J){for(vt=[],Ot=br();Ot!==J;)vt.push(Ot),Ot=br();vt!==J?(ni=Oe,Ue=Ne(tt,vt),Oe=Ue):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;return At--,Oe===J&&(Ue=J,At===0&&It(Ie)),Oe}function Kr(){var Oe,Ue,tt;if(Oe=ze,Ue=[],tt=vr(),tt!==J)for(;tt!==J;)Ue.push(tt),tt=vr();else Ue=J;return Ue!==J&&(ni=Oe,Ue=qe(Ue)),Oe=Ue,Oe}function Qr(){var Oe,Ue,tt;return Oe=ze,X.substr(ze,2)===Ae?(Ue=Ae,ze+=2):(Ue=J,At===0&&It(De)),Ue!==J?(tt=Kr(),tt!==J?(ni=Oe,Ue=Me(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe===J&&(Oe=ze,ni=ze,Ue=Be(),Ue?Ue=void 0:Ue=J,Ue!==J?(tt=or(),tt!==J?(ni=Oe,Ue=Ve(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)),Oe}function Xr(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi;return Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J?(tt=ii(),tt!==J?(vt=Li(),vt!==J?(Ot=ii(),Ot!==J?(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J?(ui=ii(),ui!==J?(X.substr(ze,6)===kt?(ti=kt,ze+=6):(ti=J,At===0&&It(Qe)),ti!==J?(ki=ii(),ki!==J?(ri=ze,X.charCodeAt(ze)===44?(gi=Je,ze++):(gi=J,At===0&&It(Ye)),gi!==J?(oi=ii(),oi!==J?(hi=Qr(),hi!==J?(gi=[gi,oi,hi],ri=gi):(ze=ri,ri=J)):(ze=ri,ri=J)):(ze=ri,ri=J),ri===J&&(ri=null),ri!==J?(gi=ii(),gi!==J?(X.charCodeAt(ze)===125?(oi=ge,ze++):(oi=J,At===0&&It(be)),oi!==J?(ni=Oe,Ue=We(vt,ti,ri),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function _r(){var Oe,Ue,tt,vt;if(Oe=ze,X.charCodeAt(ze)===39?(Ue=Fe,ze++):(Ue=J,At===0&&It(He)),Ue!==J){if(tt=[],vt=Ri(),vt===J&&(Ge.test(X.charAt(ze))?(vt=X.charAt(ze),ze++):(vt=J,At===0&&It(Xe))),vt!==J)for(;vt!==J;)tt.push(vt),vt=Ri(),vt===J&&(Ge.test(X.charAt(ze))?(vt=X.charAt(ze),ze++):(vt=J,At===0&&It(Xe)));else tt=J;tt!==J?(X.charCodeAt(ze)===39?(vt=Fe,ze++):(vt=J,At===0&&It(He)),vt!==J?(Ue=[Ue,tt,vt],Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;if(Oe===J)if(Oe=[],Ue=Ri(),Ue===J&&(Ke.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(je))),Ue!==J)for(;Ue!==J;)Oe.push(Ue),Ue=Ri(),Ue===J&&(Ke.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(je)));else Oe=J;return Oe}function yr(){var Oe,Ue;if(Oe=[],Ze.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(nt)),Ue!==J)for(;Ue!==J;)Oe.push(Ue),Ze.test(X.charAt(ze))?(Ue=X.charAt(ze),ze++):(Ue=J,At===0&&It(nt));else Oe=J;return Oe}function es(){var Oe,Ue,tt,vt;if(Oe=ze,Ue=ze,tt=[],vt=_r(),vt===J&&(vt=yr()),vt!==J)for(;vt!==J;)tt.push(vt),vt=_r(),vt===J&&(vt=yr());else tt=J;return tt!==J?Ue=X.substring(Ue,ze):Ue=tt,Ue!==J&&(ni=Oe,Ue=ot(Ue)),Oe=Ue,Oe}function ts(){var Oe,Ue,tt;return Oe=ze,X.substr(ze,2)===Ae?(Ue=Ae,ze+=2):(Ue=J,At===0&&It(De)),Ue!==J?(tt=es(),tt!==J?(ni=Oe,Ue=Me(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe===J&&(Oe=ze,ni=ze,Ue=Ct(),Ue?Ue=void 0:Ue=J,Ue!==J?(tt=or(),tt!==J?(ni=Oe,Ue=Ve(tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)),Oe}function rs(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi;return Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J?(tt=ii(),tt!==J?(vt=Li(),vt!==J?(Ot=ii(),Ot!==J?(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J?(ui=ii(),ui!==J?(X.substr(ze,4)===Lt?(ti=Lt,ze+=4):(ti=J,At===0&&It(Bt)),ti===J&&(X.substr(ze,4)===jt?(ti=jt,ze+=4):(ti=J,At===0&&It(Kt))),ti!==J?(ki=ii(),ki!==J?(ri=ze,X.charCodeAt(ze)===44?(gi=Je,ze++):(gi=J,At===0&&It(Ye)),gi!==J?(oi=ii(),oi!==J?(hi=ts(),hi!==J?(gi=[gi,oi,hi],ri=gi):(ze=ri,ri=J)):(ze=ri,ri=J)):(ze=ri,ri=J),ri===J&&(ri=null),ri!==J?(gi=ii(),gi!==J?(X.charCodeAt(ze)===125?(oi=ge,ze++):(oi=J,At===0&&It(be)),oi!==J?(ni=Oe,Ue=We(vt,ti,ri),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function ss(){var Oe;return Oe=Xr(),Oe===J&&(Oe=rs()),Oe}function ns(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi,Ci,Oi,lr;if(Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J)if(tt=ii(),tt!==J)if(vt=Li(),vt!==J)if(Ot=ii(),Ot!==J)if(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J)if(ui=ii(),ui!==J)if(X.substr(ze,6)===ei?(ti=ei,ze+=6):(ti=J,At===0&&It(mi)),ti===J&&(X.substr(ze,13)===di?(ti=di,ze+=13):(ti=J,At===0&&It(xt))),ti!==J)if(ki=ii(),ki!==J)if(X.charCodeAt(ze)===44?(ri=Je,ze++):(ri=J,At===0&&It(Ye)),ri!==J)if(gi=ii(),gi!==J)if(oi=ze,X.substr(ze,7)===St?(hi=St,ze+=7):(hi=J,At===0&&It(qt)),hi!==J?(Ci=ii(),Ci!==J?(Oi=kr(),Oi!==J?(hi=[hi,Ci,Oi],oi=hi):(ze=oi,oi=J)):(ze=oi,oi=J)):(ze=oi,oi=J),oi===J&&(oi=null),oi!==J)if(hi=ii(),hi!==J){if(Ci=[],Oi=wr(),Oi!==J)for(;Oi!==J;)Ci.push(Oi),Oi=wr();else Ci=J;Ci!==J?(Oi=ii(),Oi!==J?(X.charCodeAt(ze)===125?(lr=ge,ze++):(lr=J,At===0&&It(be)),lr!==J?(ni=Oe,Ue=Dt(vt,ti,oi,Ci),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;return Oe}function os(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti,ki,ri,gi,oi,hi,Ci;if(Oe=ze,X.charCodeAt(ze)===123?(Ue=pe,ze++):(Ue=J,At===0&&It(fe)),Ue!==J)if(tt=ii(),tt!==J)if(vt=Li(),vt!==J)if(Ot=ii(),Ot!==J)if(X.charCodeAt(ze)===44?(Vt=Je,ze++):(Vt=J,At===0&&It(Ye)),Vt!==J)if(ui=ii(),ui!==J)if(X.substr(ze,6)===Tt?(ti=Tt,ze+=6):(ti=J,At===0&&It(Gt)),ti!==J)if(ki=ii(),ki!==J)if(X.charCodeAt(ze)===44?(ri=Je,ze++):(ri=J,At===0&&It(Ye)),ri!==J)if(gi=ii(),gi!==J){if(oi=[],hi=$r(),hi!==J)for(;hi!==J;)oi.push(hi),hi=$r();else oi=J;oi!==J?(hi=ii(),hi!==J?(X.charCodeAt(ze)===125?(Ci=ge,ze++):(Ci=J,At===0&&It(be)),Ci!==J?(ni=Oe,Ue=Wt(vt,oi),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;else ze=Oe,Oe=J;return Oe}function as(){var Oe,Ue,tt,vt;return Oe=ze,Ue=ze,X.charCodeAt(ze)===61?(tt=Yt,ze++):(tt=J,At===0&&It(pi)),tt!==J?(vt=kr(),vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)):(ze=Ue,Ue=J),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,Oe===J&&(Oe=ar()),Oe}function $r(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti;return Oe=ze,Ue=ii(),Ue!==J?(tt=ar(),tt!==J?(vt=ii(),vt!==J?(X.charCodeAt(ze)===123?(Ot=pe,ze++):(Ot=J,At===0&&It(fe)),Ot!==J?(ni=ze,Vt=yi(),Vt?Vt=void 0:Vt=J,Vt!==J?(ui=nr(),ui!==J?(X.charCodeAt(ze)===125?(ti=ge,ze++):(ti=J,At===0&&It(be)),ti!==J?(ni=Oe,Ue=ai(tt,ui),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function wr(){var Oe,Ue,tt,vt,Ot,Vt,ui,ti;return Oe=ze,Ue=ii(),Ue!==J?(tt=as(),tt!==J?(vt=ii(),vt!==J?(X.charCodeAt(ze)===123?(Ot=pe,ze++):(Ot=J,At===0&&It(fe)),Ot!==J?(ni=ze,Vt=Ii(),Vt?Vt=void 0:Vt=J,Vt!==J?(ui=nr(),ui!==J?(X.charCodeAt(ze)===125?(ti=ge,ze++):(ti=J,At===0&&It(be)),ti!==J?(ni=Oe,Ue=ci(tt,ui),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),Oe}function Di(){var Oe;return At++,ft.test(X.charAt(ze))?(Oe=X.charAt(ze),ze++):(Oe=J,At===0&&It(Et)),At--,Oe===J&&At===0&&It(it),Oe}function xr(){var Oe;return At++,Ut.test(X.charAt(ze))?(Oe=X.charAt(ze),ze++):(Oe=J,At===0&&It(vi)),At--,Oe===J&&At===0&&It(Pt),Oe}function ii(){var Oe,Ue,tt;for(At++,Oe=ze,Ue=[],tt=Di();tt!==J;)Ue.push(tt),tt=Di();return Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(bi)),Oe}function kr(){var Oe,Ue,tt;return At++,Oe=ze,X.charCodeAt(ze)===45?(Ue=Mt,ze++):(Ue=J,At===0&&It(Ft)),Ue===J&&(Ue=null),Ue!==J?(tt=Er(),tt!==J?(ni=Oe,Ue=Nt(Ue,tt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J),At--,Oe===J&&(Ue=J,At===0&&It(Xt)),Oe}function Ri(){var Oe,Ue;return At++,Oe=ze,X.substr(ze,2)===Zt?(Ue=Zt,ze+=2):(Ue=J,At===0&&It(li)),Ue!==J&&(ni=Oe,Ue=fi()),Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(Ht)),Oe}function Sr(){var Oe,Ue,tt,vt,Ot,Vt;if(Oe=ze,X.charCodeAt(ze)===39?(Ue=Fe,ze++):(Ue=J,At===0&&It(He)),Ue!==J)if(tt=ls(),tt!==J){for(vt=ze,Ot=[],X.substr(ze,2)===Zt?(Vt=Zt,ze+=2):(Vt=J,At===0&&It(li)),Vt===J&&(Ge.test(X.charAt(ze))?(Vt=X.charAt(ze),ze++):(Vt=J,At===0&&It(Xe)));Vt!==J;)Ot.push(Vt),X.substr(ze,2)===Zt?(Vt=Zt,ze+=2):(Vt=J,At===0&&It(li)),Vt===J&&(Ge.test(X.charAt(ze))?(Vt=X.charAt(ze),ze++):(Vt=J,At===0&&It(Xe)));Ot!==J?vt=X.substring(vt,ze):vt=Ot,vt!==J?(X.charCodeAt(ze)===39?(Ot=Fe,ze++):(Ot=J,At===0&&It(He)),Ot===J&&(Ot=null),Ot!==J?(ni=Oe,Ue=xi(tt,vt),Oe=Ue):(ze=Oe,Oe=J)):(ze=Oe,Oe=J)}else ze=Oe,Oe=J;else ze=Oe,Oe=J;return Oe}function Cr(){var Oe,Ue,tt,vt;return Oe=ze,Ue=ze,X.length>ze?(tt=X.charAt(ze),ze++):(tt=J,At===0&&It(Se)),tt!==J?(ni=ze,vt=Fi(tt),vt?vt=void 0:vt=J,vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)):(ze=Ue,Ue=J),Ue===J&&(X.charCodeAt(ze)===10?(Ue=Xi,ze++):(Ue=J,At===0&&It(ir))),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,Oe}function ls(){var Oe,Ue,tt,vt;return Oe=ze,Ue=ze,X.length>ze?(tt=X.charAt(ze),ze++):(tt=J,At===0&&It(Se)),tt!==J?(ni=ze,vt=Rr(tt),vt?vt=void 0:vt=J,vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)):(ze=Ue,Ue=J),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,Oe}function Li(){var Oe,Ue;return At++,Oe=ze,Ue=Er(),Ue===J&&(Ue=ar()),Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(Ir)),Oe}function Er(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,X.charCodeAt(ze)===48?(Ue=Mr,ze++):(Ue=J,At===0&&It(Fr)),Ue!==J&&(ni=Oe,Ue=zr()),Oe=Ue,Oe===J){if(Oe=ze,Ue=ze,Nr.test(X.charAt(ze))?(tt=X.charAt(ze),ze++):(tt=J,At===0&&It(Hr)),tt!==J){for(vt=[],dr.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(cr));Ot!==J;)vt.push(Ot),dr.test(X.charAt(ze))?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(cr));vt!==J?(tt=[tt,vt],Ue=tt):(ze=Ue,Ue=J)}else ze=Ue,Ue=J;Ue!==J&&(ni=Oe,Ue=Br(Ue)),Oe=Ue}return At--,Oe===J&&(Ue=J,At===0&&It(Lr)),Oe}function ar(){var Oe,Ue,tt,vt,Ot;if(At++,Oe=ze,Ue=[],tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(Ot=xr()),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J),tt!==J)for(;tt!==J;)Ue.push(tt),tt=ze,vt=ze,At++,Ot=Di(),Ot===J&&(Ot=xr()),At--,Ot===J?vt=void 0:(ze=vt,vt=J),vt!==J?(X.length>ze?(Ot=X.charAt(ze),ze++):(Ot=J,At===0&&It(Se)),Ot!==J?(vt=[vt,Ot],tt=vt):(ze=tt,tt=J)):(ze=tt,tt=J);else Ue=J;return Ue!==J?Oe=X.substring(Oe,ze):Oe=Ue,At--,Oe===J&&(Ue=J,At===0&&It(Ur)),Oe}var Ai=["root"];function ds(){return Ai.length>1}function Ar(){return Ai[Ai.length-1]==="plural"}function Ti(){return W&&W.captureLocation?{location:sr()}:{}}if(Ni=re(),Ni!==J&&ze===X.length)return Ni;throw Ni!==J&&ze<X.length&&It(Vr()),Gr(rr,Ei<X.length?X.charAt(Ei):null,Ei<X.length?Hi(Ei,Ei+1):Hi(Ei,Ei))}var pegParse=peg$parse,__spreadArrays$2=function(){for(var X=0,W=0,J=arguments.length;W<J;W++)X+=arguments[W].length;for(var te=Array(X),re=0,W=0;W<J;W++)for(var ne=arguments[W],oe=0,de=ne.length;oe<de;oe++,re++)te[re]=ne[oe];return te},PLURAL_HASHTAG_REGEX=/(^|[^\\])#/g;function normalizeHashtagInPlural(X){X.forEach(function(W){!isPluralElement(W)&&!isSelectElement(W)||Object.keys(W.options).forEach(function(J){for(var te,re=W.options[J],ne=-1,oe=void 0,de=0;de<re.value.length;de++){var ue=re.value[de];if(isLiteralElement(ue)&&PLURAL_HASHTAG_REGEX.test(ue.value)){ne=de,oe=ue;break}}if(oe){var ce=oe.value.replace(PLURAL_HASHTAG_REGEX,"$1{"+W.value+", number}"),he=pegParse(ce);(te=re.value).splice.apply(te,__spreadArrays$2([ne,1],he))}normalizeHashtagInPlural(re.value)})})}var __assign$3=function(){return __assign$3=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign$3.apply(this,arguments)},DATE_TIME_REGEX=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function parseDateTimeSkeleton(X){var W={};return X.replace(DATE_TIME_REGEX,function(J){var te=J.length;switch(J[0]){case"G":W.era=te===4?"long":te===5?"narrow":"short";break;case"y":W.year=te===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":W.month=["numeric","2-digit","short","long","narrow"][te-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":W.day=["numeric","2-digit"][te-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":W.weekday=te===4?"short":te===5?"narrow":"short";break;case"e":if(te<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");W.weekday=["short","long","narrow","short"][te-4];break;case"c":if(te<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");W.weekday=["short","long","narrow","short"][te-4];break;case"a":W.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":W.hourCycle="h12",W.hour=["numeric","2-digit"][te-1];break;case"H":W.hourCycle="h23",W.hour=["numeric","2-digit"][te-1];break;case"K":W.hourCycle="h11",W.hour=["numeric","2-digit"][te-1];break;case"k":W.hourCycle="h24",W.hour=["numeric","2-digit"][te-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":W.minute=["numeric","2-digit"][te-1];break;case"s":W.second=["numeric","2-digit"][te-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":W.timeZoneName=te<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead")}return""}),W}function icuUnitToEcma(X){return X.replace(/^(.*?)-/,"")}var FRACTION_PRECISION_REGEX=/^\.(?:(0+)(\+|#+)?)?$/g,SIGNIFICANT_PRECISION_REGEX=/^(@+)?(\+|#+)?$/g;function parseSignificantPrecision(X){var W={};return X.replace(SIGNIFICANT_PRECISION_REGEX,function(J,te,re){return typeof re!="string"?(W.minimumSignificantDigits=te.length,W.maximumSignificantDigits=te.length):re==="+"?W.minimumSignificantDigits=te.length:te[0]==="#"?W.maximumSignificantDigits=te.length:(W.minimumSignificantDigits=te.length,W.maximumSignificantDigits=te.length+(typeof re=="string"?re.length:0)),""}),W}function parseSign(X){switch(X){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":return{currencySign:"accounting"};case"sign-always":return{signDisplay:"always"};case"sign-accounting-always":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":return{signDisplay:"never"}}}function parseNotationOptions(X){var W={},J=parseSign(X);return J||W}function convertNumberSkeletonToNumberFormatOptions(X){for(var W={},J=0,te=X;J<te.length;J++){var re=te[J];switch(re.stem){case"percent":W.style="percent";continue;case"currency":W.style="currency",W.currency=re.options[0];continue;case"group-off":W.useGrouping=!1;continue;case"precision-integer":W.maximumFractionDigits=0;continue;case"measure-unit":W.style="unit",W.unit=icuUnitToEcma(re.options[0]);continue;case"compact-short":W.notation="compact",W.compactDisplay="short";continue;case"compact-long":W.notation="compact",W.compactDisplay="long";continue;case"scientific":W=__assign$3(__assign$3(__assign$3({},W),{notation:"scientific"}),re.options.reduce(function(oe,de){return __assign$3(__assign$3({},oe),parseNotationOptions(de))},{}));continue;case"engineering":W=__assign$3(__assign$3(__assign$3({},W),{notation:"engineering"}),re.options.reduce(function(oe,de){return __assign$3(__assign$3({},oe),parseNotationOptions(de))},{}));continue;case"notation-simple":W.notation="standard";continue;case"unit-width-narrow":W.currencyDisplay="narrowSymbol",W.unitDisplay="narrow";continue;case"unit-width-short":W.currencyDisplay="code",W.unitDisplay="short";continue;case"unit-width-full-name":W.currencyDisplay="name",W.unitDisplay="long";continue;case"unit-width-iso-code":W.currencyDisplay="symbol";continue}if(FRACTION_PRECISION_REGEX.test(re.stem)){if(re.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");re.stem.replace(FRACTION_PRECISION_REGEX,function(oe,de,ue){return oe==="."?W.maximumFractionDigits=0:ue==="+"?W.minimumFractionDigits=ue.length:de[0]==="#"?W.maximumFractionDigits=de.length:(W.minimumFractionDigits=de.length,W.maximumFractionDigits=de.length+(typeof ue=="string"?ue.length:0)),""}),re.options.length&&(W=__assign$3(__assign$3({},W),parseSignificantPrecision(re.options[0])));continue}if(SIGNIFICANT_PRECISION_REGEX.test(re.stem)){W=__assign$3(__assign$3({},W),parseSignificantPrecision(re.stem));continue}var ne=parseSign(re.stem);ne&&(W=__assign$3(__assign$3({},W),ne))}return W}function parse$1(X,W){var J=pegParse(X,W);return(!W||W.normalizeHashtagInPlural!==!1)&&normalizeHashtagInPlural(J),J}var __spreadArrays$1=function(){for(var X=0,W=0,J=arguments.length;W<J;W++)X+=arguments[W].length;for(var te=Array(X),re=0,W=0;W<J;W++)for(var ne=arguments[W],oe=0,de=ne.length;oe<de;oe++,re++)te[re]=ne[oe];return te};function getCacheId(X){return JSON.stringify(X.map(function(W){return W&&typeof W=="object"?orderedProps(W):W}))}function orderedProps(X){return Object.keys(X).sort().map(function(W){var J;return J={},J[W]=X[W],J})}var memoizeFormatConstructor=function(X,W){return W===void 0&&(W={}),function(){for(var J,te=[],re=0;re<arguments.length;re++)te[re]=arguments[re];var ne=getCacheId(te),oe=ne&&W[ne];return oe||(oe=new((J=X).bind.apply(J,__spreadArrays$1([void 0],te))),ne&&(W[ne]=oe)),oe}},__extends=function(){var X=function(W,J){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,re){te.__proto__=re}||function(te,re){for(var ne in re)re.hasOwnProperty(ne)&&(te[ne]=re[ne])},X(W,J)};return function(W,J){X(W,J);function te(){this.constructor=W}W.prototype=J===null?Object.create(J):(te.prototype=J.prototype,new te)}}(),__spreadArrays=function(){for(var X=0,W=0,J=arguments.length;W<J;W++)X+=arguments[W].length;for(var te=Array(X),re=0,W=0;W<J;W++)for(var ne=arguments[W],oe=0,de=ne.length;oe<de;oe++,re++)te[re]=ne[oe];return te},FormatError=function(X){__extends(W,X);function W(J,te){var re=X.call(this,J)||this;return re.variableId=te,re}return W}(Error);function mergeLiteral(X){return X.length<2?X:X.reduce(function(W,J){var te=W[W.length-1];return!te||te.type!==0||J.type!==0?W.push(J):te.value+=J.value,W},[])}function formatToParts(X,W,J,te,re,ne,oe){if(X.length===1&&isLiteralElement(X[0]))return[{type:0,value:X[0].value}];for(var de=[],ue=0,ce=X;ue<ce.length;ue++){var he=ce[ue];if(isLiteralElement(he)){de.push({type:0,value:he.value});continue}if(isPoundElement(he)){typeof ne=="number"&&de.push({type:0,value:J.getNumberFormat(W).format(ne)});continue}var pe=he.value;if(!(re&&pe in re))throw new FormatError('The intl string context variable "'+pe+'" was not provided to the string "'+oe+'"');var fe=re[pe];if(isArgumentElement(he)){(!fe||typeof fe=="string"||typeof fe=="number")&&(fe=typeof fe=="string"||typeof fe=="number"?String(fe):""),de.push({type:1,value:fe});continue}if(isDateElement(he)){var ge=typeof he.style=="string"?te.date[he.style]:void 0;de.push({type:0,value:J.getDateTimeFormat(W,ge).format(fe)});continue}if(isTimeElement(he)){var ge=typeof he.style=="string"?te.time[he.style]:isDateTimeSkeleton(he.style)?parseDateTimeSkeleton(he.style.pattern):void 0;de.push({type:0,value:J.getDateTimeFormat(W,ge).format(fe)});continue}if(isNumberElement(he)){var ge=typeof he.style=="string"?te.number[he.style]:isNumberSkeleton(he.style)?convertNumberSkeletonToNumberFormatOptions(he.style.tokens):void 0;de.push({type:0,value:J.getNumberFormat(W,ge).format(fe)});continue}if(isSelectElement(he)){var be=he.options[fe]||he.options.other;if(!be)throw new RangeError('Invalid values for "'+he.value+'": "'+fe+'". Options are "'+Object.keys(he.options).join('", "')+'"');de.push.apply(de,formatToParts(be.value,W,J,te,re));continue}if(isPluralElement(he)){var be=he.options["="+fe];if(!be){if(!Intl.PluralRules)throw new FormatError(`Intl.PluralRules is not available in this environment.
|
|
195
195
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
196
196
|
`);var me=J.getPluralRules(W,{type:he.pluralType}).select(fe-(he.offset||0));be=he.options[me]||he.options.other}if(!be)throw new RangeError('Invalid values for "'+he.value+'": "'+fe+'". Options are "'+Object.keys(he.options).join('", "')+'"');de.push.apply(de,formatToParts(be.value,W,J,te,re,fe-(he.offset||0)));continue}}return mergeLiteral(de)}function formatToString(X,W,J,te,re,ne){var oe=formatToParts(X,W,J,te,re,void 0,ne);return oe.length===1?oe[0].value:oe.reduce(function(de,ue){return de+=ue.value},"")}var domParser,TOKEN_DELIMITER="@@",TOKEN_REGEX=/@@(\d+_\d+)@@/g,counter=0;function generateId$1(){return Date.now()+"_"+ ++counter}function restoreRichPlaceholderMessage(X,W){return X.split(TOKEN_REGEX).filter(Boolean).map(function(J){return W[J]!=null?W[J]:J}).reduce(function(J,te){return J.length&&typeof te=="string"&&typeof J[J.length-1]=="string"?J[J.length-1]+=te:J.push(te),J},[])}var SIMPLE_XML_REGEX=/(<([0-9a-zA-Z-_]*?)>(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/,TEMPLATE_ID=Date.now()+"@@",VOID_ELEMENTS=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function formatHTMLElement(X,W,J){var te=X.tagName,re=X.outerHTML,ne=X.textContent,oe=X.childNodes;if(!te)return restoreRichPlaceholderMessage(ne||"",W);te=te.toLowerCase();var de=~VOID_ELEMENTS.indexOf(te),ue=J[te];if(ue&&de)throw new FormatError(te+" is a self-closing tag and can not be used, please use another tag name.");if(!oe.length)return[re];var ce=Array.prototype.slice.call(oe).reduce(function(he,pe){return he.concat(formatHTMLElement(pe,W,J))},[]);return ue?typeof ue=="function"?[ue.apply(void 0,ce)]:[ue]:__spreadArrays(["<"+te+">"],ce,["</"+te+">"])}function formatHTMLMessage(X,W,J,te,re,ne){var oe=formatToParts(X,W,J,te,re,void 0,ne),de={},ue=oe.reduce(function(fe,ge){if(ge.type===0)return fe+=ge.value;var be=generateId$1();return de[be]=ge.value,fe+=""+TOKEN_DELIMITER+be+TOKEN_DELIMITER},"");if(!SIMPLE_XML_REGEX.test(ue))return restoreRichPlaceholderMessage(ue,de);if(!re)throw new FormatError("Message has placeholders but no values was given");if(typeof DOMParser>"u")throw new FormatError("Cannot format XML message without DOMParser");domParser||(domParser=new DOMParser);var ce=domParser.parseFromString('<formatted-message id="'+TEMPLATE_ID+'">'+ue+"</formatted-message>","text/html").getElementById(TEMPLATE_ID);if(!ce)throw new FormatError("Malformed HTML message "+ue);var he=Object.keys(re).filter(function(fe){return!!ce.getElementsByTagName(fe).length});if(!he.length)return restoreRichPlaceholderMessage(ue,de);var pe=he.filter(function(fe){return fe!==fe.toLowerCase()});if(pe.length)throw new FormatError("HTML tag must be lowercased but the following tags are not: "+pe.join(", "));return Array.prototype.slice.call(ce.childNodes).reduce(function(fe,ge){return fe.concat(formatHTMLElement(ge,de,re))},[])}var __assign$2=function(){return __assign$2=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign$2.apply(this,arguments)};function mergeConfig(X,W){return W?__assign$2(__assign$2(__assign$2({},X||{}),W||{}),Object.keys(X).reduce(function(J,te){return J[te]=__assign$2(__assign$2({},X[te]),W[te]||{}),J},{})):X}function mergeConfigs(X,W){return W?Object.keys(X).reduce(function(J,te){return J[te]=mergeConfig(X[te],W[te]),J},__assign$2({},X)):X}function createDefaultFormatters(X){return X===void 0&&(X={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:memoizeFormatConstructor(Intl.NumberFormat,X.number),getDateTimeFormat:memoizeFormatConstructor(Intl.DateTimeFormat,X.dateTime),getPluralRules:memoizeFormatConstructor(Intl.PluralRules,X.pluralRules)}}var IntlMessageFormat=function(){function X(W,J,te,re){var ne=this;if(J===void 0&&(J=X.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(oe){return formatToString(ne.ast,ne.locales,ne.formatters,ne.formats,oe,ne.message)},this.formatToParts=function(oe){return formatToParts(ne.ast,ne.locales,ne.formatters,ne.formats,oe,void 0,ne.message)},this.formatHTMLMessage=function(oe){return formatHTMLMessage(ne.ast,ne.locales,ne.formatters,ne.formats,oe,ne.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(ne.locales)[0]}},this.getAst=function(){return ne.ast},typeof W=="string"){if(this.message=W,!X.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=X.__parse(W,{normalizeHashtagInPlural:!1})}else this.ast=W;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=mergeConfigs(X.formats,te),this.locales=J,this.formatters=re&&re.formatters||createDefaultFormatters(this.formatterCache)}return X.defaultLocale=new Intl.NumberFormat().resolvedOptions().locale,X.__parse=parse$1,X.formats={number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},X}();const u$o=X=>{let W=X;if(X&&X.length==1){if(Object.prototype.toString.call(X[0])==="[object Array]")W=X[0];else if(typeof X[0]=="object"){const J=X[0];W=Object.keys(J).reduce((te,re)=>te.concat(re,J[re]),[])}}return W},F$1=X=>lensPath(String(X).split(".")),j=(X,W,J={},te=!1)=>function(re,...ne){if(!re||!W||!X||!W[X])return"";const oe=view(F$1(re),W[X]);if(!oe)return te?re:"";if(!ne||!ne.length)return oe;const de={},ue=`${re}${oe}`;let ce=de[ue];ce||(ce=new IntlMessageFormat(oe,X,J),de[ue]=ce),ne=u$o(ne);const he={};for(let pe=0;pe<ne.length;pe+=2)he[ne[pe]]=ne[pe+1];return ce.format(he)},o$K={};let e$K={};const l$q=X=>{e$K=mergeDeepRight(o$K,e$K),e$K=mergeDeepRight(e$K,X),u$p(o$M,e$K)},p$b=()=>({...e$K}),createLocaleManager=X=>W=>{const J=j(p$c(),W,"",!0);return l$q(W),Promise.resolve({translate:(te,re)=>{try{return J(`${X}.${te}`,re)}catch(ne){return console.error(ne),te}},getTranslations:()=>{const te=p$b(),re=p$c();return te[re][X]||{}},getCurrentLanguage:()=>p$c()})};class PrimariaNotificationService{}class PrimariaNotificationServiceImpl extends PrimariaNotificationService{notify(W,J,te=3e3){const re=document.createElement("dss-toast");re.setAttribute("isshow","true"),re.setAttribute("state",J),re.setAttribute("position","bottom-left"),re.setAttribute("text",W),re.setAttribute("hasicon","true"),re.setAttribute("duration",te.toString()),document.body.appendChild(re),setTimeout(()=>{re.setAttribute("isshow","false"),setTimeout(()=>{re.remove()},300)},te)}info(W,J){this.notify(W,"info",J)}warning(W,J){this.notify(W,"warning",J)}error(W,J){this.notify(W,"error",J)}success(W,J){this.notify(W,"success",J)}}var NAMED_TAG="named",NAME_TAG="name",UNMANAGED_TAG="unmanaged",OPTIONAL_TAG="optional",INJECT_TAG="inject",MULTI_INJECT_TAG="multi_inject",TAGGED="inversify:tagged",TAGGED_PROP="inversify:tagged_props",PARAM_TYPES="inversify:paramtypes",DESIGN_PARAM_TYPES="design:paramtypes",POST_CONSTRUCT="post_construct",PRE_DESTROY="pre_destroy";function getNonCustomTagKeys(){return[INJECT_TAG,MULTI_INJECT_TAG,NAME_TAG,UNMANAGED_TAG,NAMED_TAG,OPTIONAL_TAG]}var NON_CUSTOM_TAG_KEYS=getNonCustomTagKeys(),BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"},BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"},idCounter=0;function id(){return idCounter++}var Binding=function(){function X(W,J){this.id=id(),this.activated=!1,this.serviceIdentifier=W,this.scope=J,this.type=BindingTypeEnum.Invalid,this.constraint=function(te){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return X.prototype.clone=function(){var W=new X(this.serviceIdentifier,this.scope);return W.activated=W.scope===BindingScopeEnum.Singleton?this.activated:!1,W.implementationType=this.implementationType,W.dynamicValue=this.dynamicValue,W.scope=this.scope,W.type=this.type,W.factory=this.factory,W.provider=this.provider,W.constraint=this.constraint,W.onActivation=this.onActivation,W.onDeactivation=this.onDeactivation,W.cache=this.cache,W},X}(),DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",NULL_ARGUMENT="NULL argument",KEY_NOT_FOUND="Key Not Found",AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",CANNOT_UNBIND="Could not unbind serviceIdentifier:",NOT_REGISTERED="No matching bindings found for serviceIdentifier:",MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",UNDEFINED_INJECT_ANNOTATION=function(X){return"@inject called with undefined this could mean that the class "+X+" has a circular dependency problem. You can use a LazyServiceIdentifier to overcome this limitation."},CIRCULAR_DEPENDENCY="Circular dependency found:",INVALID_BINDING_TYPE="Invalid binding type:",NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",LAZY_IN_SYNC=function(X){return"You are attempting to construct '"+X+`' in a synchronous way
|
|
197
197
|
but it has asynchronous dependencies.`},INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",ARGUMENTS_LENGTH_MISMATCH=function(){for(var X=[],W=0;W<arguments.length;W++)X[W]=arguments[W];return"The number of constructor arguments in the derived class "+(X[0]+" must be >= than the number of constructor arguments of its base class.")},CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE='Invalid Container option. Default scope must be a string ("singleton" or "transient").',CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)",POST_CONSTRUCT_ERROR=function(X,W){return"@postConstruct error in class "+X+": "+W},PRE_DESTROY_ERROR=function(X,W){return"@preDestroy error in class "+X+": "+W},ON_DEACTIVATION_ERROR=function(X,W){return"onDeactivation() error in class "+X+": "+W},CIRCULAR_DEPENDENCY_IN_FACTORY=function(X,W){return"It looks like there is a circular dependency in one of the '"+X+"' bindings. Please investigate bindings with "+("service identifier '"+W+"'.")},STACK_OVERFLOW="Maximum call stack size exceeded",MetadataReader=function(){function X(){}return X.prototype.getConstructorMetadata=function(W){var J=Reflect.getMetadata(PARAM_TYPES,W),te=Reflect.getMetadata(TAGGED,W);return{compilerGeneratedMetadata:J,userGeneratedMetadata:te||{}}},X.prototype.getPropertiesMetadata=function(W){var J=Reflect.getMetadata(TAGGED_PROP,W)||[];return J},X}(),BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};function isStackOverflowExeption(X){return X instanceof RangeError||X.message===STACK_OVERFLOW}var tryAndThrowErrorIfStackOverflow=function(X,W){try{return X()}catch(J){throw isStackOverflowExeption(J)&&(J=W()),J}};function getServiceIdentifierAsString(X){if(typeof X=="function"){var W=X;return W.name}else{if(typeof X=="symbol")return X.toString();var W=X;return W}}function listRegisteredBindingsForServiceIdentifier(X,W,J){var te="",re=J(X,W);return re.length!==0&&(te=`
|
|
@@ -199,7 +199,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
199
199
|
`+oe,ne.constraint.metaData&&(te=te+" - "+ne.constraint.metaData)})),te}function alreadyDependencyChain(X,W){return X.parentRequest===null?!1:X.parentRequest.serviceIdentifier===W?!0:alreadyDependencyChain(X.parentRequest,W)}function dependencyChainToString(X){function W(te,re){re===void 0&&(re=[]);var ne=getServiceIdentifierAsString(te.serviceIdentifier);return re.push(ne),te.parentRequest!==null?W(te.parentRequest,re):re}var J=W(X);return J.reverse().join(" --> ")}function circularDependencyToException(X){X.childRequests.forEach(function(W){if(alreadyDependencyChain(W,W.serviceIdentifier)){var J=dependencyChainToString(W);throw new Error(CIRCULAR_DEPENDENCY+" "+J)}else circularDependencyToException(W)})}function listMetadataForTarget(X,W){if(W.isTagged()||W.isNamed()){var J="",te=W.getNamedTag(),re=W.getCustomTags();return te!==null&&(J+=te.toString()+`
|
|
200
200
|
`),re!==null&&re.forEach(function(ne){J+=ne.toString()+`
|
|
201
201
|
`})," "+X+`
|
|
202
|
-
`+X+" - "+J}else return" "+X}function getFunctionName(X){if(X.name)return X.name;var W=X.toString(),J=W.match(/^function\s*([^\s(]+)/);return J?J[1]:"Anonymous function: "+W}function getSymbolDescription(X){return X.toString().slice(7,-1)}var Context=function(){function X(W){this.id=id(),this.container=W}return X.prototype.addPlan=function(W){this.plan=W},X.prototype.setCurrentRequest=function(W){this.currentRequest=W},X}(),Metadata=function(){function X(W,J){this.key=W,this.value=J}return X.prototype.toString=function(){return this.key===NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},X}(),Plan=function(){function X(W,J){this.parentContext=W,this.rootRequest=J}return X}(),LazyServiceIdentifier=function(){function X(W){this._cb=W}return X.prototype.unwrap=function(){return this._cb()},X}(),QueryableString=function(){function X(W){this.str=W}return X.prototype.startsWith=function(W){return this.str.indexOf(W)===0},X.prototype.endsWith=function(W){var J="",te=W.split("").reverse().join("");return J=this.str.split("").reverse().join(""),this.startsWith.call({str:J},te)},X.prototype.contains=function(W){return this.str.indexOf(W)!==-1},X.prototype.equals=function(W){return this.str===W},X.prototype.value=function(){return this.str},X}(),Target=function(){function X(W,J,te,re){this.id=id(),this.type=W,this.serviceIdentifier=te;var ne=typeof J=="symbol"?getSymbolDescription(J):J;this.name=new QueryableString(ne||""),this.identifier=J,this.metadata=new Array;var oe=null;typeof re=="string"?oe=new Metadata(NAMED_TAG,re):re instanceof Metadata&&(oe=re),oe!==null&&this.metadata.push(oe)}return X.prototype.hasTag=function(W){for(var J=0,te=this.metadata;J<te.length;J++){var re=te[J];if(re.key===W)return!0}return!1},X.prototype.isArray=function(){return this.hasTag(MULTI_INJECT_TAG)},X.prototype.matchesArray=function(W){return this.matchesTag(MULTI_INJECT_TAG)(W)},X.prototype.isNamed=function(){return this.hasTag(NAMED_TAG)},X.prototype.isTagged=function(){return this.metadata.some(function(W){return NON_CUSTOM_TAG_KEYS.every(function(J){return W.key!==J})})},X.prototype.isOptional=function(){return this.matchesTag(OPTIONAL_TAG)(!0)},X.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(W){return W.key===NAMED_TAG})[0]:null},X.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(W){return NON_CUSTOM_TAG_KEYS.every(function(J){return W.key!==J})}):null},X.prototype.matchesNamedTag=function(W){return this.matchesTag(NAMED_TAG)(W)},X.prototype.matchesTag=function(W){var J=this;return function(te){for(var re=0,ne=J.metadata;re<ne.length;re++){var oe=ne[re];if(oe.key===W&&oe.value===te)return!0}return!1}},X}(),__spreadArray$2=function(X,W,J){if(J||arguments.length===2)for(var te=0,re=W.length,ne;te<re;te++)(ne||!(te in W))&&(ne||(ne=Array.prototype.slice.call(W,0,te)),ne[te]=W[te]);return X.concat(ne||Array.prototype.slice.call(W))};function getDependencies$1(X,W){var J=getFunctionName(W);return getTargets(X,J,W,!1)}function getTargets(X,W,J,te){var re=X.getConstructorMetadata(J),ne=re.compilerGeneratedMetadata;if(ne===void 0){var oe=MISSING_INJECTABLE_ANNOTATION+" "+W+".";throw new Error(oe)}var de=re.userGeneratedMetadata,ue=Object.keys(de),ce=J.length===0&&ue.length>0,he=ue.length>J.length,pe=ce||he?ue.length:J.length,fe=getConstructorArgsAsTargets(te,W,ne,de,pe),ge=getClassPropsAsTargets(X,J,W),be=__spreadArray$2(__spreadArray$2([],fe,!0),ge,!0);return be}function getConstructorArgsAsTarget(X,W,J,te,re){var ne=re[X.toString()]||[],oe=formatTargetMetadata(ne),de=oe.unmanaged!==!0,ue=te[X],ce=oe.inject||oe.multiInject;if(ue=ce||ue,ue instanceof LazyServiceIdentifier&&(ue=ue.unwrap()),de){var he=ue===Object,pe=ue===Function,fe=ue===void 0,ge=he||pe||fe;if(!W&&ge){var be=MISSING_INJECT_ANNOTATION+" argument "+X+" in class "+J+".";throw new Error(be)}var me=new Target(TargetTypeEnum.ConstructorArgument,oe.targetName,ue);return me.metadata=ne,me}return null}function getConstructorArgsAsTargets(X,W,J,te,re){for(var ne=[],oe=0;oe<re;oe++){var de=oe,ue=getConstructorArgsAsTarget(de,X,W,J,te);ue!==null&&ne.push(ue)}return ne}function _getServiceIdentifierForProperty(X,W,J,te){var re=X||W;if(re===void 0){var ne=MISSING_INJECTABLE_ANNOTATION+" for property "+String(J)+" in class "+te+".";throw new Error(ne)}return re}function getClassPropsAsTargets(X,W,J){for(var te=X.getPropertiesMetadata(W),re=[],ne=Object.getOwnPropertySymbols(te),oe=Object.keys(te),de=oe.concat(ne),ue=0,ce=de;ue<ce.length;ue++){var he=ce[ue],pe=te[he],fe=formatTargetMetadata(pe),ge=fe.targetName||he,be=_getServiceIdentifierForProperty(fe.inject,fe.multiInject,he,J),me=new Target(TargetTypeEnum.ClassProperty,ge,be);me.metadata=pe,re.push(me)}var ve=Object.getPrototypeOf(W.prototype).constructor;if(ve!==Object){var ye=getClassPropsAsTargets(X,ve,J);re=__spreadArray$2(__spreadArray$2([],re,!0),ye,!0)}return re}function getBaseClassDependencyCount(X,W){var J=Object.getPrototypeOf(W.prototype).constructor;if(J!==Object){var te=getFunctionName(J),re=getTargets(X,te,J,!0),ne=re.map(function(ue){return ue.metadata.filter(function(ce){return ce.key===UNMANAGED_TAG})}),oe=[].concat.apply([],ne).length,de=re.length-oe;return de>0?de:getBaseClassDependencyCount(X,J)}else return 0}function formatTargetMetadata(X){var W={};return X.forEach(function(J){W[J.key.toString()]=J.value}),{inject:W[INJECT_TAG],multiInject:W[MULTI_INJECT_TAG],targetName:W[NAME_TAG],unmanaged:W[UNMANAGED_TAG]}}var Request$1=function(){function X(W,J,te,re,ne){this.id=id(),this.serviceIdentifier=W,this.parentContext=J,this.parentRequest=te,this.target=ne,this.childRequests=[],this.bindings=Array.isArray(re)?re:[re],this.requestScope=te===null?new Map:null}return X.prototype.addChildRequest=function(W,J,te){var re=new X(W,this.parentContext,this,J,te);return this.childRequests.push(re),re},X}();function getBindingDictionary(X){return X._bindingDictionary}function _createTarget(X,W,J,te,re,ne){var oe=X?MULTI_INJECT_TAG:INJECT_TAG,de=new Metadata(oe,J),ue=new Target(W,te,J,de);if(re!==void 0){var ce=new Metadata(re,ne);ue.metadata.push(ce)}return ue}function _getActiveBindings(X,W,J,te,re){var ne=getBindings(J.container,re.serviceIdentifier),oe=[];return ne.length===BindingCount.NoBindingsAvailable&&J.container.options.autoBindInjectable&&typeof re.serviceIdentifier=="function"&&X.getConstructorMetadata(re.serviceIdentifier).compilerGeneratedMetadata&&(J.container.bind(re.serviceIdentifier).toSelf(),ne=getBindings(J.container,re.serviceIdentifier)),W?oe=ne:oe=ne.filter(function(de){var ue=new Request$1(de.serviceIdentifier,J,te,de,re);return de.constraint(ue)}),_validateActiveBindingCount(re.serviceIdentifier,oe,re,J.container),oe}function _validateActiveBindingCount(X,W,J,te){switch(W.length){case BindingCount.NoBindingsAvailable:if(J.isOptional())return W;var re=getServiceIdentifierAsString(X),ne=NOT_REGISTERED;throw ne+=listMetadataForTarget(re,J),ne+=listRegisteredBindingsForServiceIdentifier(te,re,getBindings),new Error(ne);case BindingCount.OnlyOneBindingAvailable:return W;case BindingCount.MultipleBindingsAvailable:default:if(J.isArray())return W;var re=getServiceIdentifierAsString(X),ne=AMBIGUOUS_MATCH+" "+re;throw ne+=listRegisteredBindingsForServiceIdentifier(te,re,getBindings),new Error(ne)}}function _createSubRequests(X,W,J,te,re,ne){var oe,de;if(re===null){oe=_getActiveBindings(X,W,te,null,ne),de=new Request$1(J,te,null,oe,ne);var ue=new Plan(te,de);te.addPlan(ue)}else oe=_getActiveBindings(X,W,te,re,ne),de=re.addChildRequest(ne.serviceIdentifier,oe,ne);oe.forEach(function(ce){var he=null;if(ne.isArray())he=de.addChildRequest(ce.serviceIdentifier,ce,ne);else{if(ce.cache)return;he=de}if(ce.type===BindingTypeEnum.Instance&&ce.implementationType!==null){var pe=getDependencies$1(X,ce.implementationType);if(!te.container.options.skipBaseClassChecks){var fe=getBaseClassDependencyCount(X,ce.implementationType);if(pe.length<fe){var ge=ARGUMENTS_LENGTH_MISMATCH(getFunctionName(ce.implementationType));throw new Error(ge)}}pe.forEach(function(be){_createSubRequests(X,!1,be.serviceIdentifier,te,he,be)})}})}function getBindings(X,W){var J=[],te=getBindingDictionary(X);return te.hasKey(W)?J=te.get(W):X.parent!==null&&(J=getBindings(X.parent,W)),J}function plan(X,W,J,te,re,ne,oe,de){de===void 0&&(de=!1);var ue=new Context(W),ce=_createTarget(J,te,re,"",ne,oe);try{return _createSubRequests(X,de,re,ue,null,ce),ue}catch(he){throw isStackOverflowExeption(he)&&circularDependencyToException(ue.plan.rootRequest),he}}function createMockRequest(X,W,J,te){var re=new Target(TargetTypeEnum.Variable,"",W,new Metadata(J,te)),ne=new Context(X),oe=new Request$1(W,ne,null,[],re);return oe}function isPromise(X){var W=typeof X=="object"&&X!==null||typeof X=="function";return W&&typeof X.then=="function"}function isPromiseOrContainsPromise(X){return isPromise(X)?!0:Array.isArray(X)&&X.some(isPromise)}var __awaiter$3=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator$3=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},tryGetFromScope=function(X,W){return W.scope===BindingScopeEnum.Singleton&&W.activated?W.cache:W.scope===BindingScopeEnum.Request&&X.has(W.id)?X.get(W.id):null},saveToScope=function(X,W,J){W.scope===BindingScopeEnum.Singleton&&_saveToSingletonScope(W,J),W.scope===BindingScopeEnum.Request&&_saveToRequestScope(X,W,J)},_saveToRequestScope=function(X,W,J){X.has(W.id)||X.set(W.id,J)},_saveToSingletonScope=function(X,W){X.cache=W,X.activated=!0,isPromise(W)&&_saveAsyncResultToSingletonScope(X,W)},_saveAsyncResultToSingletonScope=function(X,W){return __awaiter$3(void 0,void 0,void 0,function(){var J,te;return __generator$3(this,function(re){switch(re.label){case 0:return re.trys.push([0,2,,3]),[4,W];case 1:return J=re.sent(),X.cache=J,[3,3];case 2:throw te=re.sent(),X.cache=null,X.activated=!1,te;case 3:return[2]}})})},FactoryType;(function(X){X.DynamicValue="toDynamicValue",X.Factory="toFactory",X.Provider="toProvider"})(FactoryType||(FactoryType={}));var ensureFullyBound=function(X){var W=null;switch(X.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:W=X.cache;break;case BindingTypeEnum.Constructor:case BindingTypeEnum.Instance:W=X.implementationType;break;case BindingTypeEnum.DynamicValue:W=X.dynamicValue;break;case BindingTypeEnum.Provider:W=X.provider;break;case BindingTypeEnum.Factory:W=X.factory;break}if(W===null){var J=getServiceIdentifierAsString(X.serviceIdentifier);throw new Error(INVALID_BINDING_TYPE+" "+J)}},getFactoryDetails=function(X){switch(X.type){case BindingTypeEnum.Factory:return{factory:X.factory,factoryType:FactoryType.Factory};case BindingTypeEnum.Provider:return{factory:X.provider,factoryType:FactoryType.Provider};case BindingTypeEnum.DynamicValue:return{factory:X.dynamicValue,factoryType:FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+X.type)}},__assign$1=function(){return __assign$1=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign$1.apply(this,arguments)},__awaiter$2=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator$2=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},__spreadArray$1=function(X,W,J){if(J||arguments.length===2)for(var te=0,re=W.length,ne;te<re;te++)(ne||!(te in W))&&(ne||(ne=Array.prototype.slice.call(W,0,te)),ne[te]=W[te]);return X.concat(ne||Array.prototype.slice.call(W))};function _resolveRequests(X,W){return X.reduce(function(J,te){var re=W(te),ne=te.target.type;return ne===TargetTypeEnum.ConstructorArgument?J.constructorInjections.push(re):(J.propertyRequests.push(te),J.propertyInjections.push(re)),J.isAsync||(J.isAsync=isPromiseOrContainsPromise(re)),J},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function _createInstance(X,W,J){var te;if(W.length>0){var re=_resolveRequests(W,J),ne=__assign$1(__assign$1({},re),{constr:X});re.isAsync?te=createInstanceWithInjectionsAsync(ne):te=createInstanceWithInjections(ne)}else te=new X;return te}function createInstanceWithInjections(X){var W,J=new((W=X.constr).bind.apply(W,__spreadArray$1([void 0],X.constructorInjections,!1)));return X.propertyRequests.forEach(function(te,re){var ne=te.target.identifier,oe=X.propertyInjections[re];(!te.target.isOptional()||oe!==void 0)&&(J[ne]=oe)}),J}function createInstanceWithInjectionsAsync(X){return __awaiter$2(this,void 0,void 0,function(){var W,J;return __generator$2(this,function(te){switch(te.label){case 0:return[4,possiblyWaitInjections(X.constructorInjections)];case 1:return W=te.sent(),[4,possiblyWaitInjections(X.propertyInjections)];case 2:return J=te.sent(),[2,createInstanceWithInjections(__assign$1(__assign$1({},X),{constructorInjections:W,propertyInjections:J}))]}})})}function possiblyWaitInjections(X){return __awaiter$2(this,void 0,void 0,function(){var W,J,te,re;return __generator$2(this,function(ne){for(W=[],J=0,te=X;J<te.length;J++)re=te[J],Array.isArray(re)?W.push(Promise.all(re)):W.push(re);return[2,Promise.all(W)]})})}function _getInstanceAfterPostConstruct(X,W){var J=_postConstruct(X,W);return isPromise(J)?J.then(function(){return W}):W}function _postConstruct(X,W){var J,te;if(Reflect.hasMetadata(POST_CONSTRUCT,X)){var re=Reflect.getMetadata(POST_CONSTRUCT,X);try{return(te=(J=W)[re.value])===null||te===void 0?void 0:te.call(J)}catch(ne){if(ne instanceof Error)throw new Error(POST_CONSTRUCT_ERROR(X.name,ne.message))}}}function _validateInstanceResolution(X,W){X.scope!==BindingScopeEnum.Singleton&&_throwIfHandlingDeactivation(X,W)}function _throwIfHandlingDeactivation(X,W){var J="Class cannot be instantiated in "+(X.scope===BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof X.onDeactivation=="function")throw new Error(ON_DEACTIVATION_ERROR(W.name,J));if(Reflect.hasMetadata(PRE_DESTROY,W))throw new Error(PRE_DESTROY_ERROR(W.name,J))}function resolveInstance(X,W,J,te){_validateInstanceResolution(X,W);var re=_createInstance(W,J,te);return isPromise(re)?re.then(function(ne){return _getInstanceAfterPostConstruct(W,ne)}):_getInstanceAfterPostConstruct(W,re)}var __awaiter$1=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator$1=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},_resolveRequest=function(X){return function(W){W.parentContext.setCurrentRequest(W);var J=W.bindings,te=W.childRequests,re=W.target&&W.target.isArray(),ne=!W.parentRequest||!W.parentRequest.target||!W.target||!W.parentRequest.target.matchesArray(W.target.serviceIdentifier);if(re&&ne)return te.map(function(de){var ue=_resolveRequest(X);return ue(de)});if(W.target.isOptional()&&J.length===0)return;var oe=J[0];return _resolveBinding(X,W,oe)}},_resolveFactoryFromBinding=function(X,W){var J=getFactoryDetails(X);return tryAndThrowErrorIfStackOverflow(function(){return J.factory.bind(X)(W)},function(){return new Error(CIRCULAR_DEPENDENCY_IN_FACTORY(J.factoryType,W.currentRequest.serviceIdentifier.toString()))})},_getResolvedFromBinding=function(X,W,J){var te,re=W.childRequests;switch(ensureFullyBound(J),J.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:te=J.cache;break;case BindingTypeEnum.Constructor:te=J.implementationType;break;case BindingTypeEnum.Instance:te=resolveInstance(J,J.implementationType,re,_resolveRequest(X));break;default:te=_resolveFactoryFromBinding(J,W.parentContext)}return te},_resolveInScope=function(X,W,J){var te=tryGetFromScope(X,W);return te!==null||(te=J(),saveToScope(X,W,te)),te},_resolveBinding=function(X,W,J){return _resolveInScope(X,J,function(){var te=_getResolvedFromBinding(X,W,J);return isPromise(te)?te=te.then(function(re){return _onActivation(W,J,re)}):te=_onActivation(W,J,te),te})};function _onActivation(X,W,J){var te=_bindingActivation(X.parentContext,W,J),re=_getContainersIterator(X.parentContext.container),ne,oe=re.next();do{ne=oe.value;var de=X.parentContext,ue=X.serviceIdentifier,ce=_getContainerActivationsForService(ne,ue);isPromise(te)?te=_activateContainerAsync(ce,de,te):te=_activateContainer(ce,de,te),oe=re.next()}while(oe.done!==!0&&!getBindingDictionary(ne).hasKey(X.serviceIdentifier));return te}var _bindingActivation=function(X,W,J){var te;return typeof W.onActivation=="function"?te=W.onActivation(X,J):te=J,te},_activateContainer=function(X,W,J){for(var te=X.next();!te.done;){if(J=te.value(W,J),isPromise(J))return _activateContainerAsync(X,W,J);te=X.next()}return J},_activateContainerAsync=function(X,W,J){return __awaiter$1(void 0,void 0,void 0,function(){var te,re;return __generator$1(this,function(ne){switch(ne.label){case 0:return[4,J];case 1:te=ne.sent(),re=X.next(),ne.label=2;case 2:return re.done?[3,4]:[4,re.value(W,te)];case 3:return te=ne.sent(),re=X.next(),[3,2];case 4:return[2,te]}})})},_getContainerActivationsForService=function(X,W){var J=X._activations;return J.hasKey(W)?J.get(W).values():[].values()},_getContainersIterator=function(X){for(var W=[X],J=X.parent;J!==null;)W.push(J),J=J.parent;var te=function(){var ne=W.pop();return ne!==void 0?{done:!1,value:ne}:{done:!0,value:void 0}},re={next:te};return re};function resolve(X){var W=_resolveRequest(X.plan.rootRequest.requestScope);return W(X.plan.rootRequest)}var traverseAncerstors=function(X,W){var J=X.parentRequest;return J!==null?W(J)?!0:traverseAncerstors(J,W):!1},taggedConstraint=function(X){return function(W){var J=function(te){return te!==null&&te.target!==null&&te.target.matchesTag(X)(W)};return J.metaData=new Metadata(X,W),J}},namedConstraint=taggedConstraint(NAMED_TAG),typeConstraint=function(X){return function(W){var J=null;if(W!==null)if(J=W.bindings[0],typeof X=="string"){var te=J.serviceIdentifier;return te===X}else{var re=W.bindings[0].implementationType;return X===re}return!1}},BindingWhenSyntax=function(){function X(W){this._binding=W}return X.prototype.when=function(W){return this._binding.constraint=W,new BindingOnSyntax(this._binding)},X.prototype.whenTargetNamed=function(W){return this._binding.constraint=namedConstraint(W),new BindingOnSyntax(this._binding)},X.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(W){if(W===null)return!1;var J=W.target!==null&&!W.target.isNamed()&&!W.target.isTagged();return J},new BindingOnSyntax(this._binding)},X.prototype.whenTargetTagged=function(W,J){return this._binding.constraint=taggedConstraint(W)(J),new BindingOnSyntax(this._binding)},X.prototype.whenInjectedInto=function(W){return this._binding.constraint=function(J){return J!==null&&typeConstraint(W)(J.parentRequest)},new BindingOnSyntax(this._binding)},X.prototype.whenParentNamed=function(W){return this._binding.constraint=function(J){return J!==null&&namedConstraint(W)(J.parentRequest)},new BindingOnSyntax(this._binding)},X.prototype.whenParentTagged=function(W,J){return this._binding.constraint=function(te){return te!==null&&taggedConstraint(W)(J)(te.parentRequest)},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorIs=function(W){return this._binding.constraint=function(J){return J!==null&&traverseAncerstors(J,typeConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorIs=function(W){return this._binding.constraint=function(J){return J!==null&&!traverseAncerstors(J,typeConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorNamed=function(W){return this._binding.constraint=function(J){return J!==null&&traverseAncerstors(J,namedConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorNamed=function(W){return this._binding.constraint=function(J){return J!==null&&!traverseAncerstors(J,namedConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorTagged=function(W,J){return this._binding.constraint=function(te){return te!==null&&traverseAncerstors(te,taggedConstraint(W)(J))},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorTagged=function(W,J){return this._binding.constraint=function(te){return te!==null&&!traverseAncerstors(te,taggedConstraint(W)(J))},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorMatches=function(W){return this._binding.constraint=function(J){return J!==null&&traverseAncerstors(J,W)},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorMatches=function(W){return this._binding.constraint=function(J){return J!==null&&!traverseAncerstors(J,W)},new BindingOnSyntax(this._binding)},X}(),BindingOnSyntax=function(){function X(W){this._binding=W}return X.prototype.onActivation=function(W){return this._binding.onActivation=W,new BindingWhenSyntax(this._binding)},X.prototype.onDeactivation=function(W){return this._binding.onDeactivation=W,new BindingWhenSyntax(this._binding)},X}(),BindingWhenOnSyntax=function(){function X(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding)}return X.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},X.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},X.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},X.prototype.whenTargetTagged=function(W,J){return this._bindingWhenSyntax.whenTargetTagged(W,J)},X.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},X.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},X.prototype.whenParentTagged=function(W,J){return this._bindingWhenSyntax.whenParentTagged(W,J)},X.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},X.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},X.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},X.prototype.whenAnyAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,J)},X.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},X.prototype.whenNoAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenNoAncestorTagged(W,J)},X.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},X.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},X.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},X.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},X}(),BindingInSyntax=function(){function X(W){this._binding=W}return X.prototype.inRequestScope=function(){return this._binding.scope=BindingScopeEnum.Request,new BindingWhenOnSyntax(this._binding)},X.prototype.inSingletonScope=function(){return this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.inTransientScope=function(){return this._binding.scope=BindingScopeEnum.Transient,new BindingWhenOnSyntax(this._binding)},X}(),BindingInWhenOnSyntax=function(){function X(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding),this._bindingInSyntax=new BindingInSyntax(W)}return X.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},X.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},X.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},X.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},X.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},X.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},X.prototype.whenTargetTagged=function(W,J){return this._bindingWhenSyntax.whenTargetTagged(W,J)},X.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},X.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},X.prototype.whenParentTagged=function(W,J){return this._bindingWhenSyntax.whenParentTagged(W,J)},X.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},X.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},X.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},X.prototype.whenAnyAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,J)},X.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},X.prototype.whenNoAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenNoAncestorTagged(W,J)},X.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},X.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},X.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},X.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},X}(),BindingToSyntax=function(){function X(W){this._binding=W}return X.prototype.to=function(W){return this._binding.type=BindingTypeEnum.Instance,this._binding.implementationType=W,new BindingInWhenOnSyntax(this._binding)},X.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+INVALID_TO_SELF_VALUE);var W=this._binding.serviceIdentifier;return this.to(W)},X.prototype.toConstantValue=function(W){return this._binding.type=BindingTypeEnum.ConstantValue,this._binding.cache=W,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toDynamicValue=function(W){return this._binding.type=BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=W,this._binding.implementationType=null,new BindingInWhenOnSyntax(this._binding)},X.prototype.toConstructor=function(W){return this._binding.type=BindingTypeEnum.Constructor,this._binding.implementationType=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toFunction=function(W){if(typeof W!="function")throw new Error(INVALID_FUNCTION_BINDING);var J=this.toConstantValue(W);return this._binding.type=BindingTypeEnum.Function,this._binding.scope=BindingScopeEnum.Singleton,J},X.prototype.toAutoFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(J){var te=function(){return J.container.get(W)};return te},this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toAutoNamedFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(J){return function(te){return J.container.getNamed(W,te)}},new BindingWhenOnSyntax(this._binding)},X.prototype.toProvider=function(W){return this._binding.type=BindingTypeEnum.Provider,this._binding.provider=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toService=function(W){this.toDynamicValue(function(J){return J.container.get(W)})},X}(),ContainerSnapshot=function(){function X(){}return X.of=function(W,J,te,re,ne){var oe=new X;return oe.bindings=W,oe.middleware=J,oe.deactivations=re,oe.activations=te,oe.moduleActivationStore=ne,oe},X}();function isClonable(X){return typeof X=="object"&&X!==null&&"clone"in X&&typeof X.clone=="function"}var Lookup=function(){function X(){this._map=new Map}return X.prototype.getMap=function(){return this._map},X.prototype.add=function(W,J){if(W==null)throw new Error(NULL_ARGUMENT);if(J==null)throw new Error(NULL_ARGUMENT);var te=this._map.get(W);te!==void 0?te.push(J):this._map.set(W,[J])},X.prototype.get=function(W){if(W==null)throw new Error(NULL_ARGUMENT);var J=this._map.get(W);if(J!==void 0)return J;throw new Error(KEY_NOT_FOUND)},X.prototype.remove=function(W){if(W==null)throw new Error(NULL_ARGUMENT);if(!this._map.delete(W))throw new Error(KEY_NOT_FOUND)},X.prototype.removeIntersection=function(W){var J=this;this.traverse(function(te,re){var ne=W.hasKey(te)?W.get(te):void 0;if(ne!==void 0){var oe=re.filter(function(de){return!ne.some(function(ue){return de===ue})});J._setValue(te,oe)}})},X.prototype.removeByCondition=function(W){var J=this,te=[];return this._map.forEach(function(re,ne){for(var oe=[],de=0,ue=re;de<ue.length;de++){var ce=ue[de],he=W(ce);he?te.push(ce):oe.push(ce)}J._setValue(ne,oe)}),te},X.prototype.hasKey=function(W){if(W==null)throw new Error(NULL_ARGUMENT);return this._map.has(W)},X.prototype.clone=function(){var W=new X;return this._map.forEach(function(J,te){J.forEach(function(re){return W.add(te,isClonable(re)?re.clone():re)})}),W},X.prototype.traverse=function(W){this._map.forEach(function(J,te){W(te,J)})},X.prototype._setValue=function(W,J){J.length>0?this._map.set(W,J):this._map.delete(W)},X}(),ModuleActivationStore=function(){function X(){this._map=new Map}return X.prototype.remove=function(W){if(this._map.has(W)){var J=this._map.get(W);return this._map.delete(W),J}return this._getEmptyHandlersStore()},X.prototype.addDeactivation=function(W,J,te){this._getModuleActivationHandlers(W).onDeactivations.add(J,te)},X.prototype.addActivation=function(W,J,te){this._getModuleActivationHandlers(W).onActivations.add(J,te)},X.prototype.clone=function(){var W=new X;return this._map.forEach(function(J,te){W._map.set(te,{onActivations:J.onActivations.clone(),onDeactivations:J.onDeactivations.clone()})}),W},X.prototype._getModuleActivationHandlers=function(W){var J=this._map.get(W);return J===void 0&&(J=this._getEmptyHandlersStore(),this._map.set(W,J)),J},X.prototype._getEmptyHandlersStore=function(){var W={onActivations:new Lookup,onDeactivations:new Lookup};return W},X}(),__assign=function(){return __assign=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign.apply(this,arguments)},__awaiter=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},__spreadArray=function(X,W,J){if(J||arguments.length===2)for(var te=0,re=W.length,ne;te<re;te++)(ne||!(te in W))&&(ne||(ne=Array.prototype.slice.call(W,0,te)),ne[te]=W[te]);return X.concat(ne||Array.prototype.slice.call(W))},Container=function(){function X(W){var J=W||{};if(typeof J!="object")throw new Error(""+CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(J.defaultScope===void 0)J.defaultScope=BindingScopeEnum.Transient;else if(J.defaultScope!==BindingScopeEnum.Singleton&&J.defaultScope!==BindingScopeEnum.Transient&&J.defaultScope!==BindingScopeEnum.Request)throw new Error(""+CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(J.autoBindInjectable===void 0)J.autoBindInjectable=!1;else if(typeof J.autoBindInjectable!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(J.skipBaseClassChecks===void 0)J.skipBaseClassChecks=!1;else if(typeof J.skipBaseClassChecks!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:J.autoBindInjectable,defaultScope:J.defaultScope,skipBaseClassChecks:J.skipBaseClassChecks},this.id=id(),this._bindingDictionary=new Lookup,this._snapshots=[],this._middleware=null,this._activations=new Lookup,this._deactivations=new Lookup,this.parent=null,this._metadataReader=new MetadataReader,this._moduleActivationStore=new ModuleActivationStore}return X.merge=function(W,J){for(var te=[],re=2;re<arguments.length;re++)te[re-2]=arguments[re];var ne=new X,oe=__spreadArray([W,J],te,!0).map(function(ce){return getBindingDictionary(ce)}),de=getBindingDictionary(ne);function ue(ce,he){ce.traverse(function(pe,fe){fe.forEach(function(ge){he.add(ge.serviceIdentifier,ge.clone())})})}return oe.forEach(function(ce){ue(ce,de)}),ne},X.prototype.load=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];for(var te=this._getContainerModuleHelpersFactory(),re=0,ne=W;re<ne.length;re++){var oe=ne[re],de=te(oe.id);oe.registry(de.bindFunction,de.unbindFunction,de.isboundFunction,de.rebindFunction,de.unbindAsyncFunction,de.onActivationFunction,de.onDeactivationFunction)}},X.prototype.loadAsync=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];return __awaiter(this,void 0,void 0,function(){var te,re,ne,oe,de;return __generator(this,function(ue){switch(ue.label){case 0:te=this._getContainerModuleHelpersFactory(),re=0,ne=W,ue.label=1;case 1:return re<ne.length?(oe=ne[re],de=te(oe.id),[4,oe.registry(de.bindFunction,de.unbindFunction,de.isboundFunction,de.rebindFunction,de.unbindAsyncFunction,de.onActivationFunction,de.onDeactivationFunction)]):[3,4];case 2:ue.sent(),ue.label=3;case 3:return re++,[3,1];case 4:return[2]}})})},X.prototype.unload=function(){for(var W=this,J=[],te=0;te<arguments.length;te++)J[te]=arguments[te];J.forEach(function(re){var ne=W._removeModuleBindings(re.id);W._deactivateSingletons(ne),W._removeModuleHandlers(re.id)})},X.prototype.unloadAsync=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];return __awaiter(this,void 0,void 0,function(){var te,re,ne,oe;return __generator(this,function(de){switch(de.label){case 0:te=0,re=W,de.label=1;case 1:return te<re.length?(ne=re[te],oe=this._removeModuleBindings(ne.id),[4,this._deactivateSingletonsAsync(oe)]):[3,4];case 2:de.sent(),this._removeModuleHandlers(ne.id),de.label=3;case 3:return te++,[3,1];case 4:return[2]}})})},X.prototype.bind=function(W){var J=this.options.defaultScope||BindingScopeEnum.Transient,te=new Binding(W,J);return this._bindingDictionary.add(W,te),new BindingToSyntax(te)},X.prototype.rebind=function(W){return this.unbind(W),this.bind(W)},X.prototype.rebindAsync=function(W){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(J){switch(J.label){case 0:return[4,this.unbindAsync(W)];case 1:return J.sent(),[2,this.bind(W)]}})})},X.prototype.unbind=function(W){if(this._bindingDictionary.hasKey(W)){var J=this._bindingDictionary.get(W);this._deactivateSingletons(J)}this._removeServiceFromDictionary(W)},X.prototype.unbindAsync=function(W){return __awaiter(this,void 0,void 0,function(){var J;return __generator(this,function(te){switch(te.label){case 0:return this._bindingDictionary.hasKey(W)?(J=this._bindingDictionary.get(W),[4,this._deactivateSingletonsAsync(J)]):[3,2];case 1:te.sent(),te.label=2;case 2:return this._removeServiceFromDictionary(W),[2]}})})},X.prototype.unbindAll=function(){var W=this;this._bindingDictionary.traverse(function(J,te){W._deactivateSingletons(te)}),this._bindingDictionary=new Lookup},X.prototype.unbindAllAsync=function(){return __awaiter(this,void 0,void 0,function(){var W,J=this;return __generator(this,function(te){switch(te.label){case 0:return W=[],this._bindingDictionary.traverse(function(re,ne){W.push(J._deactivateSingletonsAsync(ne))}),[4,Promise.all(W)];case 1:return te.sent(),this._bindingDictionary=new Lookup,[2]}})})},X.prototype.onActivation=function(W,J){this._activations.add(W,J)},X.prototype.onDeactivation=function(W,J){this._deactivations.add(W,J)},X.prototype.isBound=function(W){var J=this._bindingDictionary.hasKey(W);return!J&&this.parent&&(J=this.parent.isBound(W)),J},X.prototype.isCurrentBound=function(W){return this._bindingDictionary.hasKey(W)},X.prototype.isBoundNamed=function(W,J){return this.isBoundTagged(W,NAMED_TAG,J)},X.prototype.isBoundTagged=function(W,J,te){var re=!1;if(this._bindingDictionary.hasKey(W)){var ne=this._bindingDictionary.get(W),oe=createMockRequest(this,W,J,te);re=ne.some(function(de){return de.constraint(oe)})}return!re&&this.parent&&(re=this.parent.isBoundTagged(W,J,te)),re},X.prototype.snapshot=function(){this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},X.prototype.restore=function(){var W=this._snapshots.pop();if(W===void 0)throw new Error(NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=W.bindings,this._activations=W.activations,this._deactivations=W.deactivations,this._middleware=W.middleware,this._moduleActivationStore=W.moduleActivationStore},X.prototype.createChild=function(W){var J=new X(W||this.options);return J.parent=this,J},X.prototype.applyMiddleware=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];var te=this._middleware?this._middleware:this._planAndResolve();this._middleware=W.reduce(function(re,ne){return ne(re)},te)},X.prototype.applyCustomMetadataReader=function(W){this._metadataReader=W},X.prototype.get=function(W){var J=this._getNotAllArgs(W,!1);return this._getButThrowIfAsync(J)},X.prototype.getAsync=function(W){return __awaiter(this,void 0,void 0,function(){var J;return __generator(this,function(te){return J=this._getNotAllArgs(W,!1),[2,this._get(J)]})})},X.prototype.getTagged=function(W,J,te){var re=this._getNotAllArgs(W,!1,J,te);return this._getButThrowIfAsync(re)},X.prototype.getTaggedAsync=function(W,J,te){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){return re=this._getNotAllArgs(W,!1,J,te),[2,this._get(re)]})})},X.prototype.getNamed=function(W,J){return this.getTagged(W,NAMED_TAG,J)},X.prototype.getNamedAsync=function(W,J){return this.getTaggedAsync(W,NAMED_TAG,J)},X.prototype.getAll=function(W){var J=this._getAllArgs(W);return this._getButThrowIfAsync(J)},X.prototype.getAllAsync=function(W){var J=this._getAllArgs(W);return this._getAll(J)},X.prototype.getAllTagged=function(W,J,te){var re=this._getNotAllArgs(W,!0,J,te);return this._getButThrowIfAsync(re)},X.prototype.getAllTaggedAsync=function(W,J,te){var re=this._getNotAllArgs(W,!0,J,te);return this._getAll(re)},X.prototype.getAllNamed=function(W,J){return this.getAllTagged(W,NAMED_TAG,J)},X.prototype.getAllNamedAsync=function(W,J){return this.getAllTaggedAsync(W,NAMED_TAG,J)},X.prototype.resolve=function(W){var J=this.isBound(W);J||this.bind(W).toSelf();var te=this.get(W);return J||this.unbind(W),te},X.prototype._preDestroy=function(W,J){var te,re;if(Reflect.hasMetadata(PRE_DESTROY,W)){var ne=Reflect.getMetadata(PRE_DESTROY,W);return(re=(te=J)[ne.value])===null||re===void 0?void 0:re.call(te)}},X.prototype._removeModuleHandlers=function(W){var J=this._moduleActivationStore.remove(W);this._activations.removeIntersection(J.onActivations),this._deactivations.removeIntersection(J.onDeactivations)},X.prototype._removeModuleBindings=function(W){return this._bindingDictionary.removeByCondition(function(J){return J.moduleId===W})},X.prototype._deactivate=function(W,J){var te=this,re=Object.getPrototypeOf(J).constructor;try{if(this._deactivations.hasKey(W.serviceIdentifier)){var ne=this._deactivateContainer(J,this._deactivations.get(W.serviceIdentifier).values());if(isPromise(ne))return this._handleDeactivationError(ne.then(function(){return te._propagateContainerDeactivationThenBindingAndPreDestroyAsync(W,J,re)}),re)}var oe=this._propagateContainerDeactivationThenBindingAndPreDestroy(W,J,re);if(isPromise(oe))return this._handleDeactivationError(oe,re)}catch(de){if(de instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(re.name,de.message))}},X.prototype._handleDeactivationError=function(W,J){return __awaiter(this,void 0,void 0,function(){var te;return __generator(this,function(re){switch(re.label){case 0:return re.trys.push([0,2,,3]),[4,W];case 1:return re.sent(),[3,3];case 2:if(te=re.sent(),te instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(J.name,te.message));return[3,3];case 3:return[2]}})})},X.prototype._deactivateContainer=function(W,J){for(var te=this,re=J.next();re.value;){var ne=re.value(W);if(isPromise(ne))return ne.then(function(){return te._deactivateContainerAsync(W,J)});re=J.next()}},X.prototype._deactivateContainerAsync=function(W,J){return __awaiter(this,void 0,void 0,function(){var te;return __generator(this,function(re){switch(re.label){case 0:te=J.next(),re.label=1;case 1:return te.value?[4,te.value(W)]:[3,3];case 2:return re.sent(),te=J.next(),[3,1];case 3:return[2]}})})},X.prototype._getContainerModuleHelpersFactory=function(){var W=this,J=function(he,pe){he._binding.moduleId=pe},te=function(he){return function(pe){var fe=W.bind(pe);return J(fe,he),fe}},re=function(){return function(he){return W.unbind(he)}},ne=function(){return function(he){return W.unbindAsync(he)}},oe=function(){return function(he){return W.isBound(he)}},de=function(he){return function(pe){var fe=W.rebind(pe);return J(fe,he),fe}},ue=function(he){return function(pe,fe){W._moduleActivationStore.addActivation(he,pe,fe),W.onActivation(pe,fe)}},ce=function(he){return function(pe,fe){W._moduleActivationStore.addDeactivation(he,pe,fe),W.onDeactivation(pe,fe)}};return function(he){return{bindFunction:te(he),isboundFunction:oe(),onActivationFunction:ue(he),onDeactivationFunction:ce(he),rebindFunction:de(he),unbindFunction:re(),unbindAsyncFunction:ne()}}},X.prototype._getAll=function(W){return Promise.all(this._get(W))},X.prototype._get=function(W){var J=__assign(__assign({},W),{contextInterceptor:function(re){return re},targetType:TargetTypeEnum.Variable});if(this._middleware){var te=this._middleware(J);if(te==null)throw new Error(INVALID_MIDDLEWARE_RETURN);return te}return this._planAndResolve()(J)},X.prototype._getButThrowIfAsync=function(W){var J=this._get(W);if(isPromiseOrContainsPromise(J))throw new Error(LAZY_IN_SYNC(W.serviceIdentifier));return J},X.prototype._getAllArgs=function(W){var J={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:W};return J},X.prototype._getNotAllArgs=function(W,J,te,re){var ne={avoidConstraints:!1,isMultiInject:J,serviceIdentifier:W,key:te,value:re};return ne},X.prototype._planAndResolve=function(){var W=this;return function(J){var te=plan(W._metadataReader,W,J.isMultiInject,J.targetType,J.serviceIdentifier,J.key,J.value,J.avoidConstraints);te=J.contextInterceptor(te);var re=resolve(te);return re}},X.prototype._deactivateIfSingleton=function(W){var J=this;if(W.activated)return isPromise(W.cache)?W.cache.then(function(te){return J._deactivate(W,te)}):this._deactivate(W,W.cache)},X.prototype._deactivateSingletons=function(W){for(var J=0,te=W;J<te.length;J++){var re=te[J],ne=this._deactivateIfSingleton(re);if(isPromise(ne))throw new Error(ASYNC_UNBIND_REQUIRED)}},X.prototype._deactivateSingletonsAsync=function(W){return __awaiter(this,void 0,void 0,function(){var J=this;return __generator(this,function(te){switch(te.label){case 0:return[4,Promise.all(W.map(function(re){return J._deactivateIfSingleton(re)}))];case 1:return te.sent(),[2]}})})},X.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(W,J,te){return this.parent?this._deactivate.bind(this.parent)(W,J):this._bindingDeactivationAndPreDestroy(W,J,te)},X.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(W,J,te){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(re){switch(re.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(W,J)]:[3,2];case 1:return re.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(W,J,te)];case 3:re.sent(),re.label=4;case 4:return[2]}})})},X.prototype._removeServiceFromDictionary=function(W){try{this._bindingDictionary.remove(W)}catch{throw new Error(CANNOT_UNBIND+" "+getServiceIdentifierAsString(W))}},X.prototype._bindingDeactivationAndPreDestroy=function(W,J,te){var re=this;if(typeof W.onDeactivation=="function"){var ne=W.onDeactivation(J);if(isPromise(ne))return ne.then(function(){return re._preDestroy(te,J)})}return this._preDestroy(te,J)},X.prototype._bindingDeactivationAndPreDestroyAsync=function(W,J,te){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(re){switch(re.label){case 0:return typeof W.onDeactivation!="function"?[3,2]:[4,W.onDeactivation(J)];case 1:re.sent(),re.label=2;case 2:return[4,this._preDestroy(te,J)];case 3:return re.sent(),[2]}})})},X}();function getFirstArrayDuplicate(X){for(var W=new Set,J=0,te=X;J<te.length;J++){var re=te[J];if(W.has(re))return re;W.add(re)}}function targetIsConstructorFunction(X){return X.prototype!==void 0}function _throwIfMethodParameter(X){if(X!==void 0)throw new Error(INVALID_DECORATOR_OPERATION)}function tagParameter(X,W,J,te){_throwIfMethodParameter(W),_tagParameterOrProperty(TAGGED,X,J.toString(),te)}function tagProperty(X,W,J){if(targetIsConstructorFunction(X))throw new Error(INVALID_DECORATOR_OPERATION);_tagParameterOrProperty(TAGGED_PROP,X.constructor,W,J)}function _ensureNoMetadataKeyDuplicates(X){var W=[];if(Array.isArray(X)){W=X;var J=getFirstArrayDuplicate(W.map(function(te){return te.key}));if(J!==void 0)throw new Error(DUPLICATED_METADATA+" "+J.toString())}else W=[X];return W}function _tagParameterOrProperty(X,W,J,te){var re=_ensureNoMetadataKeyDuplicates(te),ne={};Reflect.hasOwnMetadata(X,W)&&(ne=Reflect.getMetadata(X,W));var oe=ne[J];if(oe===void 0)oe=[];else for(var de=function(pe){if(re.some(function(fe){return fe.key===pe.key}))throw new Error(DUPLICATED_METADATA+" "+pe.key.toString())},ue=0,ce=oe;ue<ce.length;ue++){var he=ce[ue];de(he)}oe.push.apply(oe,re),ne[J]=oe,Reflect.defineMetadata(X,ne,W)}function createTaggedDecorator(X){return function(W,J,te){typeof te=="number"?tagParameter(W,J,te,X):tagProperty(W,J,X)}}function injectable(){return function(X){if(Reflect.hasOwnMetadata(PARAM_TYPES,X))throw new Error(DUPLICATED_INJECTABLE_DECORATOR);var W=Reflect.getMetadata(DESIGN_PARAM_TYPES,X)||[];return Reflect.defineMetadata(PARAM_TYPES,W,X),X}}function injectBase(X){return function(W){return function(J,te,re){if(W===void 0){var ne=typeof J=="function"?J.name:J.constructor.name;throw new Error(UNDEFINED_INJECT_ANNOTATION(ne))}return createTaggedDecorator(new Metadata(X,W))(J,te,re)}}}var inject=injectBase(INJECT_TAG);const registerRequest$1=(X,W)=>(J,te)=>{W.bind(te).to(te).inTransientScope(),injectable()(te);const re=X.broker.registerRequest(J,ne=>W.get(te).handle(ne));return{dispose:()=>{W.isBound(te)&&W.unbind(te),re.dispose()}}},brokerExtensions=(X,W)=>({registerRequest:registerRequest$1(X,W)});function rand(X){const W=Math.random()*16|0;return(X==="x"?W:W&3|8).toString(16)}function generateId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,rand)}function createConnectToStoreDecorator(X){return function(J){return(te,re)=>{Object.defineProperty(te,re,{get(){return this[`__${re}`]},set(de){this[`__${re}`]!==de&&(this[`__${re}`]=Array.isArray(de)?[...de]:typeof de=="object"&&de!==null?{...de}:de,this.requestUpdate(re))},configurable:!0,enumerable:!0});const ne=te.connectedCallback,oe=te.disconnectedCallback;te.connectedCallback=function(){ne&&ne.call(this),this[re]=J(X.getState()),this[`__unsubscribe__${re}`]=X.subscribe(()=>{const de=J(X.getState());this[re]=Array.isArray(de)?[...de]:typeof de=="object"&&de!==null?{...de}:de})},te.disconnectedCallback=function(){oe&&oe.call(this),this[`__unsubscribe__${re}`]&&this[`__unsubscribe__${re}`]()}}}}function createConnectedProperty(X){return(W,J={})=>{const te=createConnectToStoreDecorator(X);return(re,ne)=>{n$w(J)(re,ne),te(W)(re,ne)}}}const pdfViewerId="pdf-viewer";let shellLocaleManager;const useLocalization=async X=>{L$3("ca"),shellLocaleManager=await X.createLocaleManager(locales$1)},translate$1=X=>shellLocaleManager?shellLocaleManager.translate(X):X,locales$1={ca:{[primariaShellId]:{title:"Estació de Treball Clínica",actions:{create:"Crear",toggleMenuClose:"Tancar menú",toggleMenuOpen:"Expandir menú",askExit:"Atenció, vols sortir igualment?",finalizeVisit:"Finalitzar visita"},clinicalMonitoring:{title:"Seguiment clínic"},errors:{session:"Hi ha hagut un error amb la sessió. Siusplau, tanca i torna a obrir l'aplicació.",invalidPatient:"El pacient actual no és vàlid. Siusplau, tanca i torna a obrir l'aplicació."},header:{workCenter:"Centre treball",role:"Rol",speciality:"Àmbit treball"},busyManager:{title:"Tasques pendents a desar:"},pdfManager:{uploaded:"Document disponible al visor de resultats",alreadyUploaded:"Ja s'ha carregat un document amb aquest nom",navButtonLabel:"Visor PDF",missingData:"Es necesita un document o URL per enviar al visor de resultats",duplicatedSource:"Només pots envar un document o URL a la vegada"},pdfVisor:{noPdfSelected:"No hi ha cap PDF seleccionat"}}}},styles$j=".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white}";/**
|
|
202
|
+
`+X+" - "+J}else return" "+X}function getFunctionName(X){if(X.name)return X.name;var W=X.toString(),J=W.match(/^function\s*([^\s(]+)/);return J?J[1]:"Anonymous function: "+W}function getSymbolDescription(X){return X.toString().slice(7,-1)}var Context=function(){function X(W){this.id=id(),this.container=W}return X.prototype.addPlan=function(W){this.plan=W},X.prototype.setCurrentRequest=function(W){this.currentRequest=W},X}(),Metadata=function(){function X(W,J){this.key=W,this.value=J}return X.prototype.toString=function(){return this.key===NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},X}(),Plan=function(){function X(W,J){this.parentContext=W,this.rootRequest=J}return X}(),LazyServiceIdentifier=function(){function X(W){this._cb=W}return X.prototype.unwrap=function(){return this._cb()},X}(),QueryableString=function(){function X(W){this.str=W}return X.prototype.startsWith=function(W){return this.str.indexOf(W)===0},X.prototype.endsWith=function(W){var J="",te=W.split("").reverse().join("");return J=this.str.split("").reverse().join(""),this.startsWith.call({str:J},te)},X.prototype.contains=function(W){return this.str.indexOf(W)!==-1},X.prototype.equals=function(W){return this.str===W},X.prototype.value=function(){return this.str},X}(),Target=function(){function X(W,J,te,re){this.id=id(),this.type=W,this.serviceIdentifier=te;var ne=typeof J=="symbol"?getSymbolDescription(J):J;this.name=new QueryableString(ne||""),this.identifier=J,this.metadata=new Array;var oe=null;typeof re=="string"?oe=new Metadata(NAMED_TAG,re):re instanceof Metadata&&(oe=re),oe!==null&&this.metadata.push(oe)}return X.prototype.hasTag=function(W){for(var J=0,te=this.metadata;J<te.length;J++){var re=te[J];if(re.key===W)return!0}return!1},X.prototype.isArray=function(){return this.hasTag(MULTI_INJECT_TAG)},X.prototype.matchesArray=function(W){return this.matchesTag(MULTI_INJECT_TAG)(W)},X.prototype.isNamed=function(){return this.hasTag(NAMED_TAG)},X.prototype.isTagged=function(){return this.metadata.some(function(W){return NON_CUSTOM_TAG_KEYS.every(function(J){return W.key!==J})})},X.prototype.isOptional=function(){return this.matchesTag(OPTIONAL_TAG)(!0)},X.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter(function(W){return W.key===NAMED_TAG})[0]:null},X.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter(function(W){return NON_CUSTOM_TAG_KEYS.every(function(J){return W.key!==J})}):null},X.prototype.matchesNamedTag=function(W){return this.matchesTag(NAMED_TAG)(W)},X.prototype.matchesTag=function(W){var J=this;return function(te){for(var re=0,ne=J.metadata;re<ne.length;re++){var oe=ne[re];if(oe.key===W&&oe.value===te)return!0}return!1}},X}(),__spreadArray$2=function(X,W,J){if(J||arguments.length===2)for(var te=0,re=W.length,ne;te<re;te++)(ne||!(te in W))&&(ne||(ne=Array.prototype.slice.call(W,0,te)),ne[te]=W[te]);return X.concat(ne||Array.prototype.slice.call(W))};function getDependencies$1(X,W){var J=getFunctionName(W);return getTargets(X,J,W,!1)}function getTargets(X,W,J,te){var re=X.getConstructorMetadata(J),ne=re.compilerGeneratedMetadata;if(ne===void 0){var oe=MISSING_INJECTABLE_ANNOTATION+" "+W+".";throw new Error(oe)}var de=re.userGeneratedMetadata,ue=Object.keys(de),ce=J.length===0&&ue.length>0,he=ue.length>J.length,pe=ce||he?ue.length:J.length,fe=getConstructorArgsAsTargets(te,W,ne,de,pe),ge=getClassPropsAsTargets(X,J,W),be=__spreadArray$2(__spreadArray$2([],fe,!0),ge,!0);return be}function getConstructorArgsAsTarget(X,W,J,te,re){var ne=re[X.toString()]||[],oe=formatTargetMetadata(ne),de=oe.unmanaged!==!0,ue=te[X],ce=oe.inject||oe.multiInject;if(ue=ce||ue,ue instanceof LazyServiceIdentifier&&(ue=ue.unwrap()),de){var he=ue===Object,pe=ue===Function,fe=ue===void 0,ge=he||pe||fe;if(!W&&ge){var be=MISSING_INJECT_ANNOTATION+" argument "+X+" in class "+J+".";throw new Error(be)}var me=new Target(TargetTypeEnum.ConstructorArgument,oe.targetName,ue);return me.metadata=ne,me}return null}function getConstructorArgsAsTargets(X,W,J,te,re){for(var ne=[],oe=0;oe<re;oe++){var de=oe,ue=getConstructorArgsAsTarget(de,X,W,J,te);ue!==null&&ne.push(ue)}return ne}function _getServiceIdentifierForProperty(X,W,J,te){var re=X||W;if(re===void 0){var ne=MISSING_INJECTABLE_ANNOTATION+" for property "+String(J)+" in class "+te+".";throw new Error(ne)}return re}function getClassPropsAsTargets(X,W,J){for(var te=X.getPropertiesMetadata(W),re=[],ne=Object.getOwnPropertySymbols(te),oe=Object.keys(te),de=oe.concat(ne),ue=0,ce=de;ue<ce.length;ue++){var he=ce[ue],pe=te[he],fe=formatTargetMetadata(pe),ge=fe.targetName||he,be=_getServiceIdentifierForProperty(fe.inject,fe.multiInject,he,J),me=new Target(TargetTypeEnum.ClassProperty,ge,be);me.metadata=pe,re.push(me)}var ve=Object.getPrototypeOf(W.prototype).constructor;if(ve!==Object){var ye=getClassPropsAsTargets(X,ve,J);re=__spreadArray$2(__spreadArray$2([],re,!0),ye,!0)}return re}function getBaseClassDependencyCount(X,W){var J=Object.getPrototypeOf(W.prototype).constructor;if(J!==Object){var te=getFunctionName(J),re=getTargets(X,te,J,!0),ne=re.map(function(ue){return ue.metadata.filter(function(ce){return ce.key===UNMANAGED_TAG})}),oe=[].concat.apply([],ne).length,de=re.length-oe;return de>0?de:getBaseClassDependencyCount(X,J)}else return 0}function formatTargetMetadata(X){var W={};return X.forEach(function(J){W[J.key.toString()]=J.value}),{inject:W[INJECT_TAG],multiInject:W[MULTI_INJECT_TAG],targetName:W[NAME_TAG],unmanaged:W[UNMANAGED_TAG]}}var Request$1=function(){function X(W,J,te,re,ne){this.id=id(),this.serviceIdentifier=W,this.parentContext=J,this.parentRequest=te,this.target=ne,this.childRequests=[],this.bindings=Array.isArray(re)?re:[re],this.requestScope=te===null?new Map:null}return X.prototype.addChildRequest=function(W,J,te){var re=new X(W,this.parentContext,this,J,te);return this.childRequests.push(re),re},X}();function getBindingDictionary(X){return X._bindingDictionary}function _createTarget(X,W,J,te,re,ne){var oe=X?MULTI_INJECT_TAG:INJECT_TAG,de=new Metadata(oe,J),ue=new Target(W,te,J,de);if(re!==void 0){var ce=new Metadata(re,ne);ue.metadata.push(ce)}return ue}function _getActiveBindings(X,W,J,te,re){var ne=getBindings(J.container,re.serviceIdentifier),oe=[];return ne.length===BindingCount.NoBindingsAvailable&&J.container.options.autoBindInjectable&&typeof re.serviceIdentifier=="function"&&X.getConstructorMetadata(re.serviceIdentifier).compilerGeneratedMetadata&&(J.container.bind(re.serviceIdentifier).toSelf(),ne=getBindings(J.container,re.serviceIdentifier)),W?oe=ne:oe=ne.filter(function(de){var ue=new Request$1(de.serviceIdentifier,J,te,de,re);return de.constraint(ue)}),_validateActiveBindingCount(re.serviceIdentifier,oe,re,J.container),oe}function _validateActiveBindingCount(X,W,J,te){switch(W.length){case BindingCount.NoBindingsAvailable:if(J.isOptional())return W;var re=getServiceIdentifierAsString(X),ne=NOT_REGISTERED;throw ne+=listMetadataForTarget(re,J),ne+=listRegisteredBindingsForServiceIdentifier(te,re,getBindings),new Error(ne);case BindingCount.OnlyOneBindingAvailable:return W;case BindingCount.MultipleBindingsAvailable:default:if(J.isArray())return W;var re=getServiceIdentifierAsString(X),ne=AMBIGUOUS_MATCH+" "+re;throw ne+=listRegisteredBindingsForServiceIdentifier(te,re,getBindings),new Error(ne)}}function _createSubRequests(X,W,J,te,re,ne){var oe,de;if(re===null){oe=_getActiveBindings(X,W,te,null,ne),de=new Request$1(J,te,null,oe,ne);var ue=new Plan(te,de);te.addPlan(ue)}else oe=_getActiveBindings(X,W,te,re,ne),de=re.addChildRequest(ne.serviceIdentifier,oe,ne);oe.forEach(function(ce){var he=null;if(ne.isArray())he=de.addChildRequest(ce.serviceIdentifier,ce,ne);else{if(ce.cache)return;he=de}if(ce.type===BindingTypeEnum.Instance&&ce.implementationType!==null){var pe=getDependencies$1(X,ce.implementationType);if(!te.container.options.skipBaseClassChecks){var fe=getBaseClassDependencyCount(X,ce.implementationType);if(pe.length<fe){var ge=ARGUMENTS_LENGTH_MISMATCH(getFunctionName(ce.implementationType));throw new Error(ge)}}pe.forEach(function(be){_createSubRequests(X,!1,be.serviceIdentifier,te,he,be)})}})}function getBindings(X,W){var J=[],te=getBindingDictionary(X);return te.hasKey(W)?J=te.get(W):X.parent!==null&&(J=getBindings(X.parent,W)),J}function plan(X,W,J,te,re,ne,oe,de){de===void 0&&(de=!1);var ue=new Context(W),ce=_createTarget(J,te,re,"",ne,oe);try{return _createSubRequests(X,de,re,ue,null,ce),ue}catch(he){throw isStackOverflowExeption(he)&&circularDependencyToException(ue.plan.rootRequest),he}}function createMockRequest(X,W,J,te){var re=new Target(TargetTypeEnum.Variable,"",W,new Metadata(J,te)),ne=new Context(X),oe=new Request$1(W,ne,null,[],re);return oe}function isPromise(X){var W=typeof X=="object"&&X!==null||typeof X=="function";return W&&typeof X.then=="function"}function isPromiseOrContainsPromise(X){return isPromise(X)?!0:Array.isArray(X)&&X.some(isPromise)}var __awaiter$3=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator$3=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},tryGetFromScope=function(X,W){return W.scope===BindingScopeEnum.Singleton&&W.activated?W.cache:W.scope===BindingScopeEnum.Request&&X.has(W.id)?X.get(W.id):null},saveToScope=function(X,W,J){W.scope===BindingScopeEnum.Singleton&&_saveToSingletonScope(W,J),W.scope===BindingScopeEnum.Request&&_saveToRequestScope(X,W,J)},_saveToRequestScope=function(X,W,J){X.has(W.id)||X.set(W.id,J)},_saveToSingletonScope=function(X,W){X.cache=W,X.activated=!0,isPromise(W)&&_saveAsyncResultToSingletonScope(X,W)},_saveAsyncResultToSingletonScope=function(X,W){return __awaiter$3(void 0,void 0,void 0,function(){var J,te;return __generator$3(this,function(re){switch(re.label){case 0:return re.trys.push([0,2,,3]),[4,W];case 1:return J=re.sent(),X.cache=J,[3,3];case 2:throw te=re.sent(),X.cache=null,X.activated=!1,te;case 3:return[2]}})})},FactoryType;(function(X){X.DynamicValue="toDynamicValue",X.Factory="toFactory",X.Provider="toProvider"})(FactoryType||(FactoryType={}));var ensureFullyBound=function(X){var W=null;switch(X.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:W=X.cache;break;case BindingTypeEnum.Constructor:case BindingTypeEnum.Instance:W=X.implementationType;break;case BindingTypeEnum.DynamicValue:W=X.dynamicValue;break;case BindingTypeEnum.Provider:W=X.provider;break;case BindingTypeEnum.Factory:W=X.factory;break}if(W===null){var J=getServiceIdentifierAsString(X.serviceIdentifier);throw new Error(INVALID_BINDING_TYPE+" "+J)}},getFactoryDetails=function(X){switch(X.type){case BindingTypeEnum.Factory:return{factory:X.factory,factoryType:FactoryType.Factory};case BindingTypeEnum.Provider:return{factory:X.provider,factoryType:FactoryType.Provider};case BindingTypeEnum.DynamicValue:return{factory:X.dynamicValue,factoryType:FactoryType.DynamicValue};default:throw new Error("Unexpected factory type "+X.type)}},__assign$1=function(){return __assign$1=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign$1.apply(this,arguments)},__awaiter$2=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator$2=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},__spreadArray$1=function(X,W,J){if(J||arguments.length===2)for(var te=0,re=W.length,ne;te<re;te++)(ne||!(te in W))&&(ne||(ne=Array.prototype.slice.call(W,0,te)),ne[te]=W[te]);return X.concat(ne||Array.prototype.slice.call(W))};function _resolveRequests(X,W){return X.reduce(function(J,te){var re=W(te),ne=te.target.type;return ne===TargetTypeEnum.ConstructorArgument?J.constructorInjections.push(re):(J.propertyRequests.push(te),J.propertyInjections.push(re)),J.isAsync||(J.isAsync=isPromiseOrContainsPromise(re)),J},{constructorInjections:[],propertyInjections:[],propertyRequests:[],isAsync:!1})}function _createInstance(X,W,J){var te;if(W.length>0){var re=_resolveRequests(W,J),ne=__assign$1(__assign$1({},re),{constr:X});re.isAsync?te=createInstanceWithInjectionsAsync(ne):te=createInstanceWithInjections(ne)}else te=new X;return te}function createInstanceWithInjections(X){var W,J=new((W=X.constr).bind.apply(W,__spreadArray$1([void 0],X.constructorInjections,!1)));return X.propertyRequests.forEach(function(te,re){var ne=te.target.identifier,oe=X.propertyInjections[re];(!te.target.isOptional()||oe!==void 0)&&(J[ne]=oe)}),J}function createInstanceWithInjectionsAsync(X){return __awaiter$2(this,void 0,void 0,function(){var W,J;return __generator$2(this,function(te){switch(te.label){case 0:return[4,possiblyWaitInjections(X.constructorInjections)];case 1:return W=te.sent(),[4,possiblyWaitInjections(X.propertyInjections)];case 2:return J=te.sent(),[2,createInstanceWithInjections(__assign$1(__assign$1({},X),{constructorInjections:W,propertyInjections:J}))]}})})}function possiblyWaitInjections(X){return __awaiter$2(this,void 0,void 0,function(){var W,J,te,re;return __generator$2(this,function(ne){for(W=[],J=0,te=X;J<te.length;J++)re=te[J],Array.isArray(re)?W.push(Promise.all(re)):W.push(re);return[2,Promise.all(W)]})})}function _getInstanceAfterPostConstruct(X,W){var J=_postConstruct(X,W);return isPromise(J)?J.then(function(){return W}):W}function _postConstruct(X,W){var J,te;if(Reflect.hasMetadata(POST_CONSTRUCT,X)){var re=Reflect.getMetadata(POST_CONSTRUCT,X);try{return(te=(J=W)[re.value])===null||te===void 0?void 0:te.call(J)}catch(ne){if(ne instanceof Error)throw new Error(POST_CONSTRUCT_ERROR(X.name,ne.message))}}}function _validateInstanceResolution(X,W){X.scope!==BindingScopeEnum.Singleton&&_throwIfHandlingDeactivation(X,W)}function _throwIfHandlingDeactivation(X,W){var J="Class cannot be instantiated in "+(X.scope===BindingScopeEnum.Request?"request":"transient")+" scope.";if(typeof X.onDeactivation=="function")throw new Error(ON_DEACTIVATION_ERROR(W.name,J));if(Reflect.hasMetadata(PRE_DESTROY,W))throw new Error(PRE_DESTROY_ERROR(W.name,J))}function resolveInstance(X,W,J,te){_validateInstanceResolution(X,W);var re=_createInstance(W,J,te);return isPromise(re)?re.then(function(ne){return _getInstanceAfterPostConstruct(W,ne)}):_getInstanceAfterPostConstruct(W,re)}var __awaiter$1=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator$1=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},_resolveRequest=function(X){return function(W){W.parentContext.setCurrentRequest(W);var J=W.bindings,te=W.childRequests,re=W.target&&W.target.isArray(),ne=!W.parentRequest||!W.parentRequest.target||!W.target||!W.parentRequest.target.matchesArray(W.target.serviceIdentifier);if(re&&ne)return te.map(function(de){var ue=_resolveRequest(X);return ue(de)});if(W.target.isOptional()&&J.length===0)return;var oe=J[0];return _resolveBinding(X,W,oe)}},_resolveFactoryFromBinding=function(X,W){var J=getFactoryDetails(X);return tryAndThrowErrorIfStackOverflow(function(){return J.factory.bind(X)(W)},function(){return new Error(CIRCULAR_DEPENDENCY_IN_FACTORY(J.factoryType,W.currentRequest.serviceIdentifier.toString()))})},_getResolvedFromBinding=function(X,W,J){var te,re=W.childRequests;switch(ensureFullyBound(J),J.type){case BindingTypeEnum.ConstantValue:case BindingTypeEnum.Function:te=J.cache;break;case BindingTypeEnum.Constructor:te=J.implementationType;break;case BindingTypeEnum.Instance:te=resolveInstance(J,J.implementationType,re,_resolveRequest(X));break;default:te=_resolveFactoryFromBinding(J,W.parentContext)}return te},_resolveInScope=function(X,W,J){var te=tryGetFromScope(X,W);return te!==null||(te=J(),saveToScope(X,W,te)),te},_resolveBinding=function(X,W,J){return _resolveInScope(X,J,function(){var te=_getResolvedFromBinding(X,W,J);return isPromise(te)?te=te.then(function(re){return _onActivation(W,J,re)}):te=_onActivation(W,J,te),te})};function _onActivation(X,W,J){var te=_bindingActivation(X.parentContext,W,J),re=_getContainersIterator(X.parentContext.container),ne,oe=re.next();do{ne=oe.value;var de=X.parentContext,ue=X.serviceIdentifier,ce=_getContainerActivationsForService(ne,ue);isPromise(te)?te=_activateContainerAsync(ce,de,te):te=_activateContainer(ce,de,te),oe=re.next()}while(oe.done!==!0&&!getBindingDictionary(ne).hasKey(X.serviceIdentifier));return te}var _bindingActivation=function(X,W,J){var te;return typeof W.onActivation=="function"?te=W.onActivation(X,J):te=J,te},_activateContainer=function(X,W,J){for(var te=X.next();!te.done;){if(J=te.value(W,J),isPromise(J))return _activateContainerAsync(X,W,J);te=X.next()}return J},_activateContainerAsync=function(X,W,J){return __awaiter$1(void 0,void 0,void 0,function(){var te,re;return __generator$1(this,function(ne){switch(ne.label){case 0:return[4,J];case 1:te=ne.sent(),re=X.next(),ne.label=2;case 2:return re.done?[3,4]:[4,re.value(W,te)];case 3:return te=ne.sent(),re=X.next(),[3,2];case 4:return[2,te]}})})},_getContainerActivationsForService=function(X,W){var J=X._activations;return J.hasKey(W)?J.get(W).values():[].values()},_getContainersIterator=function(X){for(var W=[X],J=X.parent;J!==null;)W.push(J),J=J.parent;var te=function(){var ne=W.pop();return ne!==void 0?{done:!1,value:ne}:{done:!0,value:void 0}},re={next:te};return re};function resolve(X){var W=_resolveRequest(X.plan.rootRequest.requestScope);return W(X.plan.rootRequest)}var traverseAncerstors=function(X,W){var J=X.parentRequest;return J!==null?W(J)?!0:traverseAncerstors(J,W):!1},taggedConstraint=function(X){return function(W){var J=function(te){return te!==null&&te.target!==null&&te.target.matchesTag(X)(W)};return J.metaData=new Metadata(X,W),J}},namedConstraint=taggedConstraint(NAMED_TAG),typeConstraint=function(X){return function(W){var J=null;if(W!==null)if(J=W.bindings[0],typeof X=="string"){var te=J.serviceIdentifier;return te===X}else{var re=W.bindings[0].implementationType;return X===re}return!1}},BindingWhenSyntax=function(){function X(W){this._binding=W}return X.prototype.when=function(W){return this._binding.constraint=W,new BindingOnSyntax(this._binding)},X.prototype.whenTargetNamed=function(W){return this._binding.constraint=namedConstraint(W),new BindingOnSyntax(this._binding)},X.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(W){if(W===null)return!1;var J=W.target!==null&&!W.target.isNamed()&&!W.target.isTagged();return J},new BindingOnSyntax(this._binding)},X.prototype.whenTargetTagged=function(W,J){return this._binding.constraint=taggedConstraint(W)(J),new BindingOnSyntax(this._binding)},X.prototype.whenInjectedInto=function(W){return this._binding.constraint=function(J){return J!==null&&typeConstraint(W)(J.parentRequest)},new BindingOnSyntax(this._binding)},X.prototype.whenParentNamed=function(W){return this._binding.constraint=function(J){return J!==null&&namedConstraint(W)(J.parentRequest)},new BindingOnSyntax(this._binding)},X.prototype.whenParentTagged=function(W,J){return this._binding.constraint=function(te){return te!==null&&taggedConstraint(W)(J)(te.parentRequest)},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorIs=function(W){return this._binding.constraint=function(J){return J!==null&&traverseAncerstors(J,typeConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorIs=function(W){return this._binding.constraint=function(J){return J!==null&&!traverseAncerstors(J,typeConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorNamed=function(W){return this._binding.constraint=function(J){return J!==null&&traverseAncerstors(J,namedConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorNamed=function(W){return this._binding.constraint=function(J){return J!==null&&!traverseAncerstors(J,namedConstraint(W))},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorTagged=function(W,J){return this._binding.constraint=function(te){return te!==null&&traverseAncerstors(te,taggedConstraint(W)(J))},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorTagged=function(W,J){return this._binding.constraint=function(te){return te!==null&&!traverseAncerstors(te,taggedConstraint(W)(J))},new BindingOnSyntax(this._binding)},X.prototype.whenAnyAncestorMatches=function(W){return this._binding.constraint=function(J){return J!==null&&traverseAncerstors(J,W)},new BindingOnSyntax(this._binding)},X.prototype.whenNoAncestorMatches=function(W){return this._binding.constraint=function(J){return J!==null&&!traverseAncerstors(J,W)},new BindingOnSyntax(this._binding)},X}(),BindingOnSyntax=function(){function X(W){this._binding=W}return X.prototype.onActivation=function(W){return this._binding.onActivation=W,new BindingWhenSyntax(this._binding)},X.prototype.onDeactivation=function(W){return this._binding.onDeactivation=W,new BindingWhenSyntax(this._binding)},X}(),BindingWhenOnSyntax=function(){function X(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding)}return X.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},X.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},X.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},X.prototype.whenTargetTagged=function(W,J){return this._bindingWhenSyntax.whenTargetTagged(W,J)},X.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},X.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},X.prototype.whenParentTagged=function(W,J){return this._bindingWhenSyntax.whenParentTagged(W,J)},X.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},X.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},X.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},X.prototype.whenAnyAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,J)},X.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},X.prototype.whenNoAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenNoAncestorTagged(W,J)},X.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},X.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},X.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},X.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},X}(),BindingInSyntax=function(){function X(W){this._binding=W}return X.prototype.inRequestScope=function(){return this._binding.scope=BindingScopeEnum.Request,new BindingWhenOnSyntax(this._binding)},X.prototype.inSingletonScope=function(){return this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.inTransientScope=function(){return this._binding.scope=BindingScopeEnum.Transient,new BindingWhenOnSyntax(this._binding)},X}(),BindingInWhenOnSyntax=function(){function X(W){this._binding=W,this._bindingWhenSyntax=new BindingWhenSyntax(this._binding),this._bindingOnSyntax=new BindingOnSyntax(this._binding),this._bindingInSyntax=new BindingInSyntax(W)}return X.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},X.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},X.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},X.prototype.when=function(W){return this._bindingWhenSyntax.when(W)},X.prototype.whenTargetNamed=function(W){return this._bindingWhenSyntax.whenTargetNamed(W)},X.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},X.prototype.whenTargetTagged=function(W,J){return this._bindingWhenSyntax.whenTargetTagged(W,J)},X.prototype.whenInjectedInto=function(W){return this._bindingWhenSyntax.whenInjectedInto(W)},X.prototype.whenParentNamed=function(W){return this._bindingWhenSyntax.whenParentNamed(W)},X.prototype.whenParentTagged=function(W,J){return this._bindingWhenSyntax.whenParentTagged(W,J)},X.prototype.whenAnyAncestorIs=function(W){return this._bindingWhenSyntax.whenAnyAncestorIs(W)},X.prototype.whenNoAncestorIs=function(W){return this._bindingWhenSyntax.whenNoAncestorIs(W)},X.prototype.whenAnyAncestorNamed=function(W){return this._bindingWhenSyntax.whenAnyAncestorNamed(W)},X.prototype.whenAnyAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenAnyAncestorTagged(W,J)},X.prototype.whenNoAncestorNamed=function(W){return this._bindingWhenSyntax.whenNoAncestorNamed(W)},X.prototype.whenNoAncestorTagged=function(W,J){return this._bindingWhenSyntax.whenNoAncestorTagged(W,J)},X.prototype.whenAnyAncestorMatches=function(W){return this._bindingWhenSyntax.whenAnyAncestorMatches(W)},X.prototype.whenNoAncestorMatches=function(W){return this._bindingWhenSyntax.whenNoAncestorMatches(W)},X.prototype.onActivation=function(W){return this._bindingOnSyntax.onActivation(W)},X.prototype.onDeactivation=function(W){return this._bindingOnSyntax.onDeactivation(W)},X}(),BindingToSyntax=function(){function X(W){this._binding=W}return X.prototype.to=function(W){return this._binding.type=BindingTypeEnum.Instance,this._binding.implementationType=W,new BindingInWhenOnSyntax(this._binding)},X.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+INVALID_TO_SELF_VALUE);var W=this._binding.serviceIdentifier;return this.to(W)},X.prototype.toConstantValue=function(W){return this._binding.type=BindingTypeEnum.ConstantValue,this._binding.cache=W,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toDynamicValue=function(W){return this._binding.type=BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=W,this._binding.implementationType=null,new BindingInWhenOnSyntax(this._binding)},X.prototype.toConstructor=function(W){return this._binding.type=BindingTypeEnum.Constructor,this._binding.implementationType=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toFunction=function(W){if(typeof W!="function")throw new Error(INVALID_FUNCTION_BINDING);var J=this.toConstantValue(W);return this._binding.type=BindingTypeEnum.Function,this._binding.scope=BindingScopeEnum.Singleton,J},X.prototype.toAutoFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(J){var te=function(){return J.container.get(W)};return te},this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toAutoNamedFactory=function(W){return this._binding.type=BindingTypeEnum.Factory,this._binding.factory=function(J){return function(te){return J.container.getNamed(W,te)}},new BindingWhenOnSyntax(this._binding)},X.prototype.toProvider=function(W){return this._binding.type=BindingTypeEnum.Provider,this._binding.provider=W,this._binding.scope=BindingScopeEnum.Singleton,new BindingWhenOnSyntax(this._binding)},X.prototype.toService=function(W){this.toDynamicValue(function(J){return J.container.get(W)})},X}(),ContainerSnapshot=function(){function X(){}return X.of=function(W,J,te,re,ne){var oe=new X;return oe.bindings=W,oe.middleware=J,oe.deactivations=re,oe.activations=te,oe.moduleActivationStore=ne,oe},X}();function isClonable(X){return typeof X=="object"&&X!==null&&"clone"in X&&typeof X.clone=="function"}var Lookup=function(){function X(){this._map=new Map}return X.prototype.getMap=function(){return this._map},X.prototype.add=function(W,J){if(W==null)throw new Error(NULL_ARGUMENT);if(J==null)throw new Error(NULL_ARGUMENT);var te=this._map.get(W);te!==void 0?te.push(J):this._map.set(W,[J])},X.prototype.get=function(W){if(W==null)throw new Error(NULL_ARGUMENT);var J=this._map.get(W);if(J!==void 0)return J;throw new Error(KEY_NOT_FOUND)},X.prototype.remove=function(W){if(W==null)throw new Error(NULL_ARGUMENT);if(!this._map.delete(W))throw new Error(KEY_NOT_FOUND)},X.prototype.removeIntersection=function(W){var J=this;this.traverse(function(te,re){var ne=W.hasKey(te)?W.get(te):void 0;if(ne!==void 0){var oe=re.filter(function(de){return!ne.some(function(ue){return de===ue})});J._setValue(te,oe)}})},X.prototype.removeByCondition=function(W){var J=this,te=[];return this._map.forEach(function(re,ne){for(var oe=[],de=0,ue=re;de<ue.length;de++){var ce=ue[de],he=W(ce);he?te.push(ce):oe.push(ce)}J._setValue(ne,oe)}),te},X.prototype.hasKey=function(W){if(W==null)throw new Error(NULL_ARGUMENT);return this._map.has(W)},X.prototype.clone=function(){var W=new X;return this._map.forEach(function(J,te){J.forEach(function(re){return W.add(te,isClonable(re)?re.clone():re)})}),W},X.prototype.traverse=function(W){this._map.forEach(function(J,te){W(te,J)})},X.prototype._setValue=function(W,J){J.length>0?this._map.set(W,J):this._map.delete(W)},X}(),ModuleActivationStore=function(){function X(){this._map=new Map}return X.prototype.remove=function(W){if(this._map.has(W)){var J=this._map.get(W);return this._map.delete(W),J}return this._getEmptyHandlersStore()},X.prototype.addDeactivation=function(W,J,te){this._getModuleActivationHandlers(W).onDeactivations.add(J,te)},X.prototype.addActivation=function(W,J,te){this._getModuleActivationHandlers(W).onActivations.add(J,te)},X.prototype.clone=function(){var W=new X;return this._map.forEach(function(J,te){W._map.set(te,{onActivations:J.onActivations.clone(),onDeactivations:J.onDeactivations.clone()})}),W},X.prototype._getModuleActivationHandlers=function(W){var J=this._map.get(W);return J===void 0&&(J=this._getEmptyHandlersStore(),this._map.set(W,J)),J},X.prototype._getEmptyHandlersStore=function(){var W={onActivations:new Lookup,onDeactivations:new Lookup};return W},X}(),__assign=function(){return __assign=Object.assign||function(X){for(var W,J=1,te=arguments.length;J<te;J++){W=arguments[J];for(var re in W)Object.prototype.hasOwnProperty.call(W,re)&&(X[re]=W[re])}return X},__assign.apply(this,arguments)},__awaiter=function(X,W,J,te){function re(ne){return ne instanceof J?ne:new J(function(oe){oe(ne)})}return new(J||(J=Promise))(function(ne,oe){function de(he){try{ce(te.next(he))}catch(pe){oe(pe)}}function ue(he){try{ce(te.throw(he))}catch(pe){oe(pe)}}function ce(he){he.done?ne(he.value):re(he.value).then(de,ue)}ce((te=te.apply(X,W||[])).next())})},__generator=function(X,W){var J={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},te,re,ne,oe;return oe={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function de(ce){return function(he){return ue([ce,he])}}function ue(ce){if(te)throw new TypeError("Generator is already executing.");for(;J;)try{if(te=1,re&&(ne=ce[0]&2?re.return:ce[0]?re.throw||((ne=re.return)&&ne.call(re),0):re.next)&&!(ne=ne.call(re,ce[1])).done)return ne;switch(re=0,ne&&(ce=[ce[0]&2,ne.value]),ce[0]){case 0:case 1:ne=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,re=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(ne=J.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!ne||ce[1]>ne[0]&&ce[1]<ne[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<ne[1]){J.label=ne[1],ne=ce;break}if(ne&&J.label<ne[2]){J.label=ne[2],J.ops.push(ce);break}ne[2]&&J.ops.pop(),J.trys.pop();continue}ce=W.call(X,J)}catch(he){ce=[6,he],re=0}finally{te=ne=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},__spreadArray=function(X,W,J){if(J||arguments.length===2)for(var te=0,re=W.length,ne;te<re;te++)(ne||!(te in W))&&(ne||(ne=Array.prototype.slice.call(W,0,te)),ne[te]=W[te]);return X.concat(ne||Array.prototype.slice.call(W))},Container=function(){function X(W){var J=W||{};if(typeof J!="object")throw new Error(""+CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(J.defaultScope===void 0)J.defaultScope=BindingScopeEnum.Transient;else if(J.defaultScope!==BindingScopeEnum.Singleton&&J.defaultScope!==BindingScopeEnum.Transient&&J.defaultScope!==BindingScopeEnum.Request)throw new Error(""+CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(J.autoBindInjectable===void 0)J.autoBindInjectable=!1;else if(typeof J.autoBindInjectable!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(J.skipBaseClassChecks===void 0)J.skipBaseClassChecks=!1;else if(typeof J.skipBaseClassChecks!="boolean")throw new Error(""+CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:J.autoBindInjectable,defaultScope:J.defaultScope,skipBaseClassChecks:J.skipBaseClassChecks},this.id=id(),this._bindingDictionary=new Lookup,this._snapshots=[],this._middleware=null,this._activations=new Lookup,this._deactivations=new Lookup,this.parent=null,this._metadataReader=new MetadataReader,this._moduleActivationStore=new ModuleActivationStore}return X.merge=function(W,J){for(var te=[],re=2;re<arguments.length;re++)te[re-2]=arguments[re];var ne=new X,oe=__spreadArray([W,J],te,!0).map(function(ce){return getBindingDictionary(ce)}),de=getBindingDictionary(ne);function ue(ce,he){ce.traverse(function(pe,fe){fe.forEach(function(ge){he.add(ge.serviceIdentifier,ge.clone())})})}return oe.forEach(function(ce){ue(ce,de)}),ne},X.prototype.load=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];for(var te=this._getContainerModuleHelpersFactory(),re=0,ne=W;re<ne.length;re++){var oe=ne[re],de=te(oe.id);oe.registry(de.bindFunction,de.unbindFunction,de.isboundFunction,de.rebindFunction,de.unbindAsyncFunction,de.onActivationFunction,de.onDeactivationFunction)}},X.prototype.loadAsync=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];return __awaiter(this,void 0,void 0,function(){var te,re,ne,oe,de;return __generator(this,function(ue){switch(ue.label){case 0:te=this._getContainerModuleHelpersFactory(),re=0,ne=W,ue.label=1;case 1:return re<ne.length?(oe=ne[re],de=te(oe.id),[4,oe.registry(de.bindFunction,de.unbindFunction,de.isboundFunction,de.rebindFunction,de.unbindAsyncFunction,de.onActivationFunction,de.onDeactivationFunction)]):[3,4];case 2:ue.sent(),ue.label=3;case 3:return re++,[3,1];case 4:return[2]}})})},X.prototype.unload=function(){for(var W=this,J=[],te=0;te<arguments.length;te++)J[te]=arguments[te];J.forEach(function(re){var ne=W._removeModuleBindings(re.id);W._deactivateSingletons(ne),W._removeModuleHandlers(re.id)})},X.prototype.unloadAsync=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];return __awaiter(this,void 0,void 0,function(){var te,re,ne,oe;return __generator(this,function(de){switch(de.label){case 0:te=0,re=W,de.label=1;case 1:return te<re.length?(ne=re[te],oe=this._removeModuleBindings(ne.id),[4,this._deactivateSingletonsAsync(oe)]):[3,4];case 2:de.sent(),this._removeModuleHandlers(ne.id),de.label=3;case 3:return te++,[3,1];case 4:return[2]}})})},X.prototype.bind=function(W){var J=this.options.defaultScope||BindingScopeEnum.Transient,te=new Binding(W,J);return this._bindingDictionary.add(W,te),new BindingToSyntax(te)},X.prototype.rebind=function(W){return this.unbind(W),this.bind(W)},X.prototype.rebindAsync=function(W){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(J){switch(J.label){case 0:return[4,this.unbindAsync(W)];case 1:return J.sent(),[2,this.bind(W)]}})})},X.prototype.unbind=function(W){if(this._bindingDictionary.hasKey(W)){var J=this._bindingDictionary.get(W);this._deactivateSingletons(J)}this._removeServiceFromDictionary(W)},X.prototype.unbindAsync=function(W){return __awaiter(this,void 0,void 0,function(){var J;return __generator(this,function(te){switch(te.label){case 0:return this._bindingDictionary.hasKey(W)?(J=this._bindingDictionary.get(W),[4,this._deactivateSingletonsAsync(J)]):[3,2];case 1:te.sent(),te.label=2;case 2:return this._removeServiceFromDictionary(W),[2]}})})},X.prototype.unbindAll=function(){var W=this;this._bindingDictionary.traverse(function(J,te){W._deactivateSingletons(te)}),this._bindingDictionary=new Lookup},X.prototype.unbindAllAsync=function(){return __awaiter(this,void 0,void 0,function(){var W,J=this;return __generator(this,function(te){switch(te.label){case 0:return W=[],this._bindingDictionary.traverse(function(re,ne){W.push(J._deactivateSingletonsAsync(ne))}),[4,Promise.all(W)];case 1:return te.sent(),this._bindingDictionary=new Lookup,[2]}})})},X.prototype.onActivation=function(W,J){this._activations.add(W,J)},X.prototype.onDeactivation=function(W,J){this._deactivations.add(W,J)},X.prototype.isBound=function(W){var J=this._bindingDictionary.hasKey(W);return!J&&this.parent&&(J=this.parent.isBound(W)),J},X.prototype.isCurrentBound=function(W){return this._bindingDictionary.hasKey(W)},X.prototype.isBoundNamed=function(W,J){return this.isBoundTagged(W,NAMED_TAG,J)},X.prototype.isBoundTagged=function(W,J,te){var re=!1;if(this._bindingDictionary.hasKey(W)){var ne=this._bindingDictionary.get(W),oe=createMockRequest(this,W,J,te);re=ne.some(function(de){return de.constraint(oe)})}return!re&&this.parent&&(re=this.parent.isBoundTagged(W,J,te)),re},X.prototype.snapshot=function(){this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware,this._activations.clone(),this._deactivations.clone(),this._moduleActivationStore.clone()))},X.prototype.restore=function(){var W=this._snapshots.pop();if(W===void 0)throw new Error(NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=W.bindings,this._activations=W.activations,this._deactivations=W.deactivations,this._middleware=W.middleware,this._moduleActivationStore=W.moduleActivationStore},X.prototype.createChild=function(W){var J=new X(W||this.options);return J.parent=this,J},X.prototype.applyMiddleware=function(){for(var W=[],J=0;J<arguments.length;J++)W[J]=arguments[J];var te=this._middleware?this._middleware:this._planAndResolve();this._middleware=W.reduce(function(re,ne){return ne(re)},te)},X.prototype.applyCustomMetadataReader=function(W){this._metadataReader=W},X.prototype.get=function(W){var J=this._getNotAllArgs(W,!1);return this._getButThrowIfAsync(J)},X.prototype.getAsync=function(W){return __awaiter(this,void 0,void 0,function(){var J;return __generator(this,function(te){return J=this._getNotAllArgs(W,!1),[2,this._get(J)]})})},X.prototype.getTagged=function(W,J,te){var re=this._getNotAllArgs(W,!1,J,te);return this._getButThrowIfAsync(re)},X.prototype.getTaggedAsync=function(W,J,te){return __awaiter(this,void 0,void 0,function(){var re;return __generator(this,function(ne){return re=this._getNotAllArgs(W,!1,J,te),[2,this._get(re)]})})},X.prototype.getNamed=function(W,J){return this.getTagged(W,NAMED_TAG,J)},X.prototype.getNamedAsync=function(W,J){return this.getTaggedAsync(W,NAMED_TAG,J)},X.prototype.getAll=function(W){var J=this._getAllArgs(W);return this._getButThrowIfAsync(J)},X.prototype.getAllAsync=function(W){var J=this._getAllArgs(W);return this._getAll(J)},X.prototype.getAllTagged=function(W,J,te){var re=this._getNotAllArgs(W,!0,J,te);return this._getButThrowIfAsync(re)},X.prototype.getAllTaggedAsync=function(W,J,te){var re=this._getNotAllArgs(W,!0,J,te);return this._getAll(re)},X.prototype.getAllNamed=function(W,J){return this.getAllTagged(W,NAMED_TAG,J)},X.prototype.getAllNamedAsync=function(W,J){return this.getAllTaggedAsync(W,NAMED_TAG,J)},X.prototype.resolve=function(W){var J=this.isBound(W);J||this.bind(W).toSelf();var te=this.get(W);return J||this.unbind(W),te},X.prototype._preDestroy=function(W,J){var te,re;if(Reflect.hasMetadata(PRE_DESTROY,W)){var ne=Reflect.getMetadata(PRE_DESTROY,W);return(re=(te=J)[ne.value])===null||re===void 0?void 0:re.call(te)}},X.prototype._removeModuleHandlers=function(W){var J=this._moduleActivationStore.remove(W);this._activations.removeIntersection(J.onActivations),this._deactivations.removeIntersection(J.onDeactivations)},X.prototype._removeModuleBindings=function(W){return this._bindingDictionary.removeByCondition(function(J){return J.moduleId===W})},X.prototype._deactivate=function(W,J){var te=this,re=Object.getPrototypeOf(J).constructor;try{if(this._deactivations.hasKey(W.serviceIdentifier)){var ne=this._deactivateContainer(J,this._deactivations.get(W.serviceIdentifier).values());if(isPromise(ne))return this._handleDeactivationError(ne.then(function(){return te._propagateContainerDeactivationThenBindingAndPreDestroyAsync(W,J,re)}),re)}var oe=this._propagateContainerDeactivationThenBindingAndPreDestroy(W,J,re);if(isPromise(oe))return this._handleDeactivationError(oe,re)}catch(de){if(de instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(re.name,de.message))}},X.prototype._handleDeactivationError=function(W,J){return __awaiter(this,void 0,void 0,function(){var te;return __generator(this,function(re){switch(re.label){case 0:return re.trys.push([0,2,,3]),[4,W];case 1:return re.sent(),[3,3];case 2:if(te=re.sent(),te instanceof Error)throw new Error(ON_DEACTIVATION_ERROR(J.name,te.message));return[3,3];case 3:return[2]}})})},X.prototype._deactivateContainer=function(W,J){for(var te=this,re=J.next();re.value;){var ne=re.value(W);if(isPromise(ne))return ne.then(function(){return te._deactivateContainerAsync(W,J)});re=J.next()}},X.prototype._deactivateContainerAsync=function(W,J){return __awaiter(this,void 0,void 0,function(){var te;return __generator(this,function(re){switch(re.label){case 0:te=J.next(),re.label=1;case 1:return te.value?[4,te.value(W)]:[3,3];case 2:return re.sent(),te=J.next(),[3,1];case 3:return[2]}})})},X.prototype._getContainerModuleHelpersFactory=function(){var W=this,J=function(he,pe){he._binding.moduleId=pe},te=function(he){return function(pe){var fe=W.bind(pe);return J(fe,he),fe}},re=function(){return function(he){return W.unbind(he)}},ne=function(){return function(he){return W.unbindAsync(he)}},oe=function(){return function(he){return W.isBound(he)}},de=function(he){return function(pe){var fe=W.rebind(pe);return J(fe,he),fe}},ue=function(he){return function(pe,fe){W._moduleActivationStore.addActivation(he,pe,fe),W.onActivation(pe,fe)}},ce=function(he){return function(pe,fe){W._moduleActivationStore.addDeactivation(he,pe,fe),W.onDeactivation(pe,fe)}};return function(he){return{bindFunction:te(he),isboundFunction:oe(),onActivationFunction:ue(he),onDeactivationFunction:ce(he),rebindFunction:de(he),unbindFunction:re(),unbindAsyncFunction:ne()}}},X.prototype._getAll=function(W){return Promise.all(this._get(W))},X.prototype._get=function(W){var J=__assign(__assign({},W),{contextInterceptor:function(re){return re},targetType:TargetTypeEnum.Variable});if(this._middleware){var te=this._middleware(J);if(te==null)throw new Error(INVALID_MIDDLEWARE_RETURN);return te}return this._planAndResolve()(J)},X.prototype._getButThrowIfAsync=function(W){var J=this._get(W);if(isPromiseOrContainsPromise(J))throw new Error(LAZY_IN_SYNC(W.serviceIdentifier));return J},X.prototype._getAllArgs=function(W){var J={avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:W};return J},X.prototype._getNotAllArgs=function(W,J,te,re){var ne={avoidConstraints:!1,isMultiInject:J,serviceIdentifier:W,key:te,value:re};return ne},X.prototype._planAndResolve=function(){var W=this;return function(J){var te=plan(W._metadataReader,W,J.isMultiInject,J.targetType,J.serviceIdentifier,J.key,J.value,J.avoidConstraints);te=J.contextInterceptor(te);var re=resolve(te);return re}},X.prototype._deactivateIfSingleton=function(W){var J=this;if(W.activated)return isPromise(W.cache)?W.cache.then(function(te){return J._deactivate(W,te)}):this._deactivate(W,W.cache)},X.prototype._deactivateSingletons=function(W){for(var J=0,te=W;J<te.length;J++){var re=te[J],ne=this._deactivateIfSingleton(re);if(isPromise(ne))throw new Error(ASYNC_UNBIND_REQUIRED)}},X.prototype._deactivateSingletonsAsync=function(W){return __awaiter(this,void 0,void 0,function(){var J=this;return __generator(this,function(te){switch(te.label){case 0:return[4,Promise.all(W.map(function(re){return J._deactivateIfSingleton(re)}))];case 1:return te.sent(),[2]}})})},X.prototype._propagateContainerDeactivationThenBindingAndPreDestroy=function(W,J,te){return this.parent?this._deactivate.bind(this.parent)(W,J):this._bindingDeactivationAndPreDestroy(W,J,te)},X.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync=function(W,J,te){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(re){switch(re.label){case 0:return this.parent?[4,this._deactivate.bind(this.parent)(W,J)]:[3,2];case 1:return re.sent(),[3,4];case 2:return[4,this._bindingDeactivationAndPreDestroyAsync(W,J,te)];case 3:re.sent(),re.label=4;case 4:return[2]}})})},X.prototype._removeServiceFromDictionary=function(W){try{this._bindingDictionary.remove(W)}catch{throw new Error(CANNOT_UNBIND+" "+getServiceIdentifierAsString(W))}},X.prototype._bindingDeactivationAndPreDestroy=function(W,J,te){var re=this;if(typeof W.onDeactivation=="function"){var ne=W.onDeactivation(J);if(isPromise(ne))return ne.then(function(){return re._preDestroy(te,J)})}return this._preDestroy(te,J)},X.prototype._bindingDeactivationAndPreDestroyAsync=function(W,J,te){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(re){switch(re.label){case 0:return typeof W.onDeactivation!="function"?[3,2]:[4,W.onDeactivation(J)];case 1:re.sent(),re.label=2;case 2:return[4,this._preDestroy(te,J)];case 3:return re.sent(),[2]}})})},X}();function getFirstArrayDuplicate(X){for(var W=new Set,J=0,te=X;J<te.length;J++){var re=te[J];if(W.has(re))return re;W.add(re)}}function targetIsConstructorFunction(X){return X.prototype!==void 0}function _throwIfMethodParameter(X){if(X!==void 0)throw new Error(INVALID_DECORATOR_OPERATION)}function tagParameter(X,W,J,te){_throwIfMethodParameter(W),_tagParameterOrProperty(TAGGED,X,J.toString(),te)}function tagProperty(X,W,J){if(targetIsConstructorFunction(X))throw new Error(INVALID_DECORATOR_OPERATION);_tagParameterOrProperty(TAGGED_PROP,X.constructor,W,J)}function _ensureNoMetadataKeyDuplicates(X){var W=[];if(Array.isArray(X)){W=X;var J=getFirstArrayDuplicate(W.map(function(te){return te.key}));if(J!==void 0)throw new Error(DUPLICATED_METADATA+" "+J.toString())}else W=[X];return W}function _tagParameterOrProperty(X,W,J,te){var re=_ensureNoMetadataKeyDuplicates(te),ne={};Reflect.hasOwnMetadata(X,W)&&(ne=Reflect.getMetadata(X,W));var oe=ne[J];if(oe===void 0)oe=[];else for(var de=function(pe){if(re.some(function(fe){return fe.key===pe.key}))throw new Error(DUPLICATED_METADATA+" "+pe.key.toString())},ue=0,ce=oe;ue<ce.length;ue++){var he=ce[ue];de(he)}oe.push.apply(oe,re),ne[J]=oe,Reflect.defineMetadata(X,ne,W)}function createTaggedDecorator(X){return function(W,J,te){typeof te=="number"?tagParameter(W,J,te,X):tagProperty(W,J,X)}}function injectable(){return function(X){if(Reflect.hasOwnMetadata(PARAM_TYPES,X))throw new Error(DUPLICATED_INJECTABLE_DECORATOR);var W=Reflect.getMetadata(DESIGN_PARAM_TYPES,X)||[];return Reflect.defineMetadata(PARAM_TYPES,W,X),X}}function injectBase(X){return function(W){return function(J,te,re){if(W===void 0){var ne=typeof J=="function"?J.name:J.constructor.name;throw new Error(UNDEFINED_INJECT_ANNOTATION(ne))}return createTaggedDecorator(new Metadata(X,W))(J,te,re)}}}var inject=injectBase(INJECT_TAG);const registerRequest$1=(X,W)=>(J,te)=>{W.bind(te).to(te).inTransientScope(),injectable()(te);const re=X.broker.registerRequest(J,ne=>W.get(te).handle(ne));return{dispose:()=>{W.isBound(te)&&W.unbind(te),re.dispose()}}},brokerExtensions=(X,W)=>({registerRequest:registerRequest$1(X,W)});function rand(X){const W=Math.random()*16|0;return(X==="x"?W:W&3|8).toString(16)}function generateId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,rand)}const mapArrayToLabelValue=(X,W,J)=>X.map(te=>({label:te[W],value:te[J]}));function createConnectToStoreDecorator(X){return function(J){return(te,re)=>{Object.defineProperty(te,re,{get(){return this[`__${re}`]},set(de){this[`__${re}`]!==de&&(this[`__${re}`]=Array.isArray(de)?[...de]:typeof de=="object"&&de!==null?{...de}:de,this.requestUpdate(re))},configurable:!0,enumerable:!0});const ne=te.connectedCallback,oe=te.disconnectedCallback;te.connectedCallback=function(){ne&&ne.call(this),this[re]=J(X.getState()),this[`__unsubscribe__${re}`]=X.subscribe(()=>{const de=J(X.getState());this[re]=Array.isArray(de)?[...de]:typeof de=="object"&&de!==null?{...de}:de})},te.disconnectedCallback=function(){oe&&oe.call(this),this[`__unsubscribe__${re}`]&&this[`__unsubscribe__${re}`]()}}}}function createConnectedProperty(X){return(W,J={})=>{const te=createConnectToStoreDecorator(X);return(re,ne)=>{n$w(J)(re,ne),te(W)(re,ne)}}}const pdfViewerId="pdf-viewer";let shellLocaleManager;const useLocalization=async X=>{L$3("ca"),shellLocaleManager=await X.createLocaleManager(locales$1)},translate$1=X=>shellLocaleManager?shellLocaleManager.translate(X):X,locales$1={ca:{[primariaShellId]:{title:"Estació de Treball Clínica",actions:{create:"Crear",toggleMenuClose:"Tancar menú",toggleMenuOpen:"Expandir menú",askExit:"Atenció, vols sortir igualment?",finalizeVisit:"Finalitzar visita"},clinicalMonitoring:{title:"Seguiment clínic"},errors:{session:"Hi ha hagut un error amb la sessió. Siusplau, tanca i torna a obrir l'aplicació.",invalidPatient:"El pacient actual no és vàlid. Siusplau, tanca i torna a obrir l'aplicació."},header:{workCenter:"Centre treball",role:"Rol",speciality:"Àmbit treball"},busyManager:{title:"Tasques pendents a desar:"},pdfManager:{uploaded:"Document disponible al visor de resultats",alreadyUploaded:"Ja s'ha carregat un document amb aquest nom",navButtonLabel:"Visor PDF",missingData:"Es necesita un document o URL per enviar al visor de resultats",duplicatedSource:"Només pots envar un document o URL a la vegada"},pdfVisor:{noPdfSelected:"No hi ha cap PDF seleccionat"}}}},styles$l=".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white}";/**
|
|
203
203
|
* @license
|
|
204
204
|
* Copyright 2017 Google LLC
|
|
205
205
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -207,7 +207,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
207
207
|
* @license
|
|
208
208
|
* Copyright 2018 Google LLC
|
|
209
209
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
210
|
-
*/const Rt=e$J(class extends i$y{constructor(X){var W;if(super(X),X.type!==t$f.ATTRIBUTE||X.name!=="class"||((W=X.strings)==null?void 0:W.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(X){return" "+Object.keys(X).filter(W=>X[W]).join(" ")+" "}update(X,[W]){var te,re;if(this.st===void 0){this.st=new Set,X.strings!==void 0&&(this.nt=new Set(X.strings.join(" ").split(/\s/).filter(ne=>ne!=="")));for(const ne in W)W[ne]&&!((te=this.nt)!=null&&te.has(ne))&&this.st.add(ne);return this.render(W)}const J=X.element.classList;for(const ne of this.st)ne in W||(J.remove(ne),this.st.delete(ne));for(const ne in W){const oe=!!W[ne];oe===this.st.has(ne)||(re=this.nt)!=null&&re.has(ne)||(oe?(J.add(ne),this.st.add(ne)):(J.remove(ne),this.st.delete(ne)))}return R}}),template$
|
|
210
|
+
*/const Rt=e$J(class extends i$y{constructor(X){var W;if(super(X),X.type!==t$f.ATTRIBUTE||X.name!=="class"||((W=X.strings)==null?void 0:W.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(X){return" "+Object.keys(X).filter(W=>X[W]).join(" ")+" "}update(X,[W]){var te,re;if(this.st===void 0){this.st=new Set,X.strings!==void 0&&(this.nt=new Set(X.strings.join(" ").split(/\s/).filter(ne=>ne!=="")));for(const ne in W)W[ne]&&!((te=this.nt)!=null&&te.has(ne))&&this.st.add(ne);return this.render(W)}const J=X.element.classList;for(const ne of this.st)ne in W||(J.remove(ne),this.st.delete(ne));for(const ne in W){const oe=!!W[ne];oe===this.st.has(ne)||(re=this.nt)!=null&&re.has(ne)||(oe?(J.add(ne),this.st.add(ne)):(J.remove(ne),this.st.delete(ne)))}return R}}),template$l=X=>ke$1`
|
|
211
211
|
<div
|
|
212
212
|
class=${Rt({item:!0,active:X.isActive})}
|
|
213
213
|
@click=${X.config.callbackFn}
|
|
@@ -223,9 +223,9 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
223
223
|
${X.config.label}
|
|
224
224
|
</dss-tooltip>`}
|
|
225
225
|
</div>
|
|
226
|
-
`;var __defProp$
|
|
227
|
-
${r$H(styles$
|
|
228
|
-
`;let PrimariaNavItem=$i;__decorateClass$
|
|
226
|
+
`;var __defProp$t=Object.defineProperty,__decorateClass$t=(X,W,J,te)=>{for(var re=void 0,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=oe(W,J,re)||re);return re&&__defProp$t(W,J,re),re};const $i=class $i extends k$5(h$q){constructor(W){super(),this.subscriptions=[],this.containerWidth=0,this.showText=!1,this.isActive=!1,this.config=W}connectedCallback(){super.connectedCallback(),this._subscribeEvents()}disconnectedCallback(){this._unsubscribeEvents()}firstUpdated(W){super.firstUpdated(W),this.observeHostResize()}observeHostResize(){const W=this.parentElement;new ResizeObserver(te=>{for(const re of te){const ne=re.target.clientWidth;this.showText=ne>100}}).observe(W)}_subscribeEvents(){const W=shellApi.broker.subscribe(shellEvents.mainViewChanged,J=>{var te;this.isActive=J.viewId===((te=this.view)==null?void 0:te.id)});this.subscriptions.push(W)}_unsubscribeEvents(){this.subscriptions.forEach(W=>W.dispose())}render(){return ke$1`${template$l(this)}`}};$i.styles=i$B`
|
|
227
|
+
${r$H(styles$l)}
|
|
228
|
+
`;let PrimariaNavItem=$i;__decorateClass$t([n$w({type:Number})],PrimariaNavItem.prototype,"containerWidth"),__decorateClass$t([r$E()],PrimariaNavItem.prototype,"showText"),__decorateClass$t([r$E()],PrimariaNavItem.prototype,"isActive"),__decorateClass$t([n$w({type:Object})],PrimariaNavItem.prototype,"config");const shellRegions={header:"header-region",headerRightActions:"header-actions-region",main:"main-region",navigationMenu:"menu-region",navigationLowerLeftMenu:"navigation-lower-left-menu",quickActions:"quick-actions-region",floating:"floating-region"},clinicalMonitoringRegions={sidebar:"widgets-sidebar-region",header:"header-widgets-region",content:"content-widgets-region"},pdfViwerEvents={added:"added_pdf",showed:"showed_pdf",deleted:"deleted_pdf"};var INJECTION=Symbol.for("INJECTION");function _proxyGetter(X,W,J,te){function re(){return Reflect.hasMetadata(INJECTION,this,W)?Reflect.getMetadata(INJECTION,this,W):J()}function ne(oe){Reflect.defineMetadata(INJECTION,oe,this,W)}Object.defineProperty(X,W,{configurable:!0,enumerable:!0,get:re,set:ne})}function makePropertyInjectDecorator(X,W){return function(J){return function(te,re){var ne=function(){return X.get(J)};_proxyGetter(te,re,ne)}}}function makePropertyInjectNamedDecorator(X,W){return function(J,te){return function(re,ne){var oe=function(){return X.getNamed(J,te)};_proxyGetter(re,ne,oe)}}}function makePropertyInjectTaggedDecorator(X,W){return function(J,te,re){return function(ne,oe){var de=function(){return X.getTagged(J,te,re)};_proxyGetter(ne,oe,de)}}}function makePropertyMultiInjectDecorator(X,W){return function(J){return function(te,re){var ne=function(){return X.getAll(J)};_proxyGetter(te,re,ne)}}}function getDecorators(X,W){var J=makePropertyInjectDecorator(X),te=makePropertyInjectNamedDecorator(X),re=makePropertyInjectTaggedDecorator(X),ne=makePropertyMultiInjectDecorator(X);return{lazyInject:J,lazyInjectNamed:te,lazyInjectTagged:re,lazyMultiInject:ne}}const container$1=new Container,{lazyInject:lazyInject$1}=getDecorators(container$1),registerDep=X=>{container$1.bind(X).toSelf()},unregisterDep=X=>{container$1.isBound(X)&&container$1.unbind(X)},TYPES$1={primaryApi:Symbol.for("primaryApi"),store:Symbol.for("store"),localeManager:Symbol.for("localeManager")},styles$k=":host{min-height:1px;height:100%;width:100%;display:flex}iframe{border:none;flex:1;height:100%}.pdf-container{display:flex;justify-content:center;align-items:center;height:100%;flex:1;border:1px solid #ccc}.no-pdf{text-align:center;color:#666;font-size:1.2rem;font-weight:700}";function base64ToBlob(X,W="application/octet-stream"){const J=window.atob(X),te=J.length,re=new Uint8Array(te);for(let ne=0;ne<te;ne++)re[ne]=J.charCodeAt(ne);return new Blob([re],{type:W})}const createUrlFromBase64=(X,W)=>{if(X){const J=base64ToBlob(X,"application/pdf");return URL.createObjectURL(J)}};var __defProp$s=Object.defineProperty,__decorateClass$s=(X,W,J,te)=>{for(var re=void 0,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=oe(W,J,re)||re);return re&&__defProp$s(W,J,re),re};const qi=class qi extends h$q{constructor(){super(...arguments),this.pdfList=[],this.activePdfs=[],this.subscriptions=[]}async connectedCallback(){super.connectedCallback(),this._initializePdfState(),this._subscribeEvents()}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribeEvents()}_initializePdfState(){var J,te;const W=((te=(J=this.api.pdfViewerManager).getPdfs)==null?void 0:te.call(J))||[];this.pdfList=[...W],W.length===1?this.activePdfs=[W[0]]:W.length>=2&&(this.activePdfs=W.slice(-2))}_getPdfSrc(W){return W.data.url?W.data.url:W.data.b64?createUrlFromBase64(W.data.b64):""}_subscribeEvents(){[this.api.broker.subscribe(pdfViwerEvents.added,J=>this._onPdfAdded(J)),this.api.broker.subscribe(pdfViwerEvents.deleted,({id:J})=>this._onPdfDeleted({id:J}))].forEach(J=>this.subscriptions.push(J))}_unsubscribeEvents(){this.subscriptions.forEach(W=>W.dispose())}_onPdfAdded(W){this.pdfList=[...this.pdfList,W],this._updateActivePdfs(W.id)}_onPdfDeleted({id:W}){this.pdfList=this.pdfList.filter(J=>J.id!==W),this.activePdfs=this.activePdfs.filter(J=>J.id!==W),this.requestUpdate()}_removePdf(W){this.api.pdfViewerManager.delete(W),this.activePdfs=this.activePdfs.filter(J=>J.id!==W)}_updateActivePdfs(W){if(this.activePdfs.some(te=>te.id===W))this.activePdfs=this.activePdfs.filter(te=>te.id!==W);else{const te=this.pdfList.find(re=>re.id===W);if(!te)return;this.activePdfs.length===2?this.activePdfs=[this.activePdfs[1],te]:this.activePdfs=[...this.activePdfs,te]}this.requestUpdate()}render(){return ke$1`
|
|
229
229
|
<div class="pdf-container">
|
|
230
230
|
${this.activePdfs.length>0?this.activePdfs.map(W=>ke$1`<iframe height="100%" src=${this._getPdfSrc(W)} frameborder="0"></iframe>`):ke$1`
|
|
231
231
|
<div class="no-pdf">
|
|
@@ -239,7 +239,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
239
239
|
@pdf-removed=${W=>this._removePdf(W.detail)}
|
|
240
240
|
@active-pdf-changed=${W=>this._updateActivePdfs(W.detail)}
|
|
241
241
|
></pdf-selector>
|
|
242
|
-
`}};qi.styles=i$B`${r$H(styles$
|
|
242
|
+
`}};qi.styles=i$B`${r$H(styles$k)}`;let PdfVisor=qi;__decorateClass$s([lazyInject$1(TYPES$1.primaryApi)],PdfVisor.prototype,"api"),__decorateClass$s([n$w({type:Array})],PdfVisor.prototype,"pdfList"),__decorateClass$s([n$w({type:Array})],PdfVisor.prototype,"activePdfs");const registerPdfViewerNavItem=()=>{shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:pdfViewerId,factory:()=>{const X=new PrimariaNavItem({icon:"picture_as_pdf",label:translate$1("pdfManager.navButtonLabel"),callbackFn:()=>{shellApi.regionManager.activateMainView(pdfViewerId)}});return Promise.resolve(X)}})},registerPDFVisorMainView=()=>{shellApi.regionManager.registerMainView({id:pdfViewerId,factory:()=>{const X=new PdfVisor;return Promise.resolve(X)}})},styles$j=":host{width:250px;gap:8px}.pdf-item{display:flex;align-items:flex-start;padding:8px;gap:8px;color:#000;border-bottom:1px solid var(--color-neutral-100)}.header-icons{display:flex;gap:8px}.container{gap:8px;display:flex;flex-direction:column}";/**
|
|
243
243
|
* @license
|
|
244
244
|
* Copyright 2020 Google LLC
|
|
245
245
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -247,7 +247,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
247
247
|
* @license
|
|
248
248
|
* Copyright 2017 Google LLC
|
|
249
249
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
250
|
-
*/const Jt=(X,W,J)=>{const te=new Map;for(let re=W;re<=J;re++)te.set(X[re],re);return te},Qt=e$J(class extends i$y{constructor(X){if(super(X),X.type!==t$f.CHILD)throw Error("repeat() can only be used in text expressions")}dt(X,W,J){let te;J===void 0?J=W:W!==void 0&&(te=W);const re=[],ne=[];let oe=0;for(const de of X)re[oe]=te?te(de,oe):oe,ne[oe]=J(de,oe),oe++;return{values:ne,keys:re}}render(X,W,J){return this.dt(X,W,J).values}update(X,[W,J,te]){const re=ut(X),{values:ne,keys:oe}=this.dt(W,J,te);if(!Array.isArray(re))return this.ut=oe,ne;const de=this.ut??(this.ut=[]),ue=[];let ce,he,pe=0,fe=re.length-1,ge=0,be=ne.length-1;for(;pe<=fe&&ge<=be;)if(re[pe]===null)pe++;else if(re[fe]===null)fe--;else if(de[pe]===oe[ge])ue[ge]=ct(re[pe],ne[ge]),pe++,ge++;else if(de[fe]===oe[be])ue[be]=ct(re[fe],ne[be]),fe--,be--;else if(de[pe]===oe[be])ue[be]=ct(re[pe],ne[be]),at(X,ue[be+1],re[pe]),pe++,be--;else if(de[fe]===oe[ge])ue[ge]=ct(re[fe],ne[ge]),at(X,re[pe],re[fe]),fe--,ge++;else if(ce===void 0&&(ce=Jt(oe,ge,be),he=Jt(de,pe,fe)),ce.has(de[pe]))if(ce.has(de[fe])){const me=he.get(oe[ge]),ve=me!==void 0?re[me]:null;if(ve===null){const ye=at(X,re[pe]);ct(ye,ne[ge]),ue[ge]=ye}else ue[ge]=ct(ve,ne[ge]),at(X,re[pe],ve),re[me]=null;ge++}else pt(re[fe]),fe--;else pt(re[pe]),pe++;for(;ge<=be;){const me=at(X,ue[be+1]);ct(me,ne[ge]),ue[ge++]=me}for(;pe<=fe;){const me=re[pe++];me!==null&&pt(me)}return this.ut=oe,dt(X,ue),R}}),template$
|
|
250
|
+
*/const Jt=(X,W,J)=>{const te=new Map;for(let re=W;re<=J;re++)te.set(X[re],re);return te},Qt=e$J(class extends i$y{constructor(X){if(super(X),X.type!==t$f.CHILD)throw Error("repeat() can only be used in text expressions")}dt(X,W,J){let te;J===void 0?J=W:W!==void 0&&(te=W);const re=[],ne=[];let oe=0;for(const de of X)re[oe]=te?te(de,oe):oe,ne[oe]=J(de,oe),oe++;return{values:ne,keys:re}}render(X,W,J){return this.dt(X,W,J).values}update(X,[W,J,te]){const re=ut(X),{values:ne,keys:oe}=this.dt(W,J,te);if(!Array.isArray(re))return this.ut=oe,ne;const de=this.ut??(this.ut=[]),ue=[];let ce,he,pe=0,fe=re.length-1,ge=0,be=ne.length-1;for(;pe<=fe&&ge<=be;)if(re[pe]===null)pe++;else if(re[fe]===null)fe--;else if(de[pe]===oe[ge])ue[ge]=ct(re[pe],ne[ge]),pe++,ge++;else if(de[fe]===oe[be])ue[be]=ct(re[fe],ne[be]),fe--,be--;else if(de[pe]===oe[be])ue[be]=ct(re[pe],ne[be]),at(X,ue[be+1],re[pe]),pe++,be--;else if(de[fe]===oe[ge])ue[ge]=ct(re[fe],ne[ge]),at(X,re[pe],re[fe]),fe--,ge++;else if(ce===void 0&&(ce=Jt(oe,ge,be),he=Jt(de,pe,fe)),ce.has(de[pe]))if(ce.has(de[fe])){const me=he.get(oe[ge]),ve=me!==void 0?re[me]:null;if(ve===null){const ye=at(X,re[pe]);ct(ye,ne[ge]),ue[ge]=ye}else ue[ge]=ct(ve,ne[ge]),at(X,re[pe],ve),re[me]=null;ge++}else pt(re[fe]),fe--;else pt(re[pe]),pe++;for(;ge<=be;){const me=at(X,ue[be+1]);ct(me,ne[ge]),ue[ge++]=me}for(;pe<=fe;){const me=re[pe++];me!==null&&pt(me)}return this.ut=oe,dt(X,ue),R}}),template$k=X=>{const W=J=>ke$1`
|
|
251
251
|
<div class="pdf-item">
|
|
252
252
|
<dss-checkbox @onChange=${()=>X.setActivePdf(J.id)}>
|
|
253
253
|
<input
|
|
@@ -272,18 +272,18 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
272
272
|
<div>
|
|
273
273
|
${Qt(X.pdfList,J=>W(J))}
|
|
274
274
|
</div>
|
|
275
|
-
`};var __defProp$
|
|
276
|
-
${r$H(styles$
|
|
277
|
-
`;let PdfSelector=Bi;__decorateClass$
|
|
275
|
+
`};var __defProp$r=Object.defineProperty,__decorateClass$r=(X,W,J,te)=>{for(var re=void 0,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=oe(W,J,re)||re);return re&&__defProp$r(W,J,re),re};const Bi=class Bi extends h$q{constructor(){super(...arguments),this.activePdfs=[]}render(){return template$k(this)}removePdf(W){this.dispatchEvent(new CustomEvent("pdf-removed",{detail:W,bubbles:!0,composed:!0}))}setActivePdf(W){this.dispatchEvent(new CustomEvent("active-pdf-changed",{detail:W,bubbles:!0,composed:!0}))}openInNewWindow(W){const J=W.data.url?W.data.url:createUrlFromBase64(W.data.b64);J&&window.open(J)}};Bi.styles=i$B`
|
|
276
|
+
${r$H(styles$j)}
|
|
277
|
+
`;let PdfSelector=Bi;__decorateClass$r([n$w({type:Array})],PdfSelector.prototype,"pdfList"),__decorateClass$r([n$w({type:Array})],PdfSelector.prototype,"activePdfs");class PdfViewerManager{constructor(W,J){this.broker=W,this.notificationService=J,this.pdfs=[],this.activePdf=null,this.hasBeenActivated=!1,customElements.get("pdf-visor")||t$i("pdf-visor")(PdfVisor),customElements.get("pdf-selector")||t$i("pdf-selector")(PdfSelector)}add(W,J){const re={id:generateId(),pdfName:W,data:J};if(!J.url&&!J.b64){this.notificationService.error(translate$1("pdfManager.missingData"));return}if(J.url&&J.b64){this.notificationService.error(translate$1("pdfManager.duplicatedSource"));return}this.hasBeenActivated||(this.registerNavButton(),this.hasBeenActivated=!0),this.pdfs.some(ne=>ne.pdfName===re.pdfName)?this.notificationService.warning(translate$1("pdfManager.alreadyUploaded")):(this.pdfs.push(re),this.broker.publish(pdfViwerEvents.added,re),this.notificationService.success(translate$1("pdfManager.uploaded")))}delete(W){var J;this.pdfs=this.pdfs.filter(te=>te.id!==W),((J=this.activePdf)==null?void 0:J.id)===W&&(this.activePdf=null),this.broker.publish(pdfViwerEvents.deleted,{id:W})}getPdfs(){return this.pdfs}registerNavButton(){registerPdfViewerNavItem()}}const createPdfViewerManager=(X,W)=>new PdfViewerManager(X,W),styles$i=".container{display:flex;flex-direction:column;gap:4px;align-items:center}.title{font-size:15px;line-height:24px;font-weight:600;color:var(--color-red-600)}.list{display:flex;flex-direction:column;gap:8px}",template$j=X=>{var W,J;return ke$1`
|
|
278
278
|
<div class="container">
|
|
279
279
|
<div class="title">${translate$1("busyManager.title")}</div>
|
|
280
280
|
<div class="list">
|
|
281
281
|
${(J=(W=X.data)==null?void 0:W.busyTasks)==null?void 0:J.map(te=>ke$1`<div class="plugin-busy-item">${te.taskDescription}</div>`)}
|
|
282
282
|
</div>
|
|
283
283
|
</div>
|
|
284
|
-
`},Ui=class Ui extends h$q{render(){return ke$1`${template$
|
|
285
|
-
${r$H(styles$
|
|
286
|
-
`;let PluginBusyList=Ui;class PluginBusyManagerImpl{constructor(W){this.broker=W,this.busyPluginTasks=[],this.busyQuickActionTasks=[],customElements.get("plugin-busy-list")||t$i("plugin-busy-list")(PluginBusyList)}addBusyPluginTask(W){this.busyPluginTasks.push(W)}addBusyQuickActionTask(W){this.busyQuickActionTasks.findIndex(te=>te.taskId===W.taskId)>-1||(this.busyQuickActionTasks.push(W),this.emitQuickActionBusyChanged())}removeBusyPluginTask(W){const J=this.busyPluginTasks.findIndex(te=>te.taskId===W);J>-1&&this.busyPluginTasks.splice(J,1)}removeBusyQuickActionTask(W){const J=this.busyQuickActionTasks.findIndex(te=>te.taskId===W);J>-1&&(this.busyQuickActionTasks.splice(J,1),this.emitQuickActionBusyChanged())}isAnyPluginBusy(){return this.busyPluginTasks.length>0}isAnyQuickActionBusy(){return this.busyQuickActionTasks.length>0}clearAllBusyPlugins(){this.busyPluginTasks=[]}clearAllBusyQuickActions(){this.busyQuickActionTasks=[]}getBusyPluginTasks(){return this.busyPluginTasks}emitQuickActionBusyChanged(){const W=this.isAnyQuickActionBusy();this.broker.publish(shellEvents.quickActionBusyChanged,{busy:W})}}class RegionManagerProxy{constructor(W,J,te){this.pluginInfo=W,this.regionManager=J,this.broker=te}registerView(W,J){return this.regionManager.registerViewWithRegion(W,`${this.pluginInfo.pluginId}::${J.id}`,J),Promise.resolve()}removeView(W,J){return this.regionManager.getRegion(W).removeView(`${this.pluginInfo.pluginId}::${J}`),Promise.resolve()}activateView(W,J){return this.regionManager.getRegion(W).activate(`${this.pluginInfo.pluginId}::${J}`),W===shellRegions.main&&this._notifyMainViewChanged(J),Promise.resolve()}deactivateView(W,J){return this.regionManager.getRegion(W).deactivate(`${this.pluginInfo.pluginId}::${J}`),Promise.resolve()}getRegion(W){return Promise.resolve(this.regionManager.getRegion(W))}containsView(W,J){const te=this.regionManager.getRegion(W);return Promise.resolve(te==null?void 0:te.containsView(`${this.pluginInfo.pluginId}::${J}`))}isViewActive(W,J){const te=this.regionManager.getRegion(W);return Promise.resolve(te==null?void 0:te.isViewActive(`${this.pluginInfo.pluginId}::${J}`))}registerQuickAction(W){return this.regionManager.registerViewWithRegion(shellRegions.quickActions,`${this.pluginInfo.pluginId}::${W.id}`,W),Promise.resolve()}registerNavigationMenu(W){return this.regionManager.registerViewWithRegion(shellRegions.navigationMenu,`${this.pluginInfo.pluginId}::${W.id}`,W),Promise.resolve()}registerMainView(W){return this.regionManager.registerViewWithRegion(shellRegions.main,`${this.pluginInfo.pluginId}::${W.id}`,W),Promise.resolve()}activateMainView(W){return this.regionManager.getRegion(shellRegions.main).activate(`${this.pluginInfo.pluginId}::${W}`),this._notifyMainViewChanged(W),Promise.resolve()}getCurrentMainViewActive(){const W=this.regionManager.getRegion(shellRegions.main).currentActiveViews[0];return W==null?void 0:W.id}_notifyMainViewChanged(W){this.broker.publish(shellEvents.mainViewChanged,{viewId:W})}_destroy(){this.regionManager.destroy()}}const createRegionManagerProxy=(X,W,J)=>new RegionManagerProxy(X,W,J);let token,refreshToken;class TokenManagerImpl{constructor(){this.getUrlParams=()=>new URLSearchParams(window.location.search),this.initToken=()=>{const W=this.getUrlParams();return token=W.get("access_token")||"",refreshToken=W.get("refresh_token")||"",token},this.getToken=()=>token,this.refreshToken=async()=>{const W=await axios.post("/api/token/refresh",{token:refreshToken}),{access_token:J,refresh_token:te}=W.data;if(!J)throw new Error("Invalid refresh token response");return token=J,refreshToken=te,token}}}let tokenManager$1;const createTokenManager=()=>tokenManager$1||(tokenManager$1=new TokenManagerImpl,tokenManager$1.initToken(),tokenManager$1),broker$1=createBroker(),regionManager=x$5("primaria"),PrimariaRegionHost=y$g(regionManager),tokenManager=createTokenManager(),globalStateManager=createGlobalStateManager(broker$1),pluginBusyManager=new PluginBusyManagerImpl(broker$1),interactionService=new ParimariaInteractionServiceImpl,notificationService=new PrimariaNotificationServiceImpl,ecapEventManager=createEcapEventManager(),pdfViewerManager=createPdfViewerManager(broker$1,notificationService),primariaApiFactory=X=>{const W=createRegionManagerProxy(X,regionManager,broker$1);return{pluginInfo:X,regionManager:W,httpClient:createHttpClient(tokenManager,broker$1),broker:broker$1,createLocaleManager:createLocaleManager(X.pluginId),globalStateManager,tokenManager,ecapEventManager,pluginBusyManager,interactionService,notificationService,pdfViewerManager}},shellApi=primariaApiFactory({pluginId:primariaShellId}),registerRequest=(X,W)=>(J,te)=>{W.bind(te).to(te).inTransientScope(),injectable()(te);const re=X.broker.registerRequest(J,ne=>W.get(te).handle(ne));return{dispose:()=>{W.isBound(te)&&W.unbind(te),re.dispose()}}},TYPES={primaryApi:Symbol.for("primaryApi"),store:Symbol.for("store")};function formatProdErrorMessage$1(X){return`Minified Redux error #${X}; visit https://redux.js.org/Errors?code=${X} for the full message or use the non-minified dev environment for full errors. `}var $$observable=typeof Symbol=="function"&&Symbol.observable||"@@observable",symbol_observable_default=$$observable,randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$1(X){if(typeof X!="object"||X===null)return!1;let W=X;for(;Object.getPrototypeOf(W)!==null;)W=Object.getPrototypeOf(W);return Object.getPrototypeOf(X)===W||Object.getPrototypeOf(X)===null}function createStore(X,W,J){if(typeof X!="function")throw new Error(formatProdErrorMessage$1(2));if(typeof W=="function"&&typeof J=="function"||typeof J=="function"&&typeof arguments[3]=="function")throw new Error(formatProdErrorMessage$1(0));if(typeof W=="function"&&typeof J>"u"&&(J=W,W=void 0),typeof J<"u"){if(typeof J!="function")throw new Error(formatProdErrorMessage$1(1));return J(createStore)(X,W)}let te=X,re=W,ne=new Map,oe=ne,de=0,ue=!1;function ce(){oe===ne&&(oe=new Map,ne.forEach((ve,ye)=>{oe.set(ye,ve)}))}function he(){if(ue)throw new Error(formatProdErrorMessage$1(3));return re}function pe(ve){if(typeof ve!="function")throw new Error(formatProdErrorMessage$1(4));if(ue)throw new Error(formatProdErrorMessage$1(5));let ye=!0;ce();const we=de++;return oe.set(we,ve),function(){if(ye){if(ue)throw new Error(formatProdErrorMessage$1(6));ye=!1,ce(),oe.delete(we),ne=null}}}function fe(ve){if(!isPlainObject$1(ve))throw new Error(formatProdErrorMessage$1(7));if(typeof ve.type>"u")throw new Error(formatProdErrorMessage$1(8));if(typeof ve.type!="string")throw new Error(formatProdErrorMessage$1(17));if(ue)throw new Error(formatProdErrorMessage$1(9));try{ue=!0,re=te(re,ve)}finally{ue=!1}return(ne=oe).forEach(we=>{we()}),ve}function ge(ve){if(typeof ve!="function")throw new Error(formatProdErrorMessage$1(10));te=ve,fe({type:actionTypes_default.REPLACE})}function be(){const ve=pe;return{subscribe(ye){if(typeof ye!="object"||ye===null)throw new Error(formatProdErrorMessage$1(11));function we(){const _e=ye;_e.next&&_e.next(he())}return we(),{unsubscribe:ve(we)}},[symbol_observable_default](){return this}}}return fe({type:actionTypes_default.INIT}),{dispatch:fe,subscribe:pe,getState:he,replaceReducer:ge,[symbol_observable_default]:be}}function assertReducerShape(X){Object.keys(X).forEach(W=>{const J=X[W];if(typeof J(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(formatProdErrorMessage$1(12));if(typeof J(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(formatProdErrorMessage$1(13))})}function combineReducers(X){const W=Object.keys(X),J={};for(let ne=0;ne<W.length;ne++){const oe=W[ne];typeof X[oe]=="function"&&(J[oe]=X[oe])}const te=Object.keys(J);let re;try{assertReducerShape(J)}catch(ne){re=ne}return function(oe={},de){if(re)throw re;let ue=!1;const ce={};for(let he=0;he<te.length;he++){const pe=te[he],fe=J[pe],ge=oe[pe],be=fe(ge,de);if(typeof be>"u")throw de&&de.type,new Error(formatProdErrorMessage$1(14));ce[pe]=be,ue=ue||be!==ge}return ue=ue||te.length!==Object.keys(oe).length,ue?ce:oe}}function compose(...X){return X.length===0?W=>W:X.length===1?X[0]:X.reduce((W,J)=>(...te)=>W(J(...te)))}function applyMiddleware(...X){return W=>(J,te)=>{const re=W(J,te);let ne=()=>{throw new Error(formatProdErrorMessage$1(15))};const oe={getState:re.getState,dispatch:(ue,...ce)=>ne(ue,...ce)},de=X.map(ue=>ue(oe));return ne=compose(...de)(re.dispatch),{...re,dispatch:ne}}}function isAction(X){return isPlainObject$1(X)&&"type"in X&&typeof X.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(X,...W){throw new Error(`[Immer] minified error nr: ${X}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(X){return!!X&&!!X[DRAFT_STATE]}function isDraftable(X){var W;return X?isPlainObject(X)||Array.isArray(X)||!!X[DRAFTABLE]||!!((W=X.constructor)!=null&&W[DRAFTABLE])||isMap(X)||isSet(X):!1}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(X){if(!X||typeof X!="object")return!1;const W=getPrototypeOf(X);if(W===null)return!0;const J=Object.hasOwnProperty.call(W,"constructor")&&W.constructor;return J===Object?!0:typeof J=="function"&&Function.toString.call(J)===objectCtorString}function each(X,W){getArchtype(X)===0?Reflect.ownKeys(X).forEach(J=>{W(J,X[J],X)}):X.forEach((J,te)=>W(te,J,X))}function getArchtype(X){const W=X[DRAFT_STATE];return W?W.type_:Array.isArray(X)?1:isMap(X)?2:isSet(X)?3:0}function has(X,W){return getArchtype(X)===2?X.has(W):Object.prototype.hasOwnProperty.call(X,W)}function set(X,W,J){const te=getArchtype(X);te===2?X.set(W,J):te===3?X.add(J):X[W]=J}function is(X,W){return X===W?X!==0||1/X===1/W:X!==X&&W!==W}function isMap(X){return X instanceof Map}function isSet(X){return X instanceof Set}function latest(X){return X.copy_||X.base_}function shallowCopy(X,W){if(isMap(X))return new Map(X);if(isSet(X))return new Set(X);if(Array.isArray(X))return Array.prototype.slice.call(X);const J=isPlainObject(X);if(W===!0||W==="class_only"&&!J){const te=Object.getOwnPropertyDescriptors(X);delete te[DRAFT_STATE];let re=Reflect.ownKeys(te);for(let ne=0;ne<re.length;ne++){const oe=re[ne],de=te[oe];de.writable===!1&&(de.writable=!0,de.configurable=!0),(de.get||de.set)&&(te[oe]={configurable:!0,writable:!0,enumerable:de.enumerable,value:X[oe]})}return Object.create(getPrototypeOf(X),te)}else{const te=getPrototypeOf(X);if(te!==null&&J)return{...X};const re=Object.create(te);return Object.assign(re,X)}}function freeze(X,W=!1){return isFrozen(X)||isDraft(X)||!isDraftable(X)||(getArchtype(X)>1&&(X.set=X.add=X.clear=X.delete=dontMutateFrozenCollections),Object.freeze(X),W&&Object.entries(X).forEach(([J,te])=>freeze(te,!0))),X}function dontMutateFrozenCollections(){die(2)}function isFrozen(X){return Object.isFrozen(X)}var plugins={};function getPlugin(X){const W=plugins[X];return W||die(0,X),W}var currentScope;function getCurrentScope(){return currentScope}function createScope(X,W){return{drafts_:[],parent_:X,immer_:W,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(X,W){W&&(getPlugin("Patches"),X.patches_=[],X.inversePatches_=[],X.patchListener_=W)}function revokeScope(X){leaveScope(X),X.drafts_.forEach(revokeDraft),X.drafts_=null}function leaveScope(X){X===currentScope&&(currentScope=X.parent_)}function enterScope(X){return currentScope=createScope(currentScope,X)}function revokeDraft(X){const W=X[DRAFT_STATE];W.type_===0||W.type_===1?W.revoke_():W.revoked_=!0}function processResult(X,W){W.unfinalizedDrafts_=W.drafts_.length;const J=W.drafts_[0];return X!==void 0&&X!==J?(J[DRAFT_STATE].modified_&&(revokeScope(W),die(4)),isDraftable(X)&&(X=finalize(W,X),W.parent_||maybeFreeze(W,X)),W.patches_&&getPlugin("Patches").generateReplacementPatches_(J[DRAFT_STATE].base_,X,W.patches_,W.inversePatches_)):X=finalize(W,J,[]),revokeScope(W),W.patches_&&W.patchListener_(W.patches_,W.inversePatches_),X!==NOTHING?X:void 0}function finalize(X,W,J){if(isFrozen(W))return W;const te=W[DRAFT_STATE];if(!te)return each(W,(re,ne)=>finalizeProperty(X,te,W,re,ne,J)),W;if(te.scope_!==X)return W;if(!te.modified_)return maybeFreeze(X,te.base_,!0),te.base_;if(!te.finalized_){te.finalized_=!0,te.scope_.unfinalizedDrafts_--;const re=te.copy_;let ne=re,oe=!1;te.type_===3&&(ne=new Set(re),re.clear(),oe=!0),each(ne,(de,ue)=>finalizeProperty(X,te,re,de,ue,J,oe)),maybeFreeze(X,re,!1),J&&X.patches_&&getPlugin("Patches").generatePatches_(te,J,X.patches_,X.inversePatches_)}return te.copy_}function finalizeProperty(X,W,J,te,re,ne,oe){if(isDraft(re)){const de=ne&&W&&W.type_!==3&&!has(W.assigned_,te)?ne.concat(te):void 0,ue=finalize(X,re,de);if(set(J,te,ue),isDraft(ue))X.canAutoFreeze_=!1;else return}else oe&&J.add(re);if(isDraftable(re)&&!isFrozen(re)){if(!X.immer_.autoFreeze_&&X.unfinalizedDrafts_<1)return;finalize(X,re),(!W||!W.scope_.parent_)&&typeof te!="symbol"&&Object.prototype.propertyIsEnumerable.call(J,te)&&maybeFreeze(X,re)}}function maybeFreeze(X,W,J=!1){!X.parent_&&X.immer_.autoFreeze_&&X.canAutoFreeze_&&freeze(W,J)}function createProxyProxy(X,W){const J=Array.isArray(X),te={type_:J?1:0,scope_:W?W.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:W,base_:X,draft_:null,copy_:null,revoke_:null,isManual_:!1};let re=te,ne=objectTraps;J&&(re=[te],ne=arrayTraps);const{revoke:oe,proxy:de}=Proxy.revocable(re,ne);return te.draft_=de,te.revoke_=oe,de}var objectTraps={get(X,W){if(W===DRAFT_STATE)return X;const J=latest(X);if(!has(J,W))return readPropFromProto(X,J,W);const te=J[W];return X.finalized_||!isDraftable(te)?te:te===peek(X.base_,W)?(prepareCopy(X),X.copy_[W]=createProxy(te,X)):te},has(X,W){return W in latest(X)},ownKeys(X){return Reflect.ownKeys(latest(X))},set(X,W,J){const te=getDescriptorFromProto(latest(X),W);if(te!=null&&te.set)return te.set.call(X.draft_,J),!0;if(!X.modified_){const re=peek(latest(X),W),ne=re==null?void 0:re[DRAFT_STATE];if(ne&&ne.base_===J)return X.copy_[W]=J,X.assigned_[W]=!1,!0;if(is(J,re)&&(J!==void 0||has(X.base_,W)))return!0;prepareCopy(X),markChanged(X)}return X.copy_[W]===J&&(J!==void 0||W in X.copy_)||Number.isNaN(J)&&Number.isNaN(X.copy_[W])||(X.copy_[W]=J,X.assigned_[W]=!0),!0},deleteProperty(X,W){return peek(X.base_,W)!==void 0||W in X.base_?(X.assigned_[W]=!1,prepareCopy(X),markChanged(X)):delete X.assigned_[W],X.copy_&&delete X.copy_[W],!0},getOwnPropertyDescriptor(X,W){const J=latest(X),te=Reflect.getOwnPropertyDescriptor(J,W);return te&&{writable:!0,configurable:X.type_!==1||W!=="length",enumerable:te.enumerable,value:J[W]}},defineProperty(){die(11)},getPrototypeOf(X){return getPrototypeOf(X.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(X,W)=>{arrayTraps[X]=function(){return arguments[0]=arguments[0][0],W.apply(this,arguments)}}),arrayTraps.deleteProperty=function(X,W){return arrayTraps.set.call(this,X,W,void 0)},arrayTraps.set=function(X,W,J){return objectTraps.set.call(this,X[0],W,J,X[0])};function peek(X,W){const J=X[DRAFT_STATE];return(J?latest(J):X)[W]}function readPropFromProto(X,W,J){var re;const te=getDescriptorFromProto(W,J);return te?"value"in te?te.value:(re=te.get)==null?void 0:re.call(X.draft_):void 0}function getDescriptorFromProto(X,W){if(!(W in X))return;let J=getPrototypeOf(X);for(;J;){const te=Object.getOwnPropertyDescriptor(J,W);if(te)return te;J=getPrototypeOf(J)}}function markChanged(X){X.modified_||(X.modified_=!0,X.parent_&&markChanged(X.parent_))}function prepareCopy(X){X.copy_||(X.copy_=shallowCopy(X.base_,X.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(X){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(W,J,te)=>{if(typeof W=="function"&&typeof J!="function"){const ne=J;J=W;const oe=this;return function(ue=ne,...ce){return oe.produce(ue,he=>J.call(this,he,...ce))}}typeof J!="function"&&die(6),te!==void 0&&typeof te!="function"&&die(7);let re;if(isDraftable(W)){const ne=enterScope(this),oe=createProxy(W,void 0);let de=!0;try{re=J(oe),de=!1}finally{de?revokeScope(ne):leaveScope(ne)}return usePatchesInScope(ne,te),processResult(re,ne)}else if(!W||typeof W!="object"){if(re=J(W),re===void 0&&(re=W),re===NOTHING&&(re=void 0),this.autoFreeze_&&freeze(re,!0),te){const ne=[],oe=[];getPlugin("Patches").generateReplacementPatches_(W,re,ne,oe),te(ne,oe)}return re}else die(1,W)},this.produceWithPatches=(W,J)=>{if(typeof W=="function")return(oe,...de)=>this.produceWithPatches(oe,ue=>W(ue,...de));let te,re;return[this.produce(W,J,(oe,de)=>{te=oe,re=de}),te,re]},typeof(X==null?void 0:X.autoFreeze)=="boolean"&&this.setAutoFreeze(X.autoFreeze),typeof(X==null?void 0:X.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(X.useStrictShallowCopy)}createDraft(X){isDraftable(X)||die(8),isDraft(X)&&(X=current(X));const W=enterScope(this),J=createProxy(X,void 0);return J[DRAFT_STATE].isManual_=!0,leaveScope(W),J}finishDraft(X,W){const J=X&&X[DRAFT_STATE];(!J||!J.isManual_)&&die(9);const{scope_:te}=J;return usePatchesInScope(te,W),processResult(void 0,te)}setAutoFreeze(X){this.autoFreeze_=X}setUseStrictShallowCopy(X){this.useStrictShallowCopy_=X}applyPatches(X,W){let J;for(J=W.length-1;J>=0;J--){const re=W[J];if(re.path.length===0&&re.op==="replace"){X=re.value;break}}J>-1&&(W=W.slice(J+1));const te=getPlugin("Patches").applyPatches_;return isDraft(X)?te(X,W):this.produce(X,re=>te(re,W))}};function createProxy(X,W){const J=isMap(X)?getPlugin("MapSet").proxyMap_(X,W):isSet(X)?getPlugin("MapSet").proxySet_(X,W):createProxyProxy(X,W);return(W?W.scope_:getCurrentScope()).drafts_.push(J),J}function current(X){return isDraft(X)||die(10,X),currentImpl(X)}function currentImpl(X){if(!isDraftable(X)||isFrozen(X))return X;const W=X[DRAFT_STATE];let J;if(W){if(!W.modified_)return W.base_;W.finalized_=!0,J=shallowCopy(X,W.scope_.immer_.useStrictShallowCopy_)}else J=shallowCopy(X,!0);return each(J,(te,re)=>{set(J,te,currentImpl(re))}),W&&(W.finalized_=!1),J}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer),immer.setAutoFreeze.bind(immer),immer.setUseStrictShallowCopy.bind(immer),immer.applyPatches.bind(immer),immer.createDraft.bind(immer),immer.finishDraft.bind(immer);function assertIsFunction(X,W=`expected a function, instead received ${typeof X}`){if(typeof X!="function")throw new TypeError(W)}function assertIsObject(X,W=`expected an object, instead received ${typeof X}`){if(typeof X!="object")throw new TypeError(W)}function assertIsArrayOfFunctions(X,W="expected all items to be functions, instead received the following types: "){if(!X.every(J=>typeof J=="function")){const J=X.map(te=>typeof te=="function"?`function ${te.name||"unnamed"}()`:typeof te).join(", ");throw new TypeError(`${W}[${J}]`)}}var ensureIsArray=X=>Array.isArray(X)?X:[X];function getDependencies(X){const W=Array.isArray(X[0])?X[0]:X;return assertIsArrayOfFunctions(W,"createSelector expects all input-selectors to be functions, but received the following types: "),W}function collectInputSelectorResults(X,W){const J=[],{length:te}=X;for(let re=0;re<te;re++)J.push(X[re].apply(null,W));return J}var StrongRef=class{constructor(X){this.value=X}deref(){return this.value}},Ref=typeof WeakRef<"u"?WeakRef:StrongRef,UNTERMINATED=0,TERMINATED=1;function createCacheNode(){return{s:UNTERMINATED,v:void 0,o:null,p:null}}function weakMapMemoize(X,W={}){let J=createCacheNode();const{resultEqualityCheck:te}=W;let re,ne=0;function oe(){var pe;let de=J;const{length:ue}=arguments;for(let fe=0,ge=ue;fe<ge;fe++){const be=arguments[fe];if(typeof be=="function"||typeof be=="object"&&be!==null){let me=de.o;me===null&&(de.o=me=new WeakMap);const ve=me.get(be);ve===void 0?(de=createCacheNode(),me.set(be,de)):de=ve}else{let me=de.p;me===null&&(de.p=me=new Map);const ve=me.get(be);ve===void 0?(de=createCacheNode(),me.set(be,de)):de=ve}}const ce=de;let he;if(de.s===TERMINATED)he=de.v;else if(he=X.apply(null,arguments),ne++,te){const fe=((pe=re==null?void 0:re.deref)==null?void 0:pe.call(re))??re;fe!=null&&te(fe,he)&&(he=fe,ne!==0&&ne--),re=typeof he=="object"&&he!==null||typeof he=="function"?new Ref(he):he}return ce.s=TERMINATED,ce.v=he,he}return oe.clearCache=()=>{J=createCacheNode(),oe.resetResultsCount()},oe.resultsCount=()=>ne,oe.resetResultsCount=()=>{ne=0},oe}function createSelectorCreator(X,...W){const J=typeof X=="function"?{memoize:X,memoizeOptions:W}:X,te=(...re)=>{let ne=0,oe=0,de,ue={},ce=re.pop();typeof ce=="object"&&(ue=ce,ce=re.pop()),assertIsFunction(ce,`createSelector expects an output function after the inputs, but received: [${typeof ce}]`);const he={...J,...ue},{memoize:pe,memoizeOptions:fe=[],argsMemoize:ge=weakMapMemoize,argsMemoizeOptions:be=[],devModeChecks:me={}}=he,ve=ensureIsArray(fe),ye=ensureIsArray(be),we=getDependencies(re),Se=pe(function(){return ne++,ce.apply(null,arguments)},...ve),_e=ge(function(){oe++;const Le=collectInputSelectorResults(we,arguments);return de=Se.apply(null,Le),de},...ye);return Object.assign(_e,{resultFunc:ce,memoizedResultFunc:Se,dependencies:we,dependencyRecomputations:()=>oe,resetDependencyRecomputations:()=>{oe=0},lastResult:()=>de,recomputations:()=>ne,resetRecomputations:()=>{ne=0},memoize:pe,argsMemoize:ge})};return Object.assign(te,{withTypes:()=>te}),te}var createSelector=createSelectorCreator(weakMapMemoize),createStructuredSelector=Object.assign((X,W=createSelector)=>{assertIsObject(X,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof X}`);const J=Object.keys(X),te=J.map(ne=>X[ne]);return W(te,(...ne)=>ne.reduce((oe,de,ue)=>(oe[J[ue]]=de,oe),{}))},{withTypes:()=>createStructuredSelector});function createThunkMiddleware(X){return({dispatch:J,getState:te})=>re=>ne=>typeof ne=="function"?ne(J,te,X):re(ne)}var thunk=createThunkMiddleware(),withExtraArgument=createThunkMiddleware,composeWithDevTools=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?compose:compose.apply(null,arguments)};function createAction(X,W){function J(...te){if(W){let re=W(...te);if(!re)throw new Error(formatProdErrorMessage(0));return{type:X,payload:re.payload,..."meta"in re&&{meta:re.meta},..."error"in re&&{error:re.error}}}return{type:X,payload:te[0]}}return J.toString=()=>`${X}`,J.type=X,J.match=te=>isAction(te)&&te.type===X,J}var Tuple=class Mi extends Array{constructor(...W){super(...W),Object.setPrototypeOf(this,Mi.prototype)}static get[Symbol.species](){return Mi}concat(...W){return super.concat.apply(this,W)}prepend(...W){return W.length===1&&Array.isArray(W[0])?new Mi(...W[0].concat(this)):new Mi(...W.concat(this))}};function freezeDraftable(X){return isDraftable(X)?produce(X,()=>{}):X}function getOrInsertComputed(X,W,J){return X.has(W)?X.get(W):X.set(W,J(W)).get(W)}function isBoolean(X){return typeof X=="boolean"}var buildGetDefaultMiddleware=()=>function(W){const{thunk:J=!0,immutableCheck:te=!0,serializableCheck:re=!0,actionCreatorCheck:ne=!0}=W??{};let oe=new Tuple;return J&&(isBoolean(J)?oe.push(thunk):oe.push(withExtraArgument(J.extraArgument))),oe},SHOULD_AUTOBATCH="RTK_autoBatch",createQueueWithTimer=X=>W=>{setTimeout(W,X)},autoBatchEnhancer=(X={type:"raf"})=>W=>(...J)=>{const te=W(...J);let re=!0,ne=!1,oe=!1;const de=new Set,ue=X.type==="tick"?queueMicrotask:X.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:createQueueWithTimer(10):X.type==="callback"?X.queueNotification:createQueueWithTimer(X.timeout),ce=()=>{oe=!1,ne&&(ne=!1,de.forEach(he=>he()))};return Object.assign({},te,{subscribe(he){const pe=()=>re&&he(),fe=te.subscribe(pe);return de.add(he),()=>{fe(),de.delete(he)}},dispatch(he){var pe;try{return re=!((pe=he==null?void 0:he.meta)!=null&&pe[SHOULD_AUTOBATCH]),ne=!re,ne&&(oe||(oe=!0,ue(ce))),te.dispatch(he)}finally{re=!0}}})},buildGetDefaultEnhancers=X=>function(J){const{autoBatch:te=!0}=J??{};let re=new Tuple(X);return te&&re.push(autoBatchEnhancer(typeof te=="object"?te:void 0)),re};function configureStore(X){const W=buildGetDefaultMiddleware(),{reducer:J=void 0,middleware:te,devTools:re=!0,preloadedState:ne=void 0,enhancers:oe=void 0}=X||{};let de;if(typeof J=="function")de=J;else if(isPlainObject$1(J))de=combineReducers(J);else throw new Error(formatProdErrorMessage(1));let ue;typeof te=="function"?ue=te(W):ue=W();let ce=compose;re&&(ce=composeWithDevTools({trace:!1,...typeof re=="object"&&re}));const he=applyMiddleware(...ue),pe=buildGetDefaultEnhancers(he);let fe=typeof oe=="function"?oe(pe):pe();const ge=ce(...fe);return createStore(de,ne,ge)}function executeReducerBuilderCallback(X){const W={},J=[];let te;const re={addCase(ne,oe){const de=typeof ne=="string"?ne:ne.type;if(!de)throw new Error(formatProdErrorMessage(28));if(de in W)throw new Error(formatProdErrorMessage(29));return W[de]=oe,re},addMatcher(ne,oe){return J.push({matcher:ne,reducer:oe}),re},addDefaultCase(ne){return te=ne,re}};return X(re),[W,J,te]}function isStateFunction(X){return typeof X=="function"}function createReducer(X,W){let[J,te,re]=executeReducerBuilderCallback(W),ne;if(isStateFunction(X))ne=()=>freezeDraftable(X());else{const de=freezeDraftable(X);ne=()=>de}function oe(de=ne(),ue){let ce=[J[ue.type],...te.filter(({matcher:he})=>he(ue)).map(({reducer:he})=>he)];return ce.filter(he=>!!he).length===0&&(ce=[re]),ce.reduce((he,pe)=>{if(pe)if(isDraft(he)){const ge=pe(he,ue);return ge===void 0?he:ge}else{if(isDraftable(he))return produce(he,fe=>pe(fe,ue));{const fe=pe(he,ue);if(fe===void 0){if(he===null)return he;throw Error("A case reducer on a non-draftable value must not return undefined")}return fe}}return he},de)}return oe.getInitialState=ne,oe}var asyncThunkSymbol=Symbol.for("rtk-slice-createasyncthunk");function getType(X,W){return`${X}/${W}`}function buildCreateSlice({creators:X}={}){var J;const W=(J=X==null?void 0:X.asyncThunk)==null?void 0:J[asyncThunkSymbol];return function(re){const{name:ne,reducerPath:oe=ne}=re;if(!ne)throw new Error(formatProdErrorMessage(11));typeof process<"u";const de=(typeof re.reducers=="function"?re.reducers(buildReducerCreators()):re.reducers)||{},ue=Object.keys(de),ce={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},he={addCase(Se,_e){const Ce=typeof Se=="string"?Se:Se.type;if(!Ce)throw new Error(formatProdErrorMessage(12));if(Ce in ce.sliceCaseReducersByType)throw new Error(formatProdErrorMessage(13));return ce.sliceCaseReducersByType[Ce]=_e,he},addMatcher(Se,_e){return ce.sliceMatchers.push({matcher:Se,reducer:_e}),he},exposeAction(Se,_e){return ce.actionCreators[Se]=_e,he},exposeCaseReducer(Se,_e){return ce.sliceCaseReducersByName[Se]=_e,he}};ue.forEach(Se=>{const _e=de[Se],Ce={reducerName:Se,type:getType(ne,Se),createNotation:typeof re.reducers=="function"};isAsyncThunkSliceReducerDefinition(_e)?handleThunkCaseReducerDefinition(Ce,_e,he,W):handleNormalReducerDefinition(Ce,_e,he)});function pe(){const[Se={},_e=[],Ce=void 0]=typeof re.extraReducers=="function"?executeReducerBuilderCallback(re.extraReducers):[re.extraReducers],Le={...Se,...ce.sliceCaseReducersByType};return createReducer(re.initialState,Pe=>{for(let Ie in Le)Pe.addCase(Ie,Le[Ie]);for(let Ie of ce.sliceMatchers)Pe.addMatcher(Ie.matcher,Ie.reducer);for(let Ie of _e)Pe.addMatcher(Ie.matcher,Ie.reducer);Ce&&Pe.addDefaultCase(Ce)})}const fe=Se=>Se,ge=new Map;let be;function me(Se,_e){return be||(be=pe()),be(Se,_e)}function ve(){return be||(be=pe()),be.getInitialState()}function ye(Se,_e=!1){function Ce(Pe){let Ie=Pe[Se];return typeof Ie>"u"&&_e&&(Ie=ve()),Ie}function Le(Pe=fe){const Ie=getOrInsertComputed(ge,_e,()=>new WeakMap);return getOrInsertComputed(Ie,Pe,()=>{const Fe={};for(const[qe,Ae]of Object.entries(re.selectors??{}))Fe[qe]=wrapSelector(Ae,Pe,ve,_e);return Fe})}return{reducerPath:Se,getSelectors:Le,get selectors(){return Le(Ce)},selectSlice:Ce}}const we={name:ne,reducer:me,actions:ce.actionCreators,caseReducers:ce.sliceCaseReducersByName,getInitialState:ve,...ye(oe),injectInto(Se,{reducerPath:_e,...Ce}={}){const Le=_e??oe;return Se.inject({reducerPath:Le,reducer:me},Ce),{...we,...ye(Le,!0)}}};return we}}function wrapSelector(X,W,J,te){function re(ne,...oe){let de=W(ne);return typeof de>"u"&&te&&(de=J()),X(de,...oe)}return re.unwrapped=X,re}var createSlice=buildCreateSlice();function buildReducerCreators(){function X(W,J){return{_reducerDefinitionType:"asyncThunk",payloadCreator:W,...J}}return X.withTypes=()=>X,{reducer(W){return Object.assign({[W.name](...J){return W(...J)}}[W.name],{_reducerDefinitionType:"reducer"})},preparedReducer(W,J){return{_reducerDefinitionType:"reducerWithPrepare",prepare:W,reducer:J}},asyncThunk:X}}function handleNormalReducerDefinition({type:X,reducerName:W,createNotation:J},te,re){let ne,oe;if("reducer"in te){if(J&&!isCaseReducerWithPrepareDefinition(te))throw new Error(formatProdErrorMessage(17));ne=te.reducer,oe=te.prepare}else ne=te;re.addCase(X,ne).exposeCaseReducer(W,ne).exposeAction(W,oe?createAction(X,oe):createAction(X))}function isAsyncThunkSliceReducerDefinition(X){return X._reducerDefinitionType==="asyncThunk"}function isCaseReducerWithPrepareDefinition(X){return X._reducerDefinitionType==="reducerWithPrepare"}function handleThunkCaseReducerDefinition({type:X,reducerName:W},J,te,re){if(!re)throw new Error(formatProdErrorMessage(18));const{payloadCreator:ne,fulfilled:oe,pending:de,rejected:ue,settled:ce,options:he}=J,pe=re(X,ne,he);te.exposeAction(W,pe),oe&&te.addCase(pe.fulfilled,oe),de&&te.addCase(pe.pending,de),ue&&te.addCase(pe.rejected,ue),ce&&te.addMatcher(pe.settled,ce),te.exposeCaseReducer(W,{fulfilled:oe||noop,pending:de||noop,rejected:ue||noop,settled:ce||noop})}function noop(){}function formatProdErrorMessage(X){return`Minified Redux Toolkit error #${X}; visit https://redux-toolkit.js.org/Errors?code=${X} for the full message or use the non-minified dev environment for full errors. `}const addItemsToCollection=(X,W,J,te,re)=>{var ne;return X[W]?{...X,[W]:{...X[W],items:[...((ne=X[W])==null?void 0:ne.items)||[],...J]}}:{...X,[W]:{id:W,items:J,componentFactory:te,searchPredicate:re}}},addItemToCollection=(X,W,J,te)=>addItemsToCollection(X,W,[J],te);function addActivityHistoryItemReducer(X,W){const{id:J,item:te,componentFactory:re}=W.payload;X.collections=addItemToCollection(X.collections,J,te,re)}function addActivityHistoryItemsReducer(X,W){const{id:J,items:te,componentFactory:re,searchPredicate:ne}=W.payload;return{...X,collections:addItemsToCollection(X.collections,J,te,re,ne)}}function addBusyHistoryItemReducer(X,W){X.busy.push(W.payload)}function removeBusyHistoryItemReducer(X,W){X.busy=X.busy.filter(J=>J!==W.payload)}function addErrorHistoryItemReducer(X,W){X.error.push(W.payload)}function removeErrorHistoryItemReducer(X,W){X.error=X.error.filter(J=>J!==W.payload)}function removeActivityHistoryItemReducer(X,W){}const updateItemInCollection=(X,W,J)=>{var re,ne;if(!((re=X[W])!=null&&re.items))return X;const te=((ne=X[W])==null?void 0:ne.items)??[];return{...X,[W]:{...X[W],items:te.map(oe=>oe.id===J.id?J:oe)}}};function updateActivityHistoryItemReducer(X,W){const{id:J,item:te}=W.payload;X.collections=updateItemInCollection(X.collections,J,te)}const activityHistoryCollectionsSlice=createSlice({name:"activity-history-collections",initialState:{busy:[],error:[],collections:{}},reducers:{addBusyHistoryItem:addBusyHistoryItemReducer,removeBusyHistoryItem:removeBusyHistoryItemReducer,addActivityHistoryItem:addActivityHistoryItemReducer,updateActivityHistoryItem:updateActivityHistoryItemReducer,addActivityHistoryItems:addActivityHistoryItemsReducer,addErrorHistoryItem:addErrorHistoryItemReducer,removeErrorHistoryItem:removeErrorHistoryItemReducer,removeActivityHistoryItem:removeActivityHistoryItemReducer}});function setSearchStringReducer(X,W){X.searchString=W.payload}class Spec{and(W){return new AndSpec(this,W)}or(W){return new OrSpec(this,W)}not(){return new NotSpec(this)}}class AndSpec extends Spec{constructor(W,J){super(),this.left=W,this.right=J}isSatisfiedBy(W){return this.left.isSatisfiedBy(W)&&this.right.isSatisfiedBy(W)}}class OrSpec extends Spec{constructor(W,J){super(),this.left=W,this.right=J}isSatisfiedBy(W){return this.left.isSatisfiedBy(W)||this.right.isSatisfiedBy(W)}}class NotSpec extends Spec{constructor(W){super(),this.spec=W}isSatisfiedBy(W){return!this.spec.isSatisfiedBy(W)}}class OwnSpec extends Spec{constructor(W){super(),this.context=W}isSatisfiedBy(W){var te;const J=shellApi.globalStateManager.getData("userInfo");return((te=W==null?void 0:W.professional)==null?void 0:te.id)===(J==null?void 0:J.userId)}}class RelevantSpec extends Spec{constructor(W){super(),this.context=W}isSatisfiedBy(W){return(W==null?void 0:W.relevant)??!1}}var ActivityHistoryFilterType=(X=>(X.Switch="switch",X.Checkbox="checkbox",X))(ActivityHistoryFilterType||{}),ActivityHistoryFilterOperation=(X=>(X.And="and",X.Or="or",X))(ActivityHistoryFilterOperation||{});const isCommonFilterGroup=X=>X.id==="common",isNotCommonFilterGroup=X=>!isCommonFilterGroup(X),commonFilters=[{id:"common",title:"Comuns",filters:[{id:"relevant",title:"Veure rellevants",spec:RelevantSpec,enabled:!1,type:ActivityHistoryFilterType.Switch},{id:"own",title:"Veure meus",spec:OwnSpec,enabled:!1,type:ActivityHistoryFilterType.Switch}]}];function setCommonFilterValueReducer(X,W){X.filters=X.filters.map(J=>J.id==="common"?{...J,filters:J.filters.map(te=>te.id===W.payload.id?{...te,enabled:W.payload.enabled}:te)}:J)}function addCustomFiltersReducer(X,W){X.filters=[...X.filters,W.payload]}function setCustomFilterGroupValueReducer(X,W){X.filters=X.filters.map(J=>J.id===W.payload.id?{...J,enabled:W.payload.enabled}:J)}function setCustomFilterValueReducer(X,W){X.filters=X.filters.map(J=>J.id===W.payload.filterGroupId?{...J,filters:J.filters.map(te=>te.id===W.payload.filterId?te.singleOption?setSingleOptionFilterValue(te,W.payload.enabled):setMultipleOptionsFilterValue(te,W.payload):te)}:J)}const setMultipleOptionsFilterValue=(X,W)=>{var re;const{optionId:J,enabled:te}=W;return(re=X.enabledValues)!=null&&re.some(ne=>ne===J)&&te?X:{...X,enabledValues:te?[...X.enabledValues||[],J]:X.enabledValues.filter(ne=>ne!==J)}},setSingleOptionFilterValue=(X,W)=>({...X,enabled:W,enabledValues:W?[!0]:[]}),activityHistoryFiltersSlice=createSlice({name:"activity-history-filters",initialState:{searchString:"",filters:[...commonFilters]},reducers:{setSearchString:setSearchStringReducer,setCommonFilterValue:setCommonFilterValueReducer,addCustomFilters:addCustomFiltersReducer,setCustomFilterGroupValue:setCustomFilterGroupValueReducer,setCustomFilterValue:setCustomFilterValueReducer}}),store=configureStore({reducer:{activityHistoryCollections:activityHistoryCollectionsSlice.reducer,activityHistoryFilters:activityHistoryFiltersSlice.reducer},devTools:{name:"activity-history"},middleware:X=>X({serializableCheck:!1})});store.dispatch,store.getState;const container=new Container,{lazyInject}=getDecorators(container),bindDeps=X=>{container.bind(TYPES.primaryApi).toConstantValue(X),container.bind(TYPES.store).toConstantValue(store)},unbindDeps=()=>{container.unbind(TYPES.primaryApi),container.unbind(TYPES.store)},addAsyncHistoryItemsCommand="inject_async_history_items_request";var __defProp$o=Object.defineProperty,__getOwnPropDesc$f=Object.getOwnPropertyDescriptor,__decorateClass$o=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$f(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$o(W,J,re),re},__decorateParam$5=(X,W)=>(J,te)=>W(J,te,X);let StoreBaseHandler=class{constructor(X){this.store=X}};StoreBaseHandler=__decorateClass$o([injectable(),__decorateParam$5(0,inject(TYPES.store))],StoreBaseHandler);let ApiBaseHandler=class{constructor(X){this.api=X}};ApiBaseHandler=__decorateClass$o([injectable(),__decorateParam$5(0,inject(TYPES.primaryApi))],ApiBaseHandler);let BaseHandler=class{constructor(X,W){this.store=X,this.api=W}};BaseHandler=__decorateClass$o([injectable(),__decorateParam$5(0,inject(TYPES.store)),__decorateParam$5(1,inject(TYPES.primaryApi))],BaseHandler);class AddCustomFiltersCommand{constructor(W){this.payload=W}}const{addBusyHistoryItem,removeBusyHistoryItem}=activityHistoryCollectionsSlice.actions,{addErrorHistoryItem,removeErrorHistoryItem}=activityHistoryCollectionsSlice.actions,addHistoryItemsCommand="add_history_items_request",validateAddAsyncCommand=(X,W)=>{if(X.entityId!==X.filters.id)throw new Error("entityId and filters.id must be the same");if(!X.filters.title)throw new Error("filters.title is required");if(!X.asyncDataProvider)throw new Error("asyncDataProvider is required");if(!X.componentFactory)throw new Error("componentFactory is required");if(!X.errorMessage)throw new Error("errorMessage is required for failure asyncDataProviders")};class InjectAsyncHistoryItemsHandler extends BaseHandler{async handle(W){this.store.dispatch(addBusyHistoryItem(W.entityId));try{const J=await W.asyncDataProvider();validateAddAsyncCommand(W,J),this.api.broker.send(addHistoryItemsCommand,{entityId:W.entityId,items:J,componentFactory:W.componentFactory,searchPredicate:W.searchPredicate}),W.filters&&this.api.broker.send(new AddCustomFiltersCommand(W.filters))}catch(J){this.store.dispatch(addErrorHistoryItem({id:W.entityId,message:W.errorMessage||J.message}))}finally{this.store.dispatch(removeBusyHistoryItem(W.entityId))}}}let request$d;const bootstrapInjectAsyncHistoryItems=X=>{request$d=X.registerRequest(addAsyncHistoryItemsCommand,InjectAsyncHistoryItemsHandler)},teardownInjectAsyncHistoryItems=()=>{request$d==null||request$d.dispose()},isValidActivityHistoryItem=X=>{const W=ce=>typeof ce=="string"&&ce.trim()!=="",J=ce=>typeof ce=="boolean",te=ce=>ce&&W(ce.id)&&W(ce.name)&&ce.speciality&&W(ce.speciality.id)&&W(ce.speciality.description)&&ce.role&&W(ce.role.id)&&W(ce.role.description),re=ce=>ce==null?!0:Array.isArray(ce)&&ce.every(he=>he!=null&&typeof he.codi=="string"&&typeof he.cataleg=="string"&&typeof he.descripcio=="string"),ne=ce=>ce&&W(ce.id)&&W(ce.description),oe=ce=>ce&&W(ce.id)&&W(ce.description),de=ce=>ce&&W(ce.id)&&W(ce.description),ue=ce=>ce&&W(ce.id)&&W(ce.description);return X&&W(X.id)&&W(X.date)&&te(X.professional)&&J(X.relevant)&&re(X.diagnostics)&&ne(X.center)&&oe(X.up)&&de(X.ep)&&ue(X.service)},ensureAreValidActivityHistoryItems=X=>{if(!X.every(isValidActivityHistoryItem))throw console.error("Invalid activity history items",X),new Error("Invalid activity history items");return X},notifyInvalidItem=X=>{console.error("Invalid history item",X)},validateAndFilterItems=X=>{const W=[];for(const J of X)isValidActivityHistoryItem(J)?W.push(J):notifyInvalidItem(J);return W},{addActivityHistoryItem}=activityHistoryCollectionsSlice.actions;class AddHistoryItemHandler extends StoreBaseHandler{async handle(W){try{ensureAreValidActivityHistoryItems([W.item]),this.store.dispatch(addActivityHistoryItem({id:W.entityId,item:W.item}))}catch(J){console.log(J.message)}}}const addHistoryItemCommand="add_history_item_request";let request$c;const bootstrapAddHistoryItem=X=>{request$c=X.registerRequest(addHistoryItemCommand,AddHistoryItemHandler)},teardownAddHistoryItem=()=>{request$c==null||request$c.dispose()};let pluginLocaleManager;const initializeLocalization=async X=>{pluginLocaleManager=await X.createLocaleManager(locales)},translate=X=>pluginLocaleManager?pluginLocaleManager.translate(X):X,locales={ca:{"activity-history":{activityHistory:"Històric d’activitat",search:"Cercar",groupedView:"Visió agrupada",maximize:"Ampliar",deleted:"Eliminat",goToDate:"Anar a data",busyEntriesLoading:"Carregant totes les entrades",noResults:"Sense resultats. Modifica la cerca",searchBarResults:"Resultats per",actions:{cronogram:"Cronograma",exportPdf:"Exportar PDF",moreOptions:"Més opcions",entryLegend:"Llegenda entrades",maximizeButton:"Botó maximitzar",menuButton:"Botó menu"},modal:{selectExportOption:"Tria una opció d'exportació",allActivityHistory:"Tot l’històric d’activitat",onlyAppliedFilters:"Només amb filtres aplicats",selectDateRange:"En el cas que sigui necessari, selecciona un rang de dates",helpText:"Sense seleccionar data, s'aplicarà la de la primera entrada. Sense seleccionar data de fi, s'aplicarà la de l'última entrada.",startDate:"Data Inici",endDate:"Data Fi",cancel:"Cancel·lar",export:"Exportar"},filters:{filters:"Filtres",searchFilter:"Cercar filtre",ownFilters:"Els meus",rellevantFilters:"Rellevants",episode:"Episodi",dates:"Dates",diagnoses:"Diagnòstics",clinicalCourseType:"Tipus Curs Clínic",selected:"seleccionats",applyFilters:"Aplicar filtres",deleted:"Eliminats"},tooltips:{subjective:"Subjectiu",UPconfidenciality:"Confidencialitat: per a la meva UP"},grouped:{clinicalCourses:"Cursos clínics",activities:"Activitats",variablees:"Variables",prescriptions:"Prescripcions"},chipHeader:{selection:"Selecció:"}}}},styles$f=".wrapper{display:flex;flex-direction:column;align-items:center;gap:24px;width:484px;height:auto}.wrapper .content-options{display:flex;flex-direction:column;align-items:center;gap:16px}.wrapper .selector-options{display:flex;flex-direction:row;gap:16px}.wrapper .content-date{display:flex;flex-direction:column;align-items:center;gap:16px;height:124px}.wrapper .datepicker-canvas{display:flex;flex-direction:row;justify-content:center;align-content:center;gap:16px}.wrapper .actions{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:16px}dss-datepicker{width:234px;height:48px;border-radius:var(--dss-radius-sm);border:var(--dss-border-width-sm);padding:var(--dss-spacing-sm);gap:var(--dss-spacing-xs);color:var(--color-neutral-100)}",template$g=X=>{const{arrayElements:W,text:J}=X;return ke$1`
|
|
284
|
+
`},Ui=class Ui extends h$q{render(){return ke$1`${template$j(this)}`}};Ui.styles=i$B`
|
|
285
|
+
${r$H(styles$i)}
|
|
286
|
+
`;let PluginBusyList=Ui;class PluginBusyManagerImpl{constructor(W){this.broker=W,this.busyPluginTasks=[],this.busyQuickActionTasks=[],customElements.get("plugin-busy-list")||t$i("plugin-busy-list")(PluginBusyList)}addBusyPluginTask(W){this.busyPluginTasks.push(W)}addBusyQuickActionTask(W){this.busyQuickActionTasks.findIndex(te=>te.taskId===W.taskId)>-1||(this.busyQuickActionTasks.push(W),this.emitQuickActionBusyChanged())}removeBusyPluginTask(W){const J=this.busyPluginTasks.findIndex(te=>te.taskId===W);J>-1&&this.busyPluginTasks.splice(J,1)}removeBusyQuickActionTask(W){const J=this.busyQuickActionTasks.findIndex(te=>te.taskId===W);J>-1&&(this.busyQuickActionTasks.splice(J,1),this.emitQuickActionBusyChanged())}isAnyPluginBusy(){return this.busyPluginTasks.length>0}isAnyQuickActionBusy(){return this.busyQuickActionTasks.length>0}clearAllBusyPlugins(){this.busyPluginTasks=[]}clearAllBusyQuickActions(){this.busyQuickActionTasks=[]}getBusyPluginTasks(){return this.busyPluginTasks}emitQuickActionBusyChanged(){const W=this.isAnyQuickActionBusy();this.broker.publish(shellEvents.quickActionBusyChanged,{busy:W})}}class RegionManagerProxy{constructor(W,J,te){this.pluginInfo=W,this.regionManager=J,this.broker=te}registerView(W,J){return this.regionManager.registerViewWithRegion(W,`${this.pluginInfo.pluginId}::${J.id}`,J),Promise.resolve()}removeView(W,J){return this.regionManager.getRegion(W).removeView(`${this.pluginInfo.pluginId}::${J}`),Promise.resolve()}activateView(W,J){return this.regionManager.getRegion(W).activate(`${this.pluginInfo.pluginId}::${J}`),W===shellRegions.main&&this._notifyMainViewChanged(J),Promise.resolve()}deactivateView(W,J){return this.regionManager.getRegion(W).deactivate(`${this.pluginInfo.pluginId}::${J}`),Promise.resolve()}getRegion(W){return Promise.resolve(this.regionManager.getRegion(W))}containsView(W,J){const te=this.regionManager.getRegion(W);return Promise.resolve(te==null?void 0:te.containsView(`${this.pluginInfo.pluginId}::${J}`))}isViewActive(W,J){const te=this.regionManager.getRegion(W);return Promise.resolve(te==null?void 0:te.isViewActive(`${this.pluginInfo.pluginId}::${J}`))}registerQuickAction(W){return this.regionManager.registerViewWithRegion(shellRegions.quickActions,`${this.pluginInfo.pluginId}::${W.id}`,W),Promise.resolve()}registerNavigationMenu(W){return this.regionManager.registerViewWithRegion(shellRegions.navigationMenu,`${this.pluginInfo.pluginId}::${W.id}`,W),Promise.resolve()}registerMainView(W){return this.regionManager.registerViewWithRegion(shellRegions.main,`${this.pluginInfo.pluginId}::${W.id}`,W),Promise.resolve()}activateMainView(W){return this.regionManager.getRegion(shellRegions.main).activate(`${this.pluginInfo.pluginId}::${W}`),this._notifyMainViewChanged(W),Promise.resolve()}getCurrentMainViewActive(){const W=this.regionManager.getRegion(shellRegions.main).currentActiveViews[0];return W==null?void 0:W.id}_notifyMainViewChanged(W){this.broker.publish(shellEvents.mainViewChanged,{viewId:W})}_destroy(){this.regionManager.destroy()}}const createRegionManagerProxy=(X,W,J)=>new RegionManagerProxy(X,W,J);let token,refreshToken;class TokenManagerImpl{constructor(){this.getUrlParams=()=>new URLSearchParams(window.location.search),this.initToken=()=>{const W=this.getUrlParams();return token=W.get("access_token")||"",refreshToken=W.get("refresh_token")||"",token},this.getToken=()=>token,this.refreshToken=async()=>{const W=await axios.post("/api/token/refresh",{token:refreshToken}),{access_token:J,refresh_token:te}=W.data;if(!J)throw new Error("Invalid refresh token response");return token=J,refreshToken=te,token}}}let tokenManager$1;const createTokenManager=()=>tokenManager$1||(tokenManager$1=new TokenManagerImpl,tokenManager$1.initToken(),tokenManager$1),broker$1=createBroker(),regionManager=x$5("primaria"),PrimariaRegionHost=y$g(regionManager),tokenManager=createTokenManager(),globalStateManager=createGlobalStateManager(broker$1),pluginBusyManager=new PluginBusyManagerImpl(broker$1),interactionService=new ParimariaInteractionServiceImpl,notificationService=new PrimariaNotificationServiceImpl,ecapEventManager=createEcapEventManager(),pdfViewerManager=createPdfViewerManager(broker$1,notificationService),primariaApiFactory=X=>{const W=createRegionManagerProxy(X,regionManager,broker$1);return{pluginInfo:X,regionManager:W,httpClient:createHttpClient(tokenManager,broker$1),broker:broker$1,createLocaleManager:createLocaleManager(X.pluginId),globalStateManager,tokenManager,ecapEventManager,pluginBusyManager,interactionService,notificationService,pdfViewerManager}},shellApi=primariaApiFactory({pluginId:primariaShellId}),registerRequest=(X,W)=>(J,te)=>{W.bind(te).to(te).inTransientScope(),injectable()(te);const re=X.broker.registerRequest(J,ne=>W.get(te).handle(ne));return{dispose:()=>{W.isBound(te)&&W.unbind(te),re.dispose()}}},TYPES={primaryApi:Symbol.for("primaryApi"),store:Symbol.for("store")};function formatProdErrorMessage$1(X){return`Minified Redux error #${X}; visit https://redux.js.org/Errors?code=${X} for the full message or use the non-minified dev environment for full errors. `}var $$observable=typeof Symbol=="function"&&Symbol.observable||"@@observable",symbol_observable_default=$$observable,randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$1(X){if(typeof X!="object"||X===null)return!1;let W=X;for(;Object.getPrototypeOf(W)!==null;)W=Object.getPrototypeOf(W);return Object.getPrototypeOf(X)===W||Object.getPrototypeOf(X)===null}function createStore(X,W,J){if(typeof X!="function")throw new Error(formatProdErrorMessage$1(2));if(typeof W=="function"&&typeof J=="function"||typeof J=="function"&&typeof arguments[3]=="function")throw new Error(formatProdErrorMessage$1(0));if(typeof W=="function"&&typeof J>"u"&&(J=W,W=void 0),typeof J<"u"){if(typeof J!="function")throw new Error(formatProdErrorMessage$1(1));return J(createStore)(X,W)}let te=X,re=W,ne=new Map,oe=ne,de=0,ue=!1;function ce(){oe===ne&&(oe=new Map,ne.forEach((ve,ye)=>{oe.set(ye,ve)}))}function he(){if(ue)throw new Error(formatProdErrorMessage$1(3));return re}function pe(ve){if(typeof ve!="function")throw new Error(formatProdErrorMessage$1(4));if(ue)throw new Error(formatProdErrorMessage$1(5));let ye=!0;ce();const we=de++;return oe.set(we,ve),function(){if(ye){if(ue)throw new Error(formatProdErrorMessage$1(6));ye=!1,ce(),oe.delete(we),ne=null}}}function fe(ve){if(!isPlainObject$1(ve))throw new Error(formatProdErrorMessage$1(7));if(typeof ve.type>"u")throw new Error(formatProdErrorMessage$1(8));if(typeof ve.type!="string")throw new Error(formatProdErrorMessage$1(17));if(ue)throw new Error(formatProdErrorMessage$1(9));try{ue=!0,re=te(re,ve)}finally{ue=!1}return(ne=oe).forEach(we=>{we()}),ve}function ge(ve){if(typeof ve!="function")throw new Error(formatProdErrorMessage$1(10));te=ve,fe({type:actionTypes_default.REPLACE})}function be(){const ve=pe;return{subscribe(ye){if(typeof ye!="object"||ye===null)throw new Error(formatProdErrorMessage$1(11));function we(){const _e=ye;_e.next&&_e.next(he())}return we(),{unsubscribe:ve(we)}},[symbol_observable_default](){return this}}}return fe({type:actionTypes_default.INIT}),{dispatch:fe,subscribe:pe,getState:he,replaceReducer:ge,[symbol_observable_default]:be}}function assertReducerShape(X){Object.keys(X).forEach(W=>{const J=X[W];if(typeof J(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(formatProdErrorMessage$1(12));if(typeof J(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(formatProdErrorMessage$1(13))})}function combineReducers(X){const W=Object.keys(X),J={};for(let ne=0;ne<W.length;ne++){const oe=W[ne];typeof X[oe]=="function"&&(J[oe]=X[oe])}const te=Object.keys(J);let re;try{assertReducerShape(J)}catch(ne){re=ne}return function(oe={},de){if(re)throw re;let ue=!1;const ce={};for(let he=0;he<te.length;he++){const pe=te[he],fe=J[pe],ge=oe[pe],be=fe(ge,de);if(typeof be>"u")throw de&&de.type,new Error(formatProdErrorMessage$1(14));ce[pe]=be,ue=ue||be!==ge}return ue=ue||te.length!==Object.keys(oe).length,ue?ce:oe}}function compose(...X){return X.length===0?W=>W:X.length===1?X[0]:X.reduce((W,J)=>(...te)=>W(J(...te)))}function applyMiddleware(...X){return W=>(J,te)=>{const re=W(J,te);let ne=()=>{throw new Error(formatProdErrorMessage$1(15))};const oe={getState:re.getState,dispatch:(ue,...ce)=>ne(ue,...ce)},de=X.map(ue=>ue(oe));return ne=compose(...de)(re.dispatch),{...re,dispatch:ne}}}function isAction(X){return isPlainObject$1(X)&&"type"in X&&typeof X.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(X,...W){throw new Error(`[Immer] minified error nr: ${X}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(X){return!!X&&!!X[DRAFT_STATE]}function isDraftable(X){var W;return X?isPlainObject(X)||Array.isArray(X)||!!X[DRAFTABLE]||!!((W=X.constructor)!=null&&W[DRAFTABLE])||isMap(X)||isSet(X):!1}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(X){if(!X||typeof X!="object")return!1;const W=getPrototypeOf(X);if(W===null)return!0;const J=Object.hasOwnProperty.call(W,"constructor")&&W.constructor;return J===Object?!0:typeof J=="function"&&Function.toString.call(J)===objectCtorString}function each(X,W){getArchtype(X)===0?Reflect.ownKeys(X).forEach(J=>{W(J,X[J],X)}):X.forEach((J,te)=>W(te,J,X))}function getArchtype(X){const W=X[DRAFT_STATE];return W?W.type_:Array.isArray(X)?1:isMap(X)?2:isSet(X)?3:0}function has(X,W){return getArchtype(X)===2?X.has(W):Object.prototype.hasOwnProperty.call(X,W)}function set(X,W,J){const te=getArchtype(X);te===2?X.set(W,J):te===3?X.add(J):X[W]=J}function is(X,W){return X===W?X!==0||1/X===1/W:X!==X&&W!==W}function isMap(X){return X instanceof Map}function isSet(X){return X instanceof Set}function latest(X){return X.copy_||X.base_}function shallowCopy(X,W){if(isMap(X))return new Map(X);if(isSet(X))return new Set(X);if(Array.isArray(X))return Array.prototype.slice.call(X);const J=isPlainObject(X);if(W===!0||W==="class_only"&&!J){const te=Object.getOwnPropertyDescriptors(X);delete te[DRAFT_STATE];let re=Reflect.ownKeys(te);for(let ne=0;ne<re.length;ne++){const oe=re[ne],de=te[oe];de.writable===!1&&(de.writable=!0,de.configurable=!0),(de.get||de.set)&&(te[oe]={configurable:!0,writable:!0,enumerable:de.enumerable,value:X[oe]})}return Object.create(getPrototypeOf(X),te)}else{const te=getPrototypeOf(X);if(te!==null&&J)return{...X};const re=Object.create(te);return Object.assign(re,X)}}function freeze(X,W=!1){return isFrozen(X)||isDraft(X)||!isDraftable(X)||(getArchtype(X)>1&&(X.set=X.add=X.clear=X.delete=dontMutateFrozenCollections),Object.freeze(X),W&&Object.entries(X).forEach(([J,te])=>freeze(te,!0))),X}function dontMutateFrozenCollections(){die(2)}function isFrozen(X){return Object.isFrozen(X)}var plugins={};function getPlugin(X){const W=plugins[X];return W||die(0,X),W}var currentScope;function getCurrentScope(){return currentScope}function createScope(X,W){return{drafts_:[],parent_:X,immer_:W,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(X,W){W&&(getPlugin("Patches"),X.patches_=[],X.inversePatches_=[],X.patchListener_=W)}function revokeScope(X){leaveScope(X),X.drafts_.forEach(revokeDraft),X.drafts_=null}function leaveScope(X){X===currentScope&&(currentScope=X.parent_)}function enterScope(X){return currentScope=createScope(currentScope,X)}function revokeDraft(X){const W=X[DRAFT_STATE];W.type_===0||W.type_===1?W.revoke_():W.revoked_=!0}function processResult(X,W){W.unfinalizedDrafts_=W.drafts_.length;const J=W.drafts_[0];return X!==void 0&&X!==J?(J[DRAFT_STATE].modified_&&(revokeScope(W),die(4)),isDraftable(X)&&(X=finalize(W,X),W.parent_||maybeFreeze(W,X)),W.patches_&&getPlugin("Patches").generateReplacementPatches_(J[DRAFT_STATE].base_,X,W.patches_,W.inversePatches_)):X=finalize(W,J,[]),revokeScope(W),W.patches_&&W.patchListener_(W.patches_,W.inversePatches_),X!==NOTHING?X:void 0}function finalize(X,W,J){if(isFrozen(W))return W;const te=W[DRAFT_STATE];if(!te)return each(W,(re,ne)=>finalizeProperty(X,te,W,re,ne,J)),W;if(te.scope_!==X)return W;if(!te.modified_)return maybeFreeze(X,te.base_,!0),te.base_;if(!te.finalized_){te.finalized_=!0,te.scope_.unfinalizedDrafts_--;const re=te.copy_;let ne=re,oe=!1;te.type_===3&&(ne=new Set(re),re.clear(),oe=!0),each(ne,(de,ue)=>finalizeProperty(X,te,re,de,ue,J,oe)),maybeFreeze(X,re,!1),J&&X.patches_&&getPlugin("Patches").generatePatches_(te,J,X.patches_,X.inversePatches_)}return te.copy_}function finalizeProperty(X,W,J,te,re,ne,oe){if(isDraft(re)){const de=ne&&W&&W.type_!==3&&!has(W.assigned_,te)?ne.concat(te):void 0,ue=finalize(X,re,de);if(set(J,te,ue),isDraft(ue))X.canAutoFreeze_=!1;else return}else oe&&J.add(re);if(isDraftable(re)&&!isFrozen(re)){if(!X.immer_.autoFreeze_&&X.unfinalizedDrafts_<1)return;finalize(X,re),(!W||!W.scope_.parent_)&&typeof te!="symbol"&&Object.prototype.propertyIsEnumerable.call(J,te)&&maybeFreeze(X,re)}}function maybeFreeze(X,W,J=!1){!X.parent_&&X.immer_.autoFreeze_&&X.canAutoFreeze_&&freeze(W,J)}function createProxyProxy(X,W){const J=Array.isArray(X),te={type_:J?1:0,scope_:W?W.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:W,base_:X,draft_:null,copy_:null,revoke_:null,isManual_:!1};let re=te,ne=objectTraps;J&&(re=[te],ne=arrayTraps);const{revoke:oe,proxy:de}=Proxy.revocable(re,ne);return te.draft_=de,te.revoke_=oe,de}var objectTraps={get(X,W){if(W===DRAFT_STATE)return X;const J=latest(X);if(!has(J,W))return readPropFromProto(X,J,W);const te=J[W];return X.finalized_||!isDraftable(te)?te:te===peek(X.base_,W)?(prepareCopy(X),X.copy_[W]=createProxy(te,X)):te},has(X,W){return W in latest(X)},ownKeys(X){return Reflect.ownKeys(latest(X))},set(X,W,J){const te=getDescriptorFromProto(latest(X),W);if(te!=null&&te.set)return te.set.call(X.draft_,J),!0;if(!X.modified_){const re=peek(latest(X),W),ne=re==null?void 0:re[DRAFT_STATE];if(ne&&ne.base_===J)return X.copy_[W]=J,X.assigned_[W]=!1,!0;if(is(J,re)&&(J!==void 0||has(X.base_,W)))return!0;prepareCopy(X),markChanged(X)}return X.copy_[W]===J&&(J!==void 0||W in X.copy_)||Number.isNaN(J)&&Number.isNaN(X.copy_[W])||(X.copy_[W]=J,X.assigned_[W]=!0),!0},deleteProperty(X,W){return peek(X.base_,W)!==void 0||W in X.base_?(X.assigned_[W]=!1,prepareCopy(X),markChanged(X)):delete X.assigned_[W],X.copy_&&delete X.copy_[W],!0},getOwnPropertyDescriptor(X,W){const J=latest(X),te=Reflect.getOwnPropertyDescriptor(J,W);return te&&{writable:!0,configurable:X.type_!==1||W!=="length",enumerable:te.enumerable,value:J[W]}},defineProperty(){die(11)},getPrototypeOf(X){return getPrototypeOf(X.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(X,W)=>{arrayTraps[X]=function(){return arguments[0]=arguments[0][0],W.apply(this,arguments)}}),arrayTraps.deleteProperty=function(X,W){return arrayTraps.set.call(this,X,W,void 0)},arrayTraps.set=function(X,W,J){return objectTraps.set.call(this,X[0],W,J,X[0])};function peek(X,W){const J=X[DRAFT_STATE];return(J?latest(J):X)[W]}function readPropFromProto(X,W,J){var re;const te=getDescriptorFromProto(W,J);return te?"value"in te?te.value:(re=te.get)==null?void 0:re.call(X.draft_):void 0}function getDescriptorFromProto(X,W){if(!(W in X))return;let J=getPrototypeOf(X);for(;J;){const te=Object.getOwnPropertyDescriptor(J,W);if(te)return te;J=getPrototypeOf(J)}}function markChanged(X){X.modified_||(X.modified_=!0,X.parent_&&markChanged(X.parent_))}function prepareCopy(X){X.copy_||(X.copy_=shallowCopy(X.base_,X.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(X){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(W,J,te)=>{if(typeof W=="function"&&typeof J!="function"){const ne=J;J=W;const oe=this;return function(ue=ne,...ce){return oe.produce(ue,he=>J.call(this,he,...ce))}}typeof J!="function"&&die(6),te!==void 0&&typeof te!="function"&&die(7);let re;if(isDraftable(W)){const ne=enterScope(this),oe=createProxy(W,void 0);let de=!0;try{re=J(oe),de=!1}finally{de?revokeScope(ne):leaveScope(ne)}return usePatchesInScope(ne,te),processResult(re,ne)}else if(!W||typeof W!="object"){if(re=J(W),re===void 0&&(re=W),re===NOTHING&&(re=void 0),this.autoFreeze_&&freeze(re,!0),te){const ne=[],oe=[];getPlugin("Patches").generateReplacementPatches_(W,re,ne,oe),te(ne,oe)}return re}else die(1,W)},this.produceWithPatches=(W,J)=>{if(typeof W=="function")return(oe,...de)=>this.produceWithPatches(oe,ue=>W(ue,...de));let te,re;return[this.produce(W,J,(oe,de)=>{te=oe,re=de}),te,re]},typeof(X==null?void 0:X.autoFreeze)=="boolean"&&this.setAutoFreeze(X.autoFreeze),typeof(X==null?void 0:X.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(X.useStrictShallowCopy)}createDraft(X){isDraftable(X)||die(8),isDraft(X)&&(X=current(X));const W=enterScope(this),J=createProxy(X,void 0);return J[DRAFT_STATE].isManual_=!0,leaveScope(W),J}finishDraft(X,W){const J=X&&X[DRAFT_STATE];(!J||!J.isManual_)&&die(9);const{scope_:te}=J;return usePatchesInScope(te,W),processResult(void 0,te)}setAutoFreeze(X){this.autoFreeze_=X}setUseStrictShallowCopy(X){this.useStrictShallowCopy_=X}applyPatches(X,W){let J;for(J=W.length-1;J>=0;J--){const re=W[J];if(re.path.length===0&&re.op==="replace"){X=re.value;break}}J>-1&&(W=W.slice(J+1));const te=getPlugin("Patches").applyPatches_;return isDraft(X)?te(X,W):this.produce(X,re=>te(re,W))}};function createProxy(X,W){const J=isMap(X)?getPlugin("MapSet").proxyMap_(X,W):isSet(X)?getPlugin("MapSet").proxySet_(X,W):createProxyProxy(X,W);return(W?W.scope_:getCurrentScope()).drafts_.push(J),J}function current(X){return isDraft(X)||die(10,X),currentImpl(X)}function currentImpl(X){if(!isDraftable(X)||isFrozen(X))return X;const W=X[DRAFT_STATE];let J;if(W){if(!W.modified_)return W.base_;W.finalized_=!0,J=shallowCopy(X,W.scope_.immer_.useStrictShallowCopy_)}else J=shallowCopy(X,!0);return each(J,(te,re)=>{set(J,te,currentImpl(re))}),W&&(W.finalized_=!1),J}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer),immer.setAutoFreeze.bind(immer),immer.setUseStrictShallowCopy.bind(immer),immer.applyPatches.bind(immer),immer.createDraft.bind(immer),immer.finishDraft.bind(immer);function assertIsFunction(X,W=`expected a function, instead received ${typeof X}`){if(typeof X!="function")throw new TypeError(W)}function assertIsObject(X,W=`expected an object, instead received ${typeof X}`){if(typeof X!="object")throw new TypeError(W)}function assertIsArrayOfFunctions(X,W="expected all items to be functions, instead received the following types: "){if(!X.every(J=>typeof J=="function")){const J=X.map(te=>typeof te=="function"?`function ${te.name||"unnamed"}()`:typeof te).join(", ");throw new TypeError(`${W}[${J}]`)}}var ensureIsArray=X=>Array.isArray(X)?X:[X];function getDependencies(X){const W=Array.isArray(X[0])?X[0]:X;return assertIsArrayOfFunctions(W,"createSelector expects all input-selectors to be functions, but received the following types: "),W}function collectInputSelectorResults(X,W){const J=[],{length:te}=X;for(let re=0;re<te;re++)J.push(X[re].apply(null,W));return J}var StrongRef=class{constructor(X){this.value=X}deref(){return this.value}},Ref=typeof WeakRef<"u"?WeakRef:StrongRef,UNTERMINATED=0,TERMINATED=1;function createCacheNode(){return{s:UNTERMINATED,v:void 0,o:null,p:null}}function weakMapMemoize(X,W={}){let J=createCacheNode();const{resultEqualityCheck:te}=W;let re,ne=0;function oe(){var pe;let de=J;const{length:ue}=arguments;for(let fe=0,ge=ue;fe<ge;fe++){const be=arguments[fe];if(typeof be=="function"||typeof be=="object"&&be!==null){let me=de.o;me===null&&(de.o=me=new WeakMap);const ve=me.get(be);ve===void 0?(de=createCacheNode(),me.set(be,de)):de=ve}else{let me=de.p;me===null&&(de.p=me=new Map);const ve=me.get(be);ve===void 0?(de=createCacheNode(),me.set(be,de)):de=ve}}const ce=de;let he;if(de.s===TERMINATED)he=de.v;else if(he=X.apply(null,arguments),ne++,te){const fe=((pe=re==null?void 0:re.deref)==null?void 0:pe.call(re))??re;fe!=null&&te(fe,he)&&(he=fe,ne!==0&&ne--),re=typeof he=="object"&&he!==null||typeof he=="function"?new Ref(he):he}return ce.s=TERMINATED,ce.v=he,he}return oe.clearCache=()=>{J=createCacheNode(),oe.resetResultsCount()},oe.resultsCount=()=>ne,oe.resetResultsCount=()=>{ne=0},oe}function createSelectorCreator(X,...W){const J=typeof X=="function"?{memoize:X,memoizeOptions:W}:X,te=(...re)=>{let ne=0,oe=0,de,ue={},ce=re.pop();typeof ce=="object"&&(ue=ce,ce=re.pop()),assertIsFunction(ce,`createSelector expects an output function after the inputs, but received: [${typeof ce}]`);const he={...J,...ue},{memoize:pe,memoizeOptions:fe=[],argsMemoize:ge=weakMapMemoize,argsMemoizeOptions:be=[],devModeChecks:me={}}=he,ve=ensureIsArray(fe),ye=ensureIsArray(be),we=getDependencies(re),Se=pe(function(){return ne++,ce.apply(null,arguments)},...ve),_e=ge(function(){oe++;const Le=collectInputSelectorResults(we,arguments);return de=Se.apply(null,Le),de},...ye);return Object.assign(_e,{resultFunc:ce,memoizedResultFunc:Se,dependencies:we,dependencyRecomputations:()=>oe,resetDependencyRecomputations:()=>{oe=0},lastResult:()=>de,recomputations:()=>ne,resetRecomputations:()=>{ne=0},memoize:pe,argsMemoize:ge})};return Object.assign(te,{withTypes:()=>te}),te}var createSelector=createSelectorCreator(weakMapMemoize),createStructuredSelector=Object.assign((X,W=createSelector)=>{assertIsObject(X,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof X}`);const J=Object.keys(X),te=J.map(ne=>X[ne]);return W(te,(...ne)=>ne.reduce((oe,de,ue)=>(oe[J[ue]]=de,oe),{}))},{withTypes:()=>createStructuredSelector});function createThunkMiddleware(X){return({dispatch:J,getState:te})=>re=>ne=>typeof ne=="function"?ne(J,te,X):re(ne)}var thunk=createThunkMiddleware(),withExtraArgument=createThunkMiddleware,composeWithDevTools=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?compose:compose.apply(null,arguments)};function createAction(X,W){function J(...te){if(W){let re=W(...te);if(!re)throw new Error(formatProdErrorMessage(0));return{type:X,payload:re.payload,..."meta"in re&&{meta:re.meta},..."error"in re&&{error:re.error}}}return{type:X,payload:te[0]}}return J.toString=()=>`${X}`,J.type=X,J.match=te=>isAction(te)&&te.type===X,J}var Tuple=class Mi extends Array{constructor(...W){super(...W),Object.setPrototypeOf(this,Mi.prototype)}static get[Symbol.species](){return Mi}concat(...W){return super.concat.apply(this,W)}prepend(...W){return W.length===1&&Array.isArray(W[0])?new Mi(...W[0].concat(this)):new Mi(...W.concat(this))}};function freezeDraftable(X){return isDraftable(X)?produce(X,()=>{}):X}function getOrInsertComputed(X,W,J){return X.has(W)?X.get(W):X.set(W,J(W)).get(W)}function isBoolean(X){return typeof X=="boolean"}var buildGetDefaultMiddleware=()=>function(W){const{thunk:J=!0,immutableCheck:te=!0,serializableCheck:re=!0,actionCreatorCheck:ne=!0}=W??{};let oe=new Tuple;return J&&(isBoolean(J)?oe.push(thunk):oe.push(withExtraArgument(J.extraArgument))),oe},SHOULD_AUTOBATCH="RTK_autoBatch",createQueueWithTimer=X=>W=>{setTimeout(W,X)},autoBatchEnhancer=(X={type:"raf"})=>W=>(...J)=>{const te=W(...J);let re=!0,ne=!1,oe=!1;const de=new Set,ue=X.type==="tick"?queueMicrotask:X.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:createQueueWithTimer(10):X.type==="callback"?X.queueNotification:createQueueWithTimer(X.timeout),ce=()=>{oe=!1,ne&&(ne=!1,de.forEach(he=>he()))};return Object.assign({},te,{subscribe(he){const pe=()=>re&&he(),fe=te.subscribe(pe);return de.add(he),()=>{fe(),de.delete(he)}},dispatch(he){var pe;try{return re=!((pe=he==null?void 0:he.meta)!=null&&pe[SHOULD_AUTOBATCH]),ne=!re,ne&&(oe||(oe=!0,ue(ce))),te.dispatch(he)}finally{re=!0}}})},buildGetDefaultEnhancers=X=>function(J){const{autoBatch:te=!0}=J??{};let re=new Tuple(X);return te&&re.push(autoBatchEnhancer(typeof te=="object"?te:void 0)),re};function configureStore(X){const W=buildGetDefaultMiddleware(),{reducer:J=void 0,middleware:te,devTools:re=!0,preloadedState:ne=void 0,enhancers:oe=void 0}=X||{};let de;if(typeof J=="function")de=J;else if(isPlainObject$1(J))de=combineReducers(J);else throw new Error(formatProdErrorMessage(1));let ue;typeof te=="function"?ue=te(W):ue=W();let ce=compose;re&&(ce=composeWithDevTools({trace:!1,...typeof re=="object"&&re}));const he=applyMiddleware(...ue),pe=buildGetDefaultEnhancers(he);let fe=typeof oe=="function"?oe(pe):pe();const ge=ce(...fe);return createStore(de,ne,ge)}function executeReducerBuilderCallback(X){const W={},J=[];let te;const re={addCase(ne,oe){const de=typeof ne=="string"?ne:ne.type;if(!de)throw new Error(formatProdErrorMessage(28));if(de in W)throw new Error(formatProdErrorMessage(29));return W[de]=oe,re},addMatcher(ne,oe){return J.push({matcher:ne,reducer:oe}),re},addDefaultCase(ne){return te=ne,re}};return X(re),[W,J,te]}function isStateFunction(X){return typeof X=="function"}function createReducer(X,W){let[J,te,re]=executeReducerBuilderCallback(W),ne;if(isStateFunction(X))ne=()=>freezeDraftable(X());else{const de=freezeDraftable(X);ne=()=>de}function oe(de=ne(),ue){let ce=[J[ue.type],...te.filter(({matcher:he})=>he(ue)).map(({reducer:he})=>he)];return ce.filter(he=>!!he).length===0&&(ce=[re]),ce.reduce((he,pe)=>{if(pe)if(isDraft(he)){const ge=pe(he,ue);return ge===void 0?he:ge}else{if(isDraftable(he))return produce(he,fe=>pe(fe,ue));{const fe=pe(he,ue);if(fe===void 0){if(he===null)return he;throw Error("A case reducer on a non-draftable value must not return undefined")}return fe}}return he},de)}return oe.getInitialState=ne,oe}var asyncThunkSymbol=Symbol.for("rtk-slice-createasyncthunk");function getType(X,W){return`${X}/${W}`}function buildCreateSlice({creators:X}={}){var J;const W=(J=X==null?void 0:X.asyncThunk)==null?void 0:J[asyncThunkSymbol];return function(re){const{name:ne,reducerPath:oe=ne}=re;if(!ne)throw new Error(formatProdErrorMessage(11));typeof process<"u";const de=(typeof re.reducers=="function"?re.reducers(buildReducerCreators()):re.reducers)||{},ue=Object.keys(de),ce={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},he={addCase(Se,_e){const Ce=typeof Se=="string"?Se:Se.type;if(!Ce)throw new Error(formatProdErrorMessage(12));if(Ce in ce.sliceCaseReducersByType)throw new Error(formatProdErrorMessage(13));return ce.sliceCaseReducersByType[Ce]=_e,he},addMatcher(Se,_e){return ce.sliceMatchers.push({matcher:Se,reducer:_e}),he},exposeAction(Se,_e){return ce.actionCreators[Se]=_e,he},exposeCaseReducer(Se,_e){return ce.sliceCaseReducersByName[Se]=_e,he}};ue.forEach(Se=>{const _e=de[Se],Ce={reducerName:Se,type:getType(ne,Se),createNotation:typeof re.reducers=="function"};isAsyncThunkSliceReducerDefinition(_e)?handleThunkCaseReducerDefinition(Ce,_e,he,W):handleNormalReducerDefinition(Ce,_e,he)});function pe(){const[Se={},_e=[],Ce=void 0]=typeof re.extraReducers=="function"?executeReducerBuilderCallback(re.extraReducers):[re.extraReducers],Le={...Se,...ce.sliceCaseReducersByType};return createReducer(re.initialState,Pe=>{for(let Ie in Le)Pe.addCase(Ie,Le[Ie]);for(let Ie of ce.sliceMatchers)Pe.addMatcher(Ie.matcher,Ie.reducer);for(let Ie of _e)Pe.addMatcher(Ie.matcher,Ie.reducer);Ce&&Pe.addDefaultCase(Ce)})}const fe=Se=>Se,ge=new Map;let be;function me(Se,_e){return be||(be=pe()),be(Se,_e)}function ve(){return be||(be=pe()),be.getInitialState()}function ye(Se,_e=!1){function Ce(Pe){let Ie=Pe[Se];return typeof Ie>"u"&&_e&&(Ie=ve()),Ie}function Le(Pe=fe){const Ie=getOrInsertComputed(ge,_e,()=>new WeakMap);return getOrInsertComputed(Ie,Pe,()=>{const Ne={};for(const[qe,Ae]of Object.entries(re.selectors??{}))Ne[qe]=wrapSelector(Ae,Pe,ve,_e);return Ne})}return{reducerPath:Se,getSelectors:Le,get selectors(){return Le(Ce)},selectSlice:Ce}}const we={name:ne,reducer:me,actions:ce.actionCreators,caseReducers:ce.sliceCaseReducersByName,getInitialState:ve,...ye(oe),injectInto(Se,{reducerPath:_e,...Ce}={}){const Le=_e??oe;return Se.inject({reducerPath:Le,reducer:me},Ce),{...we,...ye(Le,!0)}}};return we}}function wrapSelector(X,W,J,te){function re(ne,...oe){let de=W(ne);return typeof de>"u"&&te&&(de=J()),X(de,...oe)}return re.unwrapped=X,re}var createSlice=buildCreateSlice();function buildReducerCreators(){function X(W,J){return{_reducerDefinitionType:"asyncThunk",payloadCreator:W,...J}}return X.withTypes=()=>X,{reducer(W){return Object.assign({[W.name](...J){return W(...J)}}[W.name],{_reducerDefinitionType:"reducer"})},preparedReducer(W,J){return{_reducerDefinitionType:"reducerWithPrepare",prepare:W,reducer:J}},asyncThunk:X}}function handleNormalReducerDefinition({type:X,reducerName:W,createNotation:J},te,re){let ne,oe;if("reducer"in te){if(J&&!isCaseReducerWithPrepareDefinition(te))throw new Error(formatProdErrorMessage(17));ne=te.reducer,oe=te.prepare}else ne=te;re.addCase(X,ne).exposeCaseReducer(W,ne).exposeAction(W,oe?createAction(X,oe):createAction(X))}function isAsyncThunkSliceReducerDefinition(X){return X._reducerDefinitionType==="asyncThunk"}function isCaseReducerWithPrepareDefinition(X){return X._reducerDefinitionType==="reducerWithPrepare"}function handleThunkCaseReducerDefinition({type:X,reducerName:W},J,te,re){if(!re)throw new Error(formatProdErrorMessage(18));const{payloadCreator:ne,fulfilled:oe,pending:de,rejected:ue,settled:ce,options:he}=J,pe=re(X,ne,he);te.exposeAction(W,pe),oe&&te.addCase(pe.fulfilled,oe),de&&te.addCase(pe.pending,de),ue&&te.addCase(pe.rejected,ue),ce&&te.addMatcher(pe.settled,ce),te.exposeCaseReducer(W,{fulfilled:oe||noop,pending:de||noop,rejected:ue||noop,settled:ce||noop})}function noop(){}function formatProdErrorMessage(X){return`Minified Redux Toolkit error #${X}; visit https://redux-toolkit.js.org/Errors?code=${X} for the full message or use the non-minified dev environment for full errors. `}const addItemsToCollection=(X,W,J,te,re)=>{var ne;return X[W]?{...X,[W]:{...X[W],items:[...((ne=X[W])==null?void 0:ne.items)||[],...J]}}:{...X,[W]:{id:W,items:J,componentFactory:te,searchPredicate:re}}},addItemToCollection=(X,W,J,te)=>addItemsToCollection(X,W,[J],te);function addActivityHistoryItemReducer(X,W){const{id:J,item:te,componentFactory:re}=W.payload;X.collections=addItemToCollection(X.collections,J,te,re)}function addActivityHistoryItemsReducer(X,W){const{id:J,items:te,componentFactory:re,searchPredicate:ne}=W.payload;return{...X,collections:addItemsToCollection(X.collections,J,te,re,ne)}}function removeActivityHistoryItemReducer(X,W){}const updateItemInCollection=(X,W,J)=>{var re,ne;if(!((re=X[W])!=null&&re.items))return X;const te=((ne=X[W])==null?void 0:ne.items)??[];return{...X,[W]:{...X[W],items:te.map(oe=>oe.id===J.id?J:oe)}}};function updateActivityHistoryItemReducer(X,W){const{id:J,item:te}=W.payload;X.collections=updateItemInCollection(X.collections,J,te)}function addBusyHistoryItemReducer(X,W){X.busy.push(W.payload)}function removeBusyHistoryItemReducer(X,W){X.busy=X.busy.filter(J=>J!==W.payload)}function addErrorHistoryItemReducer(X,W){X.error.push(W.payload)}function removeErrorHistoryItemReducer(X,W){X.error=X.error.filter(J=>J.entityId!==W.payload)}const activityHistoryCollectionsSlice=createSlice({name:"activity-history-collections",initialState:{busy:[],error:[],collections:{}},reducers:{addBusyHistoryItem:addBusyHistoryItemReducer,removeBusyHistoryItem:removeBusyHistoryItemReducer,addActivityHistoryItem:addActivityHistoryItemReducer,updateActivityHistoryItem:updateActivityHistoryItemReducer,addActivityHistoryItems:addActivityHistoryItemsReducer,addErrorHistoryItem:addErrorHistoryItemReducer,removeErrorHistoryItem:removeErrorHistoryItemReducer,removeActivityHistoryItem:removeActivityHistoryItemReducer}});function setSearchStringReducer(X,W){X.searchString=W.payload}class Spec{and(W){return new AndSpec(this,W)}or(W){return new OrSpec(this,W)}not(){return new NotSpec(this)}}class AndSpec extends Spec{constructor(W,J){super(),this.left=W,this.right=J}isSatisfiedBy(W){return this.left.isSatisfiedBy(W)&&this.right.isSatisfiedBy(W)}}class OrSpec extends Spec{constructor(W,J){super(),this.left=W,this.right=J}isSatisfiedBy(W){return this.left.isSatisfiedBy(W)||this.right.isSatisfiedBy(W)}}class NotSpec extends Spec{constructor(W){super(),this.spec=W}isSatisfiedBy(W){return!this.spec.isSatisfiedBy(W)}}class OwnSpec extends Spec{constructor(W){super(),this.context=W}isSatisfiedBy(W){var te;const J=shellApi.globalStateManager.getData("userInfo");return((te=W==null?void 0:W.professional)==null?void 0:te.id)===(J==null?void 0:J.userId)}}class RelevantSpec extends Spec{constructor(W){super(),this.context=W}isSatisfiedBy(W){return(W==null?void 0:W.relevant)??!1}}var ActivityHistoryFilterType=(X=>(X.Switch="switch",X.Checkbox="checkbox",X))(ActivityHistoryFilterType||{}),ActivityHistoryFilterOperation=(X=>(X.And="and",X.Or="or",X))(ActivityHistoryFilterOperation||{});const isCommonFilterGroup=X=>X.id==="common",isNotCommonFilterGroup=X=>!isCommonFilterGroup(X),isDiagnosticFilter=X=>X.id===diagnosticsfilterId,isNotDiagnosticFilter=X=>!isDiagnosticFilter(X),isCustomFilter=X=>!isCommonFilterGroup(X)&&!isDiagnosticFilter(X),diagnosticsfilterId="history-diagnostics",relevantFilterId="history-relevant",ownFilterId="history-own",commonFilters=[{id:"common",title:"Comuns",filters:[{id:relevantFilterId,title:"Veure rellevants",spec:RelevantSpec,enabled:!1,type:ActivityHistoryFilterType.Switch},{id:ownFilterId,title:"Veure meus",spec:OwnSpec,enabled:!1,type:ActivityHistoryFilterType.Switch}]}];function setCommonFilterValueReducer(X,W){X.filters=X.filters.map(J=>J.id==="common"?{...J,filters:J.filters.map(te=>te.id===W.payload.id?{...te,enabled:W.payload.enabled}:te)}:J)}function addCustomFiltersReducer(X,W){X.filters=[...X.filters,W.payload]}function setCustomFilterGroupValueReducer(X,W){X.filters=X.filters.map(J=>J.id===W.payload.id?{...J,enabled:W.payload.enabled}:J)}function setCustomFilterValueReducer(X,W){X.filters=X.filters.map(J=>J.id===W.payload.filterGroupId?{...J,filters:J.filters.map(te=>te.id===W.payload.filterId?te.singleOption?setSingleOptionFilterValue(te,W.payload.enabled):setMultipleOptionsFilterValue(te,W.payload):te)}:J)}const setMultipleOptionsFilterValue=(X,W)=>{var re;const{optionId:J,enabled:te}=W;return(re=X.enabledValues)!=null&&re.some(ne=>ne===J)&&te?X:{...X,enabledValues:te?[...X.enabledValues||[],J]:X.enabledValues.filter(ne=>ne!==J)}},setSingleOptionFilterValue=(X,W)=>({...X,enabled:W,enabledValues:W?[!0]:[]});function addDiagnosticFiltersReducer(X,W){const J=X.filters.findIndex(isDiagnosticFilter);if(J===-1)X.filters.push(W.payload);else{const te=X.filters[J],re=[...te.values,...W.payload.values.filter(ne=>!te.values.some(oe=>oe.value===ne.value))];X.filters[J]={...te,values:re}}}function setDiagnosticFilterValuesReducer(X,W){X.filters=[...X.filters].map(J=>isDiagnosticFilter(J)?{...J,enabledValues:W.payload}:J)}const activityHistoryFiltersSlice=createSlice({name:"activity-history-filters",initialState:{searchString:"",filters:[...commonFilters]},reducers:{setSearchString:setSearchStringReducer,setCommonFilterValue:setCommonFilterValueReducer,addCustomFilters:addCustomFiltersReducer,setCustomFilterGroupValue:setCustomFilterGroupValueReducer,setCustomFilterValue:setCustomFilterValueReducer,addDiagnosticFilters:addDiagnosticFiltersReducer,setDiagnosticFilterValues:setDiagnosticFilterValuesReducer}}),store=configureStore({reducer:{activityHistoryCollections:activityHistoryCollectionsSlice.reducer,activityHistoryFilters:activityHistoryFiltersSlice.reducer},devTools:{name:"activity-history"},middleware:X=>X({serializableCheck:!1})});store.dispatch,store.getState;const container=new Container,{lazyInject}=getDecorators(container),bindDeps=X=>{container.bind(TYPES.primaryApi).toConstantValue(X),container.bind(TYPES.store).toConstantValue(store)},unbindDeps=()=>{container.unbind(TYPES.primaryApi),container.unbind(TYPES.store)},addAsyncHistoryItemsCommand="inject_async_history_items_request";var __defProp$q=Object.defineProperty,__getOwnPropDesc$h=Object.getOwnPropertyDescriptor,__decorateClass$q=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$h(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$q(W,J,re),re},__decorateParam$5=(X,W)=>(J,te)=>W(J,te,X);let StoreBaseHandler=class{constructor(X){this.store=X}};StoreBaseHandler=__decorateClass$q([injectable(),__decorateParam$5(0,inject(TYPES.store))],StoreBaseHandler);let ApiBaseHandler=class{constructor(X){this.api=X}};ApiBaseHandler=__decorateClass$q([injectable(),__decorateParam$5(0,inject(TYPES.primaryApi))],ApiBaseHandler);let BaseHandler=class{constructor(X,W){this.store=X,this.api=W}};BaseHandler=__decorateClass$q([injectable(),__decorateParam$5(0,inject(TYPES.store)),__decorateParam$5(1,inject(TYPES.primaryApi))],BaseHandler);class AddCustomFiltersCommand{constructor(W){this.payload=W}}const addHistoryItemsCommand="add_history_items_request",{addBusyHistoryItem,removeBusyHistoryItem}=activityHistoryCollectionsSlice.actions,{addErrorHistoryItem,removeErrorHistoryItem}=activityHistoryCollectionsSlice.actions,validateAddAsyncCommand=(X,W)=>{if(X.entityId!==X.filters.id)throw new Error("entityId and filters.id must be the same");if(!X.filters.title)throw new Error("filters.title is required");if(!X.asyncDataProvider)throw new Error("asyncDataProvider is required");if(!X.componentFactory)throw new Error("componentFactory is required");if(!X.errorMessage)throw new Error("errorMessage is required for failure asyncDataProviders")};class InjectAsyncHistoryItemsHandler extends BaseHandler{async handle(W){this.store.dispatch(addBusyHistoryItem(W.entityId));try{const J=await W.asyncDataProvider();validateAddAsyncCommand(W,J),this.api.broker.send(addHistoryItemsCommand,{entityId:W.entityId,entityDescription:W.entityDescription,items:J,componentFactory:W.componentFactory,searchPredicate:W.searchPredicate}),W.filters&&this.api.broker.send(new AddCustomFiltersCommand(W.filters))}catch(J){this.store.dispatch(addErrorHistoryItem({entityId:W.entityId,message:W.errorMessage||J.message,entityDescription:W.entityDescription}))}finally{this.store.dispatch(removeBusyHistoryItem(W.entityId))}}}let request$g;const bootstrapInjectAsyncHistoryItems=X=>{request$g=X.registerRequest(addAsyncHistoryItemsCommand,InjectAsyncHistoryItemsHandler)},teardownInjectAsyncHistoryItems=()=>{request$g==null||request$g.dispose()},isValidActivityHistoryItem=X=>{const W=ce=>typeof ce=="string"&&ce.trim()!=="",J=ce=>typeof ce=="boolean",te=ce=>ce&&W(ce.id)&&W(ce.name)&&ce.speciality&&W(ce.speciality.id)&&W(ce.speciality.description)&&ce.role&&W(ce.role.id)&&W(ce.role.description),re=ce=>ce==null?!0:Array.isArray(ce)&&ce.every(he=>he!=null&&typeof he.codi=="string"&&typeof he.cataleg=="string"&&typeof he.descripcio=="string"),ne=ce=>ce&&W(ce.id)&&W(ce.description),oe=ce=>ce&&W(ce.id)&&W(ce.description),de=ce=>ce&&W(ce.id)&&W(ce.description),ue=ce=>ce&&W(ce.id)&&W(ce.description);return X&&W(X.id)&&W(X.date)&&te(X.professional)&&J(X.relevant)&&re(X.diagnostics)&&ne(X.center)&&oe(X.up)&&de(X.ep)&&ue(X.service)},ensureAreValidActivityHistoryItems=X=>{if(!X.every(isValidActivityHistoryItem))throw console.error("Invalid activity history items",X),new Error("Invalid activity history items");return X},notifyInvalidItem=X=>{console.error("Invalid history item",X)},validateAndFilterItems=X=>{const W=[];for(const J of X)isValidActivityHistoryItem(J)?W.push(J):notifyInvalidItem(J);return W},{addDiagnosticFilters}=activityHistoryFiltersSlice.actions,handleAddDiagnosticsFilter=(X,W)=>{const J=X.flatMap(te=>te.diagnostics??[]).filter((te,re,ne)=>re===ne.findIndex(oe=>oe.codi===te.codi));if(J.length>0){const te={id:diagnosticsfilterId,title:"Diagnòstics",values:mapArrayToLabelValue(J,"descripcio","codi"),enabledValues:[]};W.dispatch(addDiagnosticFilters(te))}},{addActivityHistoryItem}=activityHistoryCollectionsSlice.actions;class AddHistoryItemHandler extends StoreBaseHandler{async handle(W){try{ensureAreValidActivityHistoryItems([W.item]),this.store.dispatch(addActivityHistoryItem({id:W.entityId,item:W.item})),handleAddDiagnosticsFilter([W.item],this.store)}catch(J){console.log(J.message)}}}const addHistoryItemCommand="add_history_item_request";let request$f;const bootstrapAddHistoryItem=X=>{request$f=X.registerRequest(addHistoryItemCommand,AddHistoryItemHandler)},teardownAddHistoryItem=()=>{request$f==null||request$f.dispose()};let pluginLocaleManager;const initializeLocalization=async X=>{pluginLocaleManager=await X.createLocaleManager(locales)},translate=X=>pluginLocaleManager?pluginLocaleManager.translate(X):X,locales={ca:{"activity-history":{activityHistory:"Històric d’activitat",search:"Cercar",groupedView:"Visió agrupada",maximize:"Ampliar",deleted:"Eliminat",goToDate:"Anar a data",busyEntriesLoading:"Carregant totes les entrades",noResults:"Sense resultats. Modifica la cerca",searchBarResults:"Resultats per",actions:{cronogram:"Cronograma",exportPdf:"Exportar PDF",moreOptions:"Més opcions",entryLegend:"Llegenda entrades",maximizeButton:"Botó maximitzar",menuButton:"Botó menu"},modal:{selectExportOption:"Tria una opció d'exportació",allActivityHistory:"Tot l’històric d’activitat",onlyAppliedFilters:"Només amb filtres aplicats",selectDateRange:"En el cas que sigui necessari, selecciona un rang de dates",helpText:"Sense seleccionar data, s'aplicarà la de la primera entrada. Sense seleccionar data de fi, s'aplicarà la de l'última entrada.",startDate:"Data Inici",endDate:"Data Fi",cancel:"Cancel·lar",export:"Exportar"},filters:{filters:"Filtres",searchFilter:"Cercar filtre",ownFilters:"Els meus",rellevantFilters:"Rellevants",episode:"Episodi",dates:"Dates",diagnoses:"Diagnòstics",clinicalCourseType:"Tipus Curs Clínic",selected:"seleccionats",applyFilters:"Aplicar filtres",deleted:"Eliminats"},tooltips:{subjective:"Subjectiu",UPconfidenciality:"Confidencialitat: per a la meva UP"},grouped:{clinicalCourses:"Cursos clínics",activities:"Activitats",variablees:"Variables",prescriptions:"Prescripcions"},chipHeader:{selection:"Selecció:"},error:{general:{title:"Hi ha hagut un problema durant la càrrega de contingut. Actualitza la pàgina o torna-ho a provar més tard.",refresh:"Actualitzar pàgina",noInfo:"No hi ha informació disponible."},partial:{title:"Hi ha hagut un problema i no s'ha pogut carregar les notes de tipus",refresh:"Actualitzar",limit:"Límit de clicks superat"},title:"Error en la càrrega",viewDetails:"Veure detalls",imageAlt:"Imatge d'error",errorToRefresh:"Error en l'acció d'actualitzar la pàgina"}}}},styles$h=".wrapper{display:flex;flex-direction:column;align-items:center;gap:24px;width:484px;height:auto}.wrapper .content-options{display:flex;flex-direction:column;align-items:center;gap:16px}.wrapper .selector-options{display:flex;flex-direction:row;gap:16px}.wrapper .content-date{display:flex;flex-direction:column;align-items:center;gap:16px;height:124px}.wrapper .datepicker-canvas{display:flex;flex-direction:row;justify-content:center;align-content:center;gap:16px}.wrapper .actions{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:16px}dss-datepicker{width:234px;height:48px;border-radius:var(--dss-radius-sm);border:var(--dss-border-width-sm);padding:var(--dss-spacing-sm);gap:var(--dss-spacing-xs);color:var(--color-neutral-100)}",template$i=X=>{const{arrayElements:W,text:J}=X;return ke$1`
|
|
287
287
|
<div class="wrapper">
|
|
288
288
|
<!-- <dss-input-dropdown type="default" .elements=${W} selectall="" dropdownplaceholder="Seleccionar"
|
|
289
289
|
@onInputDropdownChange=${te=>{X.selectedVisibilityLevelElement=te.detail}}>
|
|
@@ -313,11 +313,11 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
313
313
|
</dss-datepicker-range>
|
|
314
314
|
</div>
|
|
315
315
|
</div>`:D$1}
|
|
316
|
-
</div>`};var __defProp$
|
|
317
|
-
${template$
|
|
316
|
+
</div>`};var __defProp$p=Object.defineProperty,__getOwnPropDesc$g=Object.getOwnPropertyDescriptor,__decorateClass$p=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$g(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$p(W,J,re),re};let ExportPdfModal=class extends h$q{constructor(){super(...arguments),this.arrayElements=[{label:"Element 1",value:"1"},{label:"Element 2",value:"2"},{label:"Element 3",value:"3"},{label:"Element 4",value:"4"}]}render(){return ke$1`
|
|
317
|
+
${template$i(this)}
|
|
318
318
|
`}static get styles(){return i$B`
|
|
319
|
-
${r$H(styles$
|
|
320
|
-
`}handleTest(){console.log(this.selectedPeriodDate)}};__decorateClass$n([n$w()],ExportPdfModal.prototype,"selectedRadioOption",2),__decorateClass$n([n$w()],ExportPdfModal.prototype,"text",2),__decorateClass$n([n$w()],ExportPdfModal.prototype,"selectedVisibilityLevelElement",2),__decorateClass$n([n$w()],ExportPdfModal.prototype,"selectedPeriodDate",2),__decorateClass$n([n$w({type:Array})],ExportPdfModal.prototype,"arrayElements",2),ExportPdfModal=__decorateClass$n([t$i("export-pdf-modal")],ExportPdfModal);class ExportToPdfHandler extends ApiBaseHandler{async handle(){try{this.api.interactionService.confirm(void 0,ExportPdfModal,{title:translate("modal.selectExportOption"),confirmButtonText:"Exportar",cancelButtonText:"Cancelar"})}catch(W){this._notifyError(W.message)}}_notifyError(W){this.api.notificationService.error(W||"actions.delete.error")}}class ExportPdf{}let request$b;const bootstrapExportPdf=X=>{request$b=X.registerRequest(ExportPdf,ExportToPdfHandler)},teardownExportPdf=()=>{request$b==null||request$b.dispose()},{addActivityHistoryItems}=activityHistoryCollectionsSlice.actions;class AddHistoryItemsHandler extends StoreBaseHandler{async handle(W){try{const J=validateAndFilterItems(W.items);this.store.dispatch(addActivityHistoryItems({id:W.entityId,items:J,componentFactory:W.componentFactory,searchPredicate:W.searchPredicate}))}catch(J){console.log(J.message)}}}let request$a;const bootstrapAddHistoryItems=X=>{request$a=X.registerRequest(addHistoryItemsCommand,AddHistoryItemsHandler)},teardownAddHistoryItems=()=>{request$a==null||request$a.dispose()},{updateActivityHistoryItem}=activityHistoryCollectionsSlice.actions;class UpdateHistoryItemHandler extends StoreBaseHandler{async handle(W){try{ensureAreValidActivityHistoryItems([W.item]),this.store.dispatch(updateActivityHistoryItem({id:W.entityId,item:W.item}))}catch(J){console.log(J.message)}}}const updateHistoryItemCommand="update_history_item_request";let request$9;const bootstrapUpdateHistoryItem=X=>{request$9=X.registerRequest(updateHistoryItemCommand,UpdateHistoryItemHandler)},teardownUpdateHistoryItem=()=>{request$9==null||request$9.dispose()};function connectedProperty(X,W={}){return createConnectedProperty(store)(X,W)}const activityHistorySearchStringSelector=X=>X.activityHistoryFilters.searchString,isAnyCollectionBusySelector=X=>X.activityHistoryCollections.busy.length>0,isAnyCollectionLoadingWithoutAnyLoaded=X=>{const W=Object.values(X.activityHistoryCollections.collections);return!(W!=null&&W.length)&&isAnyCollectionBusySelector(X)},isSomeCollectionLoadedAndOtherLoading=X=>Object.values(X.activityHistoryCollections.collections)&&isAnyCollectionBusySelector(X);function getUniqueObjects(X,W,J){return Array.from(X.map(te=>({id:W.reduce((re,ne)=>re==null?void 0:re[ne],te),title:J.reduce((re,ne)=>re==null?void 0:re[ne],te)})).filter(te=>typeof te.id=="string"&&typeof te.title=="string").reduce((te,re)=>te.set(re.id,re),new Map).values())}class TrueSpec extends Spec{isSatisfiedBy(){return!0}}class CommonFilterSpec extends Spec{constructor(W){super(),this.commonFilters=W}isSatisfiedBy(W){return this.commonFilters.filter(re=>re.enabled).reduce((re,ne)=>re.and(new ne.spec),new TrueSpec).isSatisfiedBy(W)}}class FalseSpec extends Spec{isSatisfiedBy(){return!1}}class PropPathSpec extends Spec{constructor(W,J){super(),this.propPath=W,this.value=J}isSatisfiedBy(W){return this.propPath.reduce((te,re)=>te==null?void 0:te[re],W)===this.value}}class CustomFilterSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){const J=this.filters.filter(te=>te.enabled);return J.length===0?!0:J.every(te=>{if(!this.belongsToGroup(W,te))return!0;const re=te.filters.filter(ne=>ne.enabled||ne.singleOption);return re.length===0?!0:re.every(ne=>ne.singleOption?ne.enabled?!0:new PropPathSpec(ne.propPathValue,!1).isSatisfiedBy(W):!ne.enabledValues||ne.enabledValues.length===0?!0:ne.enabledValues.reduce((de,ue)=>de.or(new PropPathSpec(ne.propPathValue,ue)),new FalseSpec).isSatisfiedBy(W))})}belongsToGroup(W,J){return W.type===J.id}}const normalizeStringToNFD=X=>X==null?"":String(X).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase(),propContainsString=(X,W)=>{const J=normalizeStringToNFD(X),te=normalizeStringToNFD(W);return J.toString().toLowerCase().indexOf(te)!==-1||J.toString().indexOf(te)!==-1},commonFieldsSearchPredicate=(X,W)=>{var ue,ce,he,pe,fe,ge,be;const J=((ue=X.professional)==null?void 0:ue.name)&&propContainsString((ce=X.professional)==null?void 0:ce.name,W),te=X.center.description&&propContainsString(X.center.description,W),re=((he=X.professional)==null?void 0:he.speciality.description)&&propContainsString((pe=X.professional)==null?void 0:pe.speciality.description,W),ne=((fe=X.professional)==null?void 0:fe.role.description)&&propContainsString((ge=X.professional)==null?void 0:ge.role.description,W),oe=X.service.description&&propContainsString(X.service.description,W),de=(be=X.diagnostics)==null?void 0:be.some(me=>propContainsString(me.id,W)||propContainsString(me.description,W));return J||te||re||ne||oe||de};class SearchStringSpec extends Spec{constructor(W,J){super(),this.searchString=W,this.searchPredicate=J}isSatisfiedBy(W){var re;if(!((re=this.searchString)!=null&&re.trim()))return!0;const J=commonFieldsSearchPredicate(W,this.searchString),te=this.searchPredicate?this.searchPredicate(this.searchString.toLowerCase(),W):!1;return!!(J||te)}}class TypeSpec extends Spec{constructor(W){super(),this.itemType=W}isSatisfiedBy(W){return(W==null?void 0:W.type)===this.itemType}}class ComposedTypeSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){return this.filters.filter(re=>re.enabled).map(re=>re.id).reduce((re,ne)=>re.or(new TypeSpec(ne)),new FalseSpec).isSatisfiedBy(W)}}const activityHistoryFiltersSelector=X=>X.activityHistoryFilters.filters,activityHistoryCommonFiltersSelector=createSelector(activityHistoryFiltersSelector,X=>{var W;return((W=X.find(isCommonFilterGroup))==null?void 0:W.filters)||[]}),activityHistoryEnabledCommonFiltersSelector=createSelector(activityHistoryCommonFiltersSelector,X=>X.filter(W=>W.enabled)),areCommonFiltersActive=createSelector(activityHistoryEnabledCommonFiltersSelector,X=>!!X.length),activityHistoryCustomFilterGroupsSelector=createSelector(activityHistoryFiltersSelector,X=>X.filter(isNotCommonFilterGroup).sort(sortBySortProperty)),sortBySortProperty=(X,W)=>Number(X.sort)-Number(W.sort),areCustomFiltersActive=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.some(W=>W.filters.some(J=>{var te;return(te=J.enabledValues)==null?void 0:te.length}))),activeGroupsWithEnabledFilters=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.filter(W=>W.enabled).map(({id:W,title:J,enabled:te,sort:re,filters:ne})=>({id:W,title:J,enabled:te,sort:re,filters:ne.filter(oe=>{var de;return(de=oe.enabledValues)==null?void 0:de.length})})).filter(W=>W.filters.length>0)),isSameVisit=(X,W)=>{var ne,oe,de,ue,ce,he,pe,fe,ge,be,me,ve,ye,we;const J=((ne=X.professional)==null?void 0:ne.id)===((oe=W.professional)==null?void 0:oe.id)&&((de=X.professional)==null?void 0:de.role.id)===((ue=W.professional)==null?void 0:ue.role.id)&&((ce=X.professional)==null?void 0:ce.speciality.id)===((he=W.professional)==null?void 0:he.speciality.id),te=((pe=X.ep)==null?void 0:pe.id)===((fe=W.ep)==null?void 0:fe.id)&&((ge=X.up)==null?void 0:ge.id)===((be=W.up)==null?void 0:be.id)&&((me=X.center)==null?void 0:me.id)===((ve=W.center)==null?void 0:ve.id)&&((ye=X.service)==null?void 0:ye.id)===((we=W.service)==null?void 0:we.id),re=new Date(X.date).toDateString()===new Date(W.date).toDateString();return J&&te&&re},withinEightHours=(X,W)=>Math.abs(new Date(X).getTime()-new Date(W).getTime())<=8*60*60*1e3,areSameDiagnostics=(X,W)=>{if(X.length!==W.length)return!1;const J=X.map(re=>re.codi).sort(),te=W.map(re=>re.codi).sort();return J.every((re,ne)=>re===te[ne])},groupActivityHistoryItems=X=>{const W=[];return X==null||X.forEach(J=>{let te=!1;for(const re of W){const ne=re.items[0],oe=re.items[re.items.length-1];if(isSameVisit(ne,J)&&withinEightHours(ne.date,J.date)&&withinEightHours(oe.date,J.date)){re.items.push(J),te=!0;break}}te||W.push({idGroup:Math.random().toString(36).substr(2,9),items:[J]})}),W.forEach(J=>{const te=[],re=[];J.items.forEach(ne=>{var oe;if(((oe=ne.diagnostics)==null?void 0:oe.length)>0){let de=!1;for(const ue of te){const ce=ue.items[0];if(areSameDiagnostics(ce.diagnostics,ne.diagnostics)){ue.items.push(ne),de=!0;break}}de||te.push({idSubGroup:Math.random().toString(36).substr(2,9),items:[ne]})}else re.push(ne)}),J.items=re,J.subGroups=te}),W},sortGroupsByMostRecentDate=X=>{const W=ne=>ne.reduce((oe,de)=>{const ue=new Date(de.date);return ue>oe?ue:oe},new Date(0)),J=ne=>ne.sort((oe,de)=>new Date(de.date).getTime()-new Date(oe.date).getTime()),te=ne=>W(ne.items),re=ne=>{const oe=ne.items.length>0?[W(ne.items)]:[],de=ne.subGroups.map(te),ue=[...oe,...de];return ue.length>0?new Date(Math.max(...ue.map(ce=>ce.getTime()))):new Date(0)};return X.forEach(ne=>{ne.items=J(ne.items),ne.subGroups.forEach(oe=>{oe.items=J(oe.items)}),ne.subGroups.sort((oe,de)=>te(de).getTime()-te(oe).getTime())}),X.sort((ne,oe)=>re(oe).getTime()-re(ne).getTime())},activityHistoryCollectionsSelector=X=>X.activityHistoryCollections.collections,mapItemsWithMetadata=(X,W,J,te)=>X.map(re=>({...re,searchPredicate:te,componentFactory:W,type:J})),activityHistoryMappedItems=createSelector(activityHistoryCollectionsSelector,X=>Object.values(X).flatMap(W=>mapItemsWithMetadata(W.items,W.componentFactory,W.id,W.searchPredicate))),customFilterGroupsWithOptionsSelector=createSelector(activityHistoryCustomFilterGroupsSelector,activityHistoryCollectionsSelector,(X,W)=>X.map(te=>{const re=W[te.id];return{...te,filters:te.filters.map(ne=>({...ne,options:(ne.singleOption?[]:getUniqueObjects(re.items,ne.propPathValue,ne.propsPathDescription))||[]}))}})),activityHistoryGroupedItems=createSelector(activityHistoryMappedItems,activityHistorySearchStringSelector,activityHistoryCommonFiltersSelector,activityHistoryCustomFilterGroupsSelector,(X,W,J,te)=>{const re=X.filter(de=>new SearchStringSpec(W,de.searchPredicate).and(new CommonFilterSpec(J)).and(new ComposedTypeSpec(te)).and(new CustomFilterSpec(te)).isSatisfiedBy(de)),ne=groupActivityHistoryItems(re);return sortGroupsByMostRecentDate(ne)}),styles$e=":host{min-height:1px;height:100%}.virtualizer{height:100%;padding-inline:16px}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-md);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:16px}.visit .visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .visit__items .item[has-divider]:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:16px;border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics:last-of-type{border:none}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item[has-divider]:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";function toDate(X){const W=Object.prototype.toString.call(X);return X instanceof Date||typeof X=="object"&&W==="[object Date]"?new X.constructor(+X):typeof X=="number"||W==="[object Number]"||typeof X=="string"||W==="[object String]"?new Date(X):new Date(NaN)}function constructFrom(X,W){return X instanceof Date?new X.constructor(W):new Date(W)}function addDays(X,W){const J=toDate(X);return isNaN(W)?constructFrom(X,NaN):(W&&J.setDate(J.getDate()+W),J)}const millisecondsInWeek=6048e5,millisecondsInDay=864e5,millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3;let defaultOptions={};function getDefaultOptions$1(){return defaultOptions}function startOfWeek(X,W){var de,ue,ce,he;const J=getDefaultOptions$1(),te=(W==null?void 0:W.weekStartsOn)??((ue=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:ue.weekStartsOn)??J.weekStartsOn??((he=(ce=J.locale)==null?void 0:ce.options)==null?void 0:he.weekStartsOn)??0,re=toDate(X),ne=re.getDay(),oe=(ne<te?7:0)+ne-te;return re.setDate(re.getDate()-oe),re.setHours(0,0,0,0),re}function startOfISOWeek(X){return startOfWeek(X,{weekStartsOn:1})}function getISOWeekYear(X){const W=toDate(X),J=W.getFullYear(),te=constructFrom(X,0);te.setFullYear(J+1,0,4),te.setHours(0,0,0,0);const re=startOfISOWeek(te),ne=constructFrom(X,0);ne.setFullYear(J,0,4),ne.setHours(0,0,0,0);const oe=startOfISOWeek(ne);return W.getTime()>=re.getTime()?J+1:W.getTime()>=oe.getTime()?J:J-1}function startOfDay(X){const W=toDate(X);return W.setHours(0,0,0,0),W}function getTimezoneOffsetInMilliseconds(X){const W=toDate(X),J=new Date(Date.UTC(W.getFullYear(),W.getMonth(),W.getDate(),W.getHours(),W.getMinutes(),W.getSeconds(),W.getMilliseconds()));return J.setUTCFullYear(W.getFullYear()),+X-+J}function differenceInCalendarDays(X,W){const J=startOfDay(X),te=startOfDay(W),re=+J-getTimezoneOffsetInMilliseconds(J),ne=+te-getTimezoneOffsetInMilliseconds(te);return Math.round((re-ne)/millisecondsInDay)}function startOfISOWeekYear(X){const W=getISOWeekYear(X),J=constructFrom(X,0);return J.setFullYear(W,0,4),J.setHours(0,0,0,0),startOfISOWeek(J)}function isDate(X){return X instanceof Date||typeof X=="object"&&Object.prototype.toString.call(X)==="[object Date]"}function isValid(X){if(!isDate(X)&&typeof X!="number")return!1;const W=toDate(X);return!isNaN(Number(W))}function endOfMonth(X){const W=toDate(X),J=W.getMonth();return W.setFullYear(W.getFullYear(),J+1,0),W.setHours(23,59,59,999),W}function eachDayOfInterval(X,W){const J=toDate(X.start),te=toDate(X.end);let re=+J>+te;const ne=re?+J:+te,oe=re?te:J;oe.setHours(0,0,0,0);let de=1;const ue=[];for(;+oe<=ne;)ue.push(toDate(oe)),oe.setDate(oe.getDate()+de),oe.setHours(0,0,0,0);return re?ue.reverse():ue}function startOfMonth(X){const W=toDate(X);return W.setDate(1),W.setHours(0,0,0,0),W}function startOfYear(X){const W=toDate(X),J=constructFrom(X,0);return J.setFullYear(W.getFullYear(),0,1),J.setHours(0,0,0,0),J}const formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=(X,W,J)=>{let te;const re=formatDistanceLocale[X];return typeof re=="string"?te=re:W===1?te=re.one:te=re.other.replace("{{count}}",W.toString()),J!=null&&J.addSuffix?J.comparison&&J.comparison>0?"in "+te:te+" ago":te};function buildFormatLongFn(X){return(W={})=>{const J=W.width?String(W.width):X.defaultWidth;return X.formats[J]||X.formats[X.defaultWidth]}}const dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=(X,W,J,te)=>formatRelativeLocale[X];function buildLocalizeFn(X){return(W,J)=>{const te=J!=null&&J.context?String(J.context):"standalone";let re;if(te==="formatting"&&X.formattingValues){const oe=X.defaultFormattingWidth||X.defaultWidth,de=J!=null&&J.width?String(J.width):oe;re=X.formattingValues[de]||X.formattingValues[oe]}else{const oe=X.defaultWidth,de=J!=null&&J.width?String(J.width):X.defaultWidth;re=X.values[de]||X.values[oe]}const ne=X.argumentCallback?X.argumentCallback(W):W;return re[ne]}}const eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=(X,W)=>{const J=Number(X),te=J%100;if(te>20||te<10)switch(te%10){case 1:return J+"st";case 2:return J+"nd";case 3:return J+"rd"}return J+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:X=>X-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(X){return(W,J={})=>{const te=J.width,re=te&&X.matchPatterns[te]||X.matchPatterns[X.defaultMatchWidth],ne=W.match(re);if(!ne)return null;const oe=ne[0],de=te&&X.parsePatterns[te]||X.parsePatterns[X.defaultParseWidth],ue=Array.isArray(de)?findIndex(de,pe=>pe.test(oe)):findKey(de,pe=>pe.test(oe));let ce;ce=X.valueCallback?X.valueCallback(ue):ue,ce=J.valueCallback?J.valueCallback(ce):ce;const he=W.slice(oe.length);return{value:ce,rest:he}}}function findKey(X,W){for(const J in X)if(Object.prototype.hasOwnProperty.call(X,J)&&W(X[J]))return J}function findIndex(X,W){for(let J=0;J<X.length;J++)if(W(X[J]))return J}function buildMatchPatternFn(X){return(W,J={})=>{const te=W.match(X.matchPattern);if(!te)return null;const re=te[0],ne=W.match(X.parsePattern);if(!ne)return null;let oe=X.valueCallback?X.valueCallback(ne[0]):ne[0];oe=J.valueCallback?J.valueCallback(oe):oe;const de=W.slice(re.length);return{value:oe,rest:de}}}const matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:X=>parseInt(X,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:X=>X+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},enUS={code:"en-US",formatDistance,formatLong,formatRelative,localize,match,options:{weekStartsOn:0,firstWeekContainsDate:1}};function getDayOfYear(X){const W=toDate(X);return differenceInCalendarDays(W,startOfYear(W))+1}function getISOWeek(X){const W=toDate(X),J=+startOfISOWeek(W)-+startOfISOWeekYear(W);return Math.round(J/millisecondsInWeek)+1}function getWeekYear(X,W){var he,pe,fe,ge;const J=toDate(X),te=J.getFullYear(),re=getDefaultOptions$1(),ne=(W==null?void 0:W.firstWeekContainsDate)??((pe=(he=W==null?void 0:W.locale)==null?void 0:he.options)==null?void 0:pe.firstWeekContainsDate)??re.firstWeekContainsDate??((ge=(fe=re.locale)==null?void 0:fe.options)==null?void 0:ge.firstWeekContainsDate)??1,oe=constructFrom(X,0);oe.setFullYear(te+1,0,ne),oe.setHours(0,0,0,0);const de=startOfWeek(oe,W),ue=constructFrom(X,0);ue.setFullYear(te,0,ne),ue.setHours(0,0,0,0);const ce=startOfWeek(ue,W);return J.getTime()>=de.getTime()?te+1:J.getTime()>=ce.getTime()?te:te-1}function startOfWeekYear(X,W){var de,ue,ce,he;const J=getDefaultOptions$1(),te=(W==null?void 0:W.firstWeekContainsDate)??((ue=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:ue.firstWeekContainsDate)??J.firstWeekContainsDate??((he=(ce=J.locale)==null?void 0:ce.options)==null?void 0:he.firstWeekContainsDate)??1,re=getWeekYear(X,W),ne=constructFrom(X,0);return ne.setFullYear(re,0,te),ne.setHours(0,0,0,0),startOfWeek(ne,W)}function getWeek(X,W){const J=toDate(X),te=+startOfWeek(J,W)-+startOfWeekYear(J,W);return Math.round(te/millisecondsInWeek)+1}function addLeadingZeros(X,W){const J=X<0?"-":"",te=Math.abs(X).toString().padStart(W,"0");return J+te}const lightFormatters={y(X,W){const J=X.getFullYear(),te=J>0?J:1-J;return addLeadingZeros(W==="yy"?te%100:te,W.length)},M(X,W){const J=X.getMonth();return W==="M"?String(J+1):addLeadingZeros(J+1,2)},d(X,W){return addLeadingZeros(X.getDate(),W.length)},a(X,W){const J=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.toUpperCase();case"aaa":return J;case"aaaaa":return J[0];case"aaaa":default:return J==="am"?"a.m.":"p.m."}},h(X,W){return addLeadingZeros(X.getHours()%12||12,W.length)},H(X,W){return addLeadingZeros(X.getHours(),W.length)},m(X,W){return addLeadingZeros(X.getMinutes(),W.length)},s(X,W){return addLeadingZeros(X.getSeconds(),W.length)},S(X,W){const J=W.length,te=X.getMilliseconds(),re=Math.trunc(te*Math.pow(10,J-3));return addLeadingZeros(re,W.length)}},dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(X,W,J){const te=X.getFullYear()>0?1:0;switch(W){case"G":case"GG":case"GGG":return J.era(te,{width:"abbreviated"});case"GGGGG":return J.era(te,{width:"narrow"});case"GGGG":default:return J.era(te,{width:"wide"})}},y:function(X,W,J){if(W==="yo"){const te=X.getFullYear(),re=te>0?te:1-te;return J.ordinalNumber(re,{unit:"year"})}return lightFormatters.y(X,W)},Y:function(X,W,J,te){const re=getWeekYear(X,te),ne=re>0?re:1-re;if(W==="YY"){const oe=ne%100;return addLeadingZeros(oe,2)}return W==="Yo"?J.ordinalNumber(ne,{unit:"year"}):addLeadingZeros(ne,W.length)},R:function(X,W){const J=getISOWeekYear(X);return addLeadingZeros(J,W.length)},u:function(X,W){const J=X.getFullYear();return addLeadingZeros(J,W.length)},Q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"Q":return String(te);case"QQ":return addLeadingZeros(te,2);case"Qo":return J.ordinalNumber(te,{unit:"quarter"});case"QQQ":return J.quarter(te,{width:"abbreviated",context:"formatting"});case"QQQQQ":return J.quarter(te,{width:"narrow",context:"formatting"});case"QQQQ":default:return J.quarter(te,{width:"wide",context:"formatting"})}},q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"q":return String(te);case"qq":return addLeadingZeros(te,2);case"qo":return J.ordinalNumber(te,{unit:"quarter"});case"qqq":return J.quarter(te,{width:"abbreviated",context:"standalone"});case"qqqqq":return J.quarter(te,{width:"narrow",context:"standalone"});case"qqqq":default:return J.quarter(te,{width:"wide",context:"standalone"})}},M:function(X,W,J){const te=X.getMonth();switch(W){case"M":case"MM":return lightFormatters.M(X,W);case"Mo":return J.ordinalNumber(te+1,{unit:"month"});case"MMM":return J.month(te,{width:"abbreviated",context:"formatting"});case"MMMMM":return J.month(te,{width:"narrow",context:"formatting"});case"MMMM":default:return J.month(te,{width:"wide",context:"formatting"})}},L:function(X,W,J){const te=X.getMonth();switch(W){case"L":return String(te+1);case"LL":return addLeadingZeros(te+1,2);case"Lo":return J.ordinalNumber(te+1,{unit:"month"});case"LLL":return J.month(te,{width:"abbreviated",context:"standalone"});case"LLLLL":return J.month(te,{width:"narrow",context:"standalone"});case"LLLL":default:return J.month(te,{width:"wide",context:"standalone"})}},w:function(X,W,J,te){const re=getWeek(X,te);return W==="wo"?J.ordinalNumber(re,{unit:"week"}):addLeadingZeros(re,W.length)},I:function(X,W,J){const te=getISOWeek(X);return W==="Io"?J.ordinalNumber(te,{unit:"week"}):addLeadingZeros(te,W.length)},d:function(X,W,J){return W==="do"?J.ordinalNumber(X.getDate(),{unit:"date"}):lightFormatters.d(X,W)},D:function(X,W,J){const te=getDayOfYear(X);return W==="Do"?J.ordinalNumber(te,{unit:"dayOfYear"}):addLeadingZeros(te,W.length)},E:function(X,W,J){const te=X.getDay();switch(W){case"E":case"EE":case"EEE":return J.day(te,{width:"abbreviated",context:"formatting"});case"EEEEE":return J.day(te,{width:"narrow",context:"formatting"});case"EEEEEE":return J.day(te,{width:"short",context:"formatting"});case"EEEE":default:return J.day(te,{width:"wide",context:"formatting"})}},e:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"e":return String(ne);case"ee":return addLeadingZeros(ne,2);case"eo":return J.ordinalNumber(ne,{unit:"day"});case"eee":return J.day(re,{width:"abbreviated",context:"formatting"});case"eeeee":return J.day(re,{width:"narrow",context:"formatting"});case"eeeeee":return J.day(re,{width:"short",context:"formatting"});case"eeee":default:return J.day(re,{width:"wide",context:"formatting"})}},c:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"c":return String(ne);case"cc":return addLeadingZeros(ne,W.length);case"co":return J.ordinalNumber(ne,{unit:"day"});case"ccc":return J.day(re,{width:"abbreviated",context:"standalone"});case"ccccc":return J.day(re,{width:"narrow",context:"standalone"});case"cccccc":return J.day(re,{width:"short",context:"standalone"});case"cccc":default:return J.day(re,{width:"wide",context:"standalone"})}},i:function(X,W,J){const te=X.getDay(),re=te===0?7:te;switch(W){case"i":return String(re);case"ii":return addLeadingZeros(re,W.length);case"io":return J.ordinalNumber(re,{unit:"day"});case"iii":return J.day(te,{width:"abbreviated",context:"formatting"});case"iiiii":return J.day(te,{width:"narrow",context:"formatting"});case"iiiiii":return J.day(te,{width:"short",context:"formatting"});case"iiii":default:return J.day(te,{width:"wide",context:"formatting"})}},a:function(X,W,J){const re=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"aaa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"aaaa":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},b:function(X,W,J){const te=X.getHours();let re;switch(te===12?re=dayPeriodEnum.noon:te===0?re=dayPeriodEnum.midnight:re=te/12>=1?"pm":"am",W){case"b":case"bb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"bbb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"bbbb":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},B:function(X,W,J){const te=X.getHours();let re;switch(te>=17?re=dayPeriodEnum.evening:te>=12?re=dayPeriodEnum.afternoon:te>=4?re=dayPeriodEnum.morning:re=dayPeriodEnum.night,W){case"B":case"BB":case"BBB":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"BBBBB":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"BBBB":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},h:function(X,W,J){if(W==="ho"){let te=X.getHours()%12;return te===0&&(te=12),J.ordinalNumber(te,{unit:"hour"})}return lightFormatters.h(X,W)},H:function(X,W,J){return W==="Ho"?J.ordinalNumber(X.getHours(),{unit:"hour"}):lightFormatters.H(X,W)},K:function(X,W,J){const te=X.getHours()%12;return W==="Ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},k:function(X,W,J){let te=X.getHours();return te===0&&(te=24),W==="ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},m:function(X,W,J){return W==="mo"?J.ordinalNumber(X.getMinutes(),{unit:"minute"}):lightFormatters.m(X,W)},s:function(X,W,J){return W==="so"?J.ordinalNumber(X.getSeconds(),{unit:"second"}):lightFormatters.s(X,W)},S:function(X,W){return lightFormatters.S(X,W)},X:function(X,W,J){const te=X.getTimezoneOffset();if(te===0)return"Z";switch(W){case"X":return formatTimezoneWithOptionalMinutes(te);case"XXXX":case"XX":return formatTimezone(te);case"XXXXX":case"XXX":default:return formatTimezone(te,":")}},x:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"x":return formatTimezoneWithOptionalMinutes(te);case"xxxx":case"xx":return formatTimezone(te);case"xxxxx":case"xxx":default:return formatTimezone(te,":")}},O:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(te,":");case"OOOO":default:return"GMT"+formatTimezone(te,":")}},z:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(te,":");case"zzzz":default:return"GMT"+formatTimezone(te,":")}},t:function(X,W,J){const te=Math.trunc(X.getTime()/1e3);return addLeadingZeros(te,W.length)},T:function(X,W,J){const te=X.getTime();return addLeadingZeros(te,W.length)}};function formatTimezoneShort(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=Math.trunc(te/60),ne=te%60;return ne===0?J+String(re):J+String(re)+W+addLeadingZeros(ne,2)}function formatTimezoneWithOptionalMinutes(X,W){return X%60===0?(X>0?"-":"+")+addLeadingZeros(Math.abs(X)/60,2):formatTimezone(X,W)}function formatTimezone(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=addLeadingZeros(Math.trunc(te/60),2),ne=addLeadingZeros(te%60,2);return J+re+W+ne}const dateLongFormatter=(X,W)=>{switch(X){case"P":return W.date({width:"short"});case"PP":return W.date({width:"medium"});case"PPP":return W.date({width:"long"});case"PPPP":default:return W.date({width:"full"})}},timeLongFormatter=(X,W)=>{switch(X){case"p":return W.time({width:"short"});case"pp":return W.time({width:"medium"});case"ppp":return W.time({width:"long"});case"pppp":default:return W.time({width:"full"})}},dateTimeLongFormatter=(X,W)=>{const J=X.match(/(P+)(p+)?/)||[],te=J[1],re=J[2];if(!re)return dateLongFormatter(X,W);let ne;switch(te){case"P":ne=W.dateTime({width:"short"});break;case"PP":ne=W.dateTime({width:"medium"});break;case"PPP":ne=W.dateTime({width:"long"});break;case"PPPP":default:ne=W.dateTime({width:"full"});break}return ne.replace("{{date}}",dateLongFormatter(te,W)).replace("{{time}}",timeLongFormatter(re,W))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(X){return dayOfYearTokenRE.test(X)}function isProtectedWeekYearToken(X){return weekYearTokenRE.test(X)}function warnOrThrowProtectedError(X,W,J){const te=message(X,W,J);if(console.warn(te),throwTokens.includes(X))throw new RangeError(te)}function message(X,W,J){const te=X[0]==="Y"?"years":"days of the month";return`Use \`${X.toLowerCase()}\` instead of \`${X}\` (in \`${W}\`) for formatting ${te} to the input \`${J}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(X,W,J){var he,pe,fe,ge;const te=getDefaultOptions$1(),re=te.locale??enUS,ne=te.firstWeekContainsDate??((pe=(he=te.locale)==null?void 0:he.options)==null?void 0:pe.firstWeekContainsDate)??1,oe=te.weekStartsOn??((ge=(fe=te.locale)==null?void 0:fe.options)==null?void 0:ge.weekStartsOn)??0,de=toDate(X);if(!isValid(de))throw new RangeError("Invalid time value");let ue=W.match(longFormattingTokensRegExp$1).map(be=>{const me=be[0];if(me==="p"||me==="P"){const ve=longFormatters[me];return ve(be,re.formatLong)}return be}).join("").match(formattingTokensRegExp$1).map(be=>{if(be==="''")return{isToken:!1,value:"'"};const me=be[0];if(me==="'")return{isToken:!1,value:cleanEscapedString$1(be)};if(formatters[me])return{isToken:!0,value:be};if(me.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+me+"`");return{isToken:!1,value:be}});re.localize.preprocessor&&(ue=re.localize.preprocessor(de,ue));const ce={firstWeekContainsDate:ne,weekStartsOn:oe,locale:re};return ue.map(be=>{if(!be.isToken)return be.value;const me=be.value;(isProtectedWeekYearToken(me)||isProtectedDayOfYearToken(me))&&warnOrThrowProtectedError(me,W,String(X));const ve=formatters[me[0]];return ve(de,me,re.localize,ce)}).join("")}function cleanEscapedString$1(X){const W=X.match(escapedStringRegExp$1);return W?W[1].replace(doubleQuoteRegExp$1,"'"):X}function getDay(X){return toDate(X).getDay()}function getDefaultOptions(){return Object.assign({},getDefaultOptions$1())}function getISODay(X){let J=toDate(X).getDay();return J===0&&(J=7),J}function transpose(X,W){const J=W instanceof Date?constructFrom(W,0):new W(0);return J.setFullYear(X.getFullYear(),X.getMonth(),X.getDate()),J.setHours(X.getHours(),X.getMinutes(),X.getSeconds(),X.getMilliseconds()),J}const TIMEZONE_UNIT_PRIORITY=10;class Setter{constructor(){zt(this,"subPriority",0)}validate(W,J){return!0}}class ValueSetter extends Setter{constructor(W,J,te,re,ne){super(),this.value=W,this.validateValue=J,this.setValue=te,this.priority=re,ne&&(this.subPriority=ne)}validate(W,J){return this.validateValue(W,this.value,J)}set(W,J,te){return this.setValue(W,J,this.value,te)}}class DateToSystemTimezoneSetter extends Setter{constructor(){super(...arguments);zt(this,"priority",TIMEZONE_UNIT_PRIORITY);zt(this,"subPriority",-1)}set(J,te){return te.timestampIsSet?J:constructFrom(J,transpose(J,Date))}}class Parser{run(W,J,te,re){const ne=this.parse(W,J,te,re);return ne?{setter:new ValueSetter(ne.value,this.validate,this.set,this.priority,this.subPriority),rest:ne.rest}:null}validate(W,J,te){return!0}}class EraParser extends Parser{constructor(){super(...arguments);zt(this,"priority",140);zt(this,"incompatibleTokens",["R","u","t","T"])}parse(J,te,re){switch(te){case"G":case"GG":case"GGG":return re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"});case"GGGGG":return re.era(J,{width:"narrow"});case"GGGG":default:return re.era(J,{width:"wide"})||re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"})}}set(J,te,re){return te.era=re,J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}const numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(X,W){return X&&{value:W(X.value),rest:X.rest}}function parseNumericPattern(X,W){const J=W.match(X);return J?{value:parseInt(J[0],10),rest:W.slice(J[0].length)}:null}function parseTimezonePattern(X,W){const J=W.match(X);if(!J)return null;if(J[0]==="Z")return{value:0,rest:W.slice(1)};const te=J[1]==="+"?1:-1,re=J[2]?parseInt(J[2],10):0,ne=J[3]?parseInt(J[3],10):0,oe=J[5]?parseInt(J[5],10):0;return{value:te*(re*millisecondsInHour+ne*millisecondsInMinute+oe*millisecondsInSecond),rest:W.slice(J[0].length)}}function parseAnyDigitsSigned(X){return parseNumericPattern(numericPatterns.anyDigitsSigned,X)}function parseNDigits(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigit,W);case 2:return parseNumericPattern(numericPatterns.twoDigits,W);case 3:return parseNumericPattern(numericPatterns.threeDigits,W);case 4:return parseNumericPattern(numericPatterns.fourDigits,W);default:return parseNumericPattern(new RegExp("^\\d{1,"+X+"}"),W)}}function parseNDigitsSigned(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,W);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,W);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,W);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,W);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+X+"}"),W)}}function dayPeriodEnumToHours(X){switch(X){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(X,W){const J=W>0,te=J?W:1-W;let re;if(te<=50)re=X||100;else{const ne=te+50,oe=Math.trunc(ne/100)*100,de=X>=ne%100;re=X+oe-(de?100:0)}return J?re:1-re}function isLeapYearIndex(X){return X%400===0||X%4===0&&X%100!==0}class YearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="yy"});switch(te){case"y":return mapValue(parseNDigits(4,J),ne);case"yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re){const ne=J.getFullYear();if(re.isTwoDigitYear){const de=normalizeTwoDigitYear(re.year,ne);return J.setFullYear(de,0,1),J.setHours(0,0,0,0),J}const oe=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(oe,0,1),J.setHours(0,0,0,0),J}}class LocalWeekYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="YY"});switch(te){case"Y":return mapValue(parseNDigits(4,J),ne);case"Yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re,ne){const oe=getWeekYear(J,ne);if(re.isTwoDigitYear){const ue=normalizeTwoDigitYear(re.year,oe);return J.setFullYear(ue,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}const de=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(de,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}}class ISOWeekYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="R"?4:te.length,J)}set(J,te,re){const ne=constructFrom(J,0);return ne.setFullYear(re,0,4),ne.setHours(0,0,0,0),startOfISOWeek(ne)}}class ExtendedYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="u"?4:te.length,J)}set(J,te,re){return J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}class QuarterParser extends Parser{constructor(){super(...arguments);zt(this,"priority",120);zt(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"Q":case"QQ":return parseNDigits(te.length,J);case"Qo":return re.ordinalNumber(J,{unit:"quarter"});case"QQQ":return re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQQ":return re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQ":default:return re.quarter(J,{width:"wide",context:"formatting"})||re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class StandAloneQuarterParser extends Parser{constructor(){super(...arguments);zt(this,"priority",120);zt(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"q":case"qq":return parseNDigits(te.length,J);case"qo":return re.ordinalNumber(J,{unit:"quarter"});case"qqq":return re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"});case"qqqqq":return re.quarter(J,{width:"narrow",context:"standalone"});case"qqqq":default:return re.quarter(J,{width:"wide",context:"standalone"})||re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class MonthParser extends Parser{constructor(){super(...arguments);zt(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);zt(this,"priority",110)}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"M":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"MM":return mapValue(parseNDigits(2,J),ne);case"Mo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"MMM":return re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"});case"MMMMM":return re.month(J,{width:"narrow",context:"formatting"});case"MMMM":default:return re.month(J,{width:"wide",context:"formatting"})||re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}class StandAloneMonthParser extends Parser{constructor(){super(...arguments);zt(this,"priority",110);zt(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"L":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"LL":return mapValue(parseNDigits(2,J),ne);case"Lo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"LLL":return re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"});case"LLLLL":return re.month(J,{width:"narrow",context:"standalone"});case"LLLL":default:return re.month(J,{width:"wide",context:"standalone"})||re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}function setWeek(X,W,J){const te=toDate(X),re=getWeek(te,J)-W;return te.setDate(te.getDate()-re*7),te}class LocalWeekParser extends Parser{constructor(){super(...arguments);zt(this,"priority",100);zt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(J,te,re){switch(te){case"w":return parseNumericPattern(numericPatterns.week,J);case"wo":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re,ne){return startOfWeek(setWeek(J,re,ne),ne)}}function setISOWeek(X,W){const J=toDate(X),te=getISOWeek(J)-W;return J.setDate(J.getDate()-te*7),J}class ISOWeekParser extends Parser{constructor(){super(...arguments);zt(this,"priority",100);zt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(J,te,re){switch(te){case"I":return parseNumericPattern(numericPatterns.week,J);case"Io":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re){return startOfISOWeek(setISOWeek(J,re))}}const DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31];class DateParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"subPriority",1);zt(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"d":return parseNumericPattern(numericPatterns.date,J);case"do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear(),ne=isLeapYearIndex(re),oe=J.getMonth();return ne?te>=1&&te<=DAYS_IN_MONTH_LEAP_YEAR[oe]:te>=1&&te<=DAYS_IN_MONTH[oe]}set(J,te,re){return J.setDate(re),J.setHours(0,0,0,0),J}}class DayOfYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"subpriority",1);zt(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(J,te,re){switch(te){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,J);case"Do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear();return isLeapYearIndex(re)?te>=1&&te<=366:te>=1&&te<=365}set(J,te,re){return J.setMonth(0,re),J.setHours(0,0,0,0),J}}function setDay(X,W,J){var pe,fe,ge,be;const te=getDefaultOptions$1(),re=(J==null?void 0:J.weekStartsOn)??((fe=(pe=J==null?void 0:J.locale)==null?void 0:pe.options)==null?void 0:fe.weekStartsOn)??te.weekStartsOn??((be=(ge=te.locale)==null?void 0:ge.options)==null?void 0:be.weekStartsOn)??0,ne=toDate(X),oe=ne.getDay(),ue=(W%7+7)%7,ce=7-re,he=W<0||W>6?W-(oe+ce)%7:(ue+ce)%7-(oe+ce)%7;return addDays(ne,he)}class DayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"E":case"EE":case"EEE":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEEE":return re.day(J,{width:"narrow",context:"formatting"});case"EEEEEE":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEE":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class LocalDayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(J,te,re,ne){const oe=de=>{const ue=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+ue};switch(te){case"e":case"ee":return mapValue(parseNDigits(te.length,J),oe);case"eo":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"eee":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeeee":return re.day(J,{width:"narrow",context:"formatting"});case"eeeeee":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeee":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class StandAloneLocalDayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(J,te,re,ne){const oe=de=>{const ue=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+ue};switch(te){case"c":case"cc":return mapValue(parseNDigits(te.length,J),oe);case"co":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"ccc":return re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"ccccc":return re.day(J,{width:"narrow",context:"standalone"});case"cccccc":return re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"cccc":default:return re.day(J,{width:"wide",context:"standalone"})||re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}function setISODay(X,W){const J=toDate(X),te=getISODay(J),re=W-te;return addDays(J,re)}class ISODayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe===0?7:oe;switch(te){case"i":case"ii":return parseNDigits(te.length,J);case"io":return re.ordinalNumber(J,{unit:"day"});case"iii":return mapValue(re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiii":return mapValue(re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiiii":return mapValue(re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiii":default:return mapValue(re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne)}}validate(J,te){return te>=1&&te<=7}set(J,te,re){return J=setISODay(J,re),J.setHours(0,0,0,0),J}}class AMPMParser extends Parser{constructor(){super(...arguments);zt(this,"priority",80);zt(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(J,te,re){switch(te){case"a":case"aa":case"aaa":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaaa":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaa":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class AMPMMidnightParser extends Parser{constructor(){super(...arguments);zt(this,"priority",80);zt(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(J,te,re){switch(te){case"b":case"bb":case"bbb":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbbb":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbb":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class DayPeriodParser extends Parser{constructor(){super(...arguments);zt(this,"priority",80);zt(this,"incompatibleTokens",["a","b","t","T"])}parse(J,te,re){switch(te){case"B":case"BB":case"BBB":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBBB":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBB":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class Hour1to12Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["H","K","k","t","T"])}parse(J,te,re){switch(te){case"h":return parseNumericPattern(numericPatterns.hour12h,J);case"ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=12}set(J,te,re){const ne=J.getHours()>=12;return ne&&re<12?J.setHours(re+12,0,0,0):!ne&&re===12?J.setHours(0,0,0,0):J.setHours(re,0,0,0),J}}class Hour0to23Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(J,te,re){switch(te){case"H":return parseNumericPattern(numericPatterns.hour23h,J);case"Ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=23}set(J,te,re){return J.setHours(re,0,0,0),J}}class Hour0To11Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["h","H","k","t","T"])}parse(J,te,re){switch(te){case"K":return parseNumericPattern(numericPatterns.hour11h,J);case"Ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.getHours()>=12&&re<12?J.setHours(re+12,0,0,0):J.setHours(re,0,0,0),J}}class Hour1To24Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(J,te,re){switch(te){case"k":return parseNumericPattern(numericPatterns.hour24h,J);case"ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=24}set(J,te,re){const ne=re<=24?re%24:re;return J.setHours(ne,0,0,0),J}}class MinuteParser extends Parser{constructor(){super(...arguments);zt(this,"priority",60);zt(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"m":return parseNumericPattern(numericPatterns.minute,J);case"mo":return re.ordinalNumber(J,{unit:"minute"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setMinutes(re,0,0),J}}class SecondParser extends Parser{constructor(){super(...arguments);zt(this,"priority",50);zt(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"s":return parseNumericPattern(numericPatterns.second,J);case"so":return re.ordinalNumber(J,{unit:"second"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setSeconds(re,0),J}}class FractionOfSecondParser extends Parser{constructor(){super(...arguments);zt(this,"priority",30);zt(this,"incompatibleTokens",["t","T"])}parse(J,te){const re=ne=>Math.trunc(ne*Math.pow(10,-te.length+3));return mapValue(parseNDigits(te.length,J),re)}set(J,te,re){return J.setMilliseconds(re),J}}class ISOTimezoneWithZParser extends Parser{constructor(){super(...arguments);zt(this,"priority",10);zt(this,"incompatibleTokens",["t","T","x"])}parse(J,te){switch(te){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"XX":return parseTimezonePattern(timezonePatterns.basic,J);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class ISOTimezoneParser extends Parser{constructor(){super(...arguments);zt(this,"priority",10);zt(this,"incompatibleTokens",["t","T","X"])}parse(J,te){switch(te){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"xx":return parseTimezonePattern(timezonePatterns.basic,J);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class TimestampSecondsParser extends Parser{constructor(){super(...arguments);zt(this,"priority",40);zt(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re*1e3),{timestampIsSet:!0}]}}class TimestampMillisecondsParser extends Parser{constructor(){super(...arguments);zt(this,"priority",20);zt(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re),{timestampIsSet:!0}]}}const parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser},formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse(X,W,J,te){var me,ve,ye,we;const re=getDefaultOptions(),ne=re.locale??enUS,oe=re.firstWeekContainsDate??((ve=(me=re.locale)==null?void 0:me.options)==null?void 0:ve.firstWeekContainsDate)??1,de=re.weekStartsOn??((we=(ye=re.locale)==null?void 0:ye.options)==null?void 0:we.weekStartsOn)??0,ue={firstWeekContainsDate:oe,weekStartsOn:de,locale:ne},ce=[new DateToSystemTimezoneSetter],he=W.match(longFormattingTokensRegExp).map(Se=>{const _e=Se[0];if(_e in longFormatters){const Ce=longFormatters[_e];return Ce(Se,ne.formatLong)}return Se}).join("").match(formattingTokensRegExp),pe=[];for(let Se of he){isProtectedWeekYearToken(Se)&&warnOrThrowProtectedError(Se,W,X),isProtectedDayOfYearToken(Se)&&warnOrThrowProtectedError(Se,W,X);const _e=Se[0],Ce=parsers[_e];if(Ce){const{incompatibleTokens:Le}=Ce;if(Array.isArray(Le)){const Ie=pe.find(Fe=>Le.includes(Fe.token)||Fe.token===_e);if(Ie)throw new RangeError(`The format string mustn't contain \`${Ie.fullToken}\` and \`${Se}\` at the same time`)}else if(Ce.incompatibleTokens==="*"&&pe.length>0)throw new RangeError(`The format string mustn't contain \`${Se}\` and any other token at the same time`);pe.push({token:_e,fullToken:Se});const Pe=Ce.run(X,Se,ne.match,ue);if(!Pe)return constructFrom(J,NaN);ce.push(Pe.setter),X=Pe.rest}else{if(_e.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_e+"`");if(Se==="''"?Se="'":_e==="'"&&(Se=cleanEscapedString(Se)),X.indexOf(Se)===0)X=X.slice(Se.length);else return constructFrom(J,NaN)}}if(X.length>0&¬WhitespaceRegExp.test(X))return constructFrom(J,NaN);const fe=ce.map(Se=>Se.priority).sort((Se,_e)=>_e-Se).filter((Se,_e,Ce)=>Ce.indexOf(Se)===_e).map(Se=>ce.filter(_e=>_e.priority===Se).sort((_e,Ce)=>Ce.subPriority-_e.subPriority)).map(Se=>Se[0]);let ge=toDate(J);if(isNaN(ge.getTime()))return constructFrom(J,NaN);const be={};for(const Se of fe){if(!Se.validate(ge,ue))return constructFrom(J,NaN);const _e=Se.set(ge,be,ue);Array.isArray(_e)?(ge=_e[0],Object.assign(be,_e[1])):ge=_e}return constructFrom(J,ge)}function cleanEscapedString(X){return X.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}const notFound="data:image/svg+xml,%3csvg%20width='215'%20height='150'%20viewBox='0%200%20215%20150'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.9'%20d='M135.132%2057.43C96.9221%2047.658%2083.3815%20-29.7048%2026.9734%2012.5083C-13.0511%2042.4595%2011.4691%20115.499%2061.6878%20107.019C92.0822%20101.867%2087.3917%20101.341%20113.129%20115.244C139.231%20129.308%20167.972%20136.397%20195.855%20111.436C210.28%2098.5179%20215.939%2067.0352%20201.939%2050.7417C184.388%2030.3592%20158.485%2063.4098%20135.132%2057.43Z'%20fill='%23EFF7FF'/%3e%3cellipse%20cx='120.5'%20cy='143.5'%20rx='52.5'%20ry='3.5'%20fill='%23F5F5F5'/%3e%3cpath%20d='M121.387%2080.2184C121.995%2079.5948%20122.563%2078.953%20123.09%2078.2959L134.396%2089.3383C135.09%2090.0177%20134.851%2091.389%20133.861%2092.4024C132.872%2093.4159%20131.505%2093.6888%20130.811%2093.0094L119.505%2081.967C120.148%2081.424%20120.777%2080.8407%20121.385%2080.2171L121.387%2080.2184Z'%20fill='%231D1D1D'/%3e%3cpath%20opacity='0.6'%20d='M121.127%2079.9896C132.157%2068.6986%20131.888%2050.5485%20120.527%2039.4502C109.166%2028.3519%2091.0149%2028.5081%2079.9849%2039.799C68.955%2051.09%2069.2233%2069.2401%2080.5843%2080.3385C91.9453%2091.4368%20110.097%2091.2806%20121.127%2079.9896Z'%20fill='%238FC2F5'/%3e%3cpath%20d='M78.0382%2083.0622C90.8729%2095.6382%20111.378%2095.4578%20123.835%2082.6609C136.293%2069.8625%20135.986%2049.2932%20123.15%2036.7173C110.316%2024.1413%2089.8107%2024.3217%2077.3538%2037.1186C64.8956%2049.9169%2065.2022%2070.4862%2078.0382%2083.0622ZM80.642%2080.387C69.289%2069.264%2069.0172%2051.0692%2080.037%2039.749C91.0569%2028.4288%20109.194%2028.2694%20120.547%2039.3938C131.9%2050.5182%20132.171%2068.713%20121.152%2080.0332C110.132%2091.3534%2091.9949%2091.5128%2080.642%2080.3884V80.387Z'%20fill='%237BACFC'/%3e%3cpath%20d='M169.953%20128.522L171.714%20126.696C173.474%20124.871%20173.421%20121.964%20171.595%20120.205L135.013%2084.9265C133.187%2083.1661%20130.281%2083.2205%20128.522%2085.0451L126.761%2086.8711C125.001%2088.6957%20125.055%2091.6028%20126.88%2093.3619L163.462%20128.64C165.287%20130.401%20168.194%20130.346%20169.953%20128.522Z'%20fill='%23656565'/%3e%3cpath%20opacity='0.35'%20d='M88.8399%2071.2315C96.506%2079.2245%20101.258%2078.1642%20100.757%2082.4547C100.256%2086.7452%2091.398%2085.7448%2082.7698%2076.0396C74.1415%2066.3344%2075.0893%2054.9166%2079.8491%2055.2485C84.6089%2055.5803%2080.129%2062.1492%2088.8399%2071.2315Z'%20fill='white'/%3e%3c/svg%3e";/**
|
|
319
|
+
${r$H(styles$h)}
|
|
320
|
+
`}handleTest(){console.log(this.selectedPeriodDate)}};__decorateClass$p([n$w()],ExportPdfModal.prototype,"selectedRadioOption",2),__decorateClass$p([n$w()],ExportPdfModal.prototype,"text",2),__decorateClass$p([n$w()],ExportPdfModal.prototype,"selectedVisibilityLevelElement",2),__decorateClass$p([n$w()],ExportPdfModal.prototype,"selectedPeriodDate",2),__decorateClass$p([n$w({type:Array})],ExportPdfModal.prototype,"arrayElements",2),ExportPdfModal=__decorateClass$p([t$i("export-pdf-modal")],ExportPdfModal);class ExportToPdfHandler extends ApiBaseHandler{async handle(){try{this.api.interactionService.confirm(void 0,ExportPdfModal,{title:translate("modal.selectExportOption"),confirmButtonText:"Exportar",cancelButtonText:"Cancelar"})}catch(W){this._notifyError(W.message)}}_notifyError(W){this.api.notificationService.error(W||"actions.delete.error")}}class ExportPdf{}let request$e;const bootstrapExportPdf=X=>{request$e=X.registerRequest(ExportPdf,ExportToPdfHandler)},teardownExportPdf=()=>{request$e==null||request$e.dispose()},{addActivityHistoryItems}=activityHistoryCollectionsSlice.actions;class AddHistoryItemsHandler extends StoreBaseHandler{async handle(W){try{const J=validateAndFilterItems(W.items);this.store.dispatch(addActivityHistoryItems({id:W.entityId,items:J,componentFactory:W.componentFactory,searchPredicate:W.searchPredicate})),handleAddDiagnosticsFilter(J,this.store)}catch(J){console.log(J.message)}}}let request$d;const bootstrapAddHistoryItems=X=>{request$d=X.registerRequest(addHistoryItemsCommand,AddHistoryItemsHandler)},teardownAddHistoryItems=()=>{request$d==null||request$d.dispose()},{updateActivityHistoryItem}=activityHistoryCollectionsSlice.actions;class UpdateHistoryItemHandler extends StoreBaseHandler{async handle(W){try{ensureAreValidActivityHistoryItems([W.item]),this.store.dispatch(updateActivityHistoryItem({id:W.entityId,item:W.item}))}catch(J){console.log(J.message)}}}const updateHistoryItemCommand="update_history_item_request";let request$c;const bootstrapUpdateHistoryItem=X=>{request$c=X.registerRequest(updateHistoryItemCommand,UpdateHistoryItemHandler)},teardownUpdateHistoryItem=()=>{request$c==null||request$c.dispose()};function connectedProperty(X,W={}){return createConnectedProperty(store)(X,W)}const activityHistorySearchStringSelector=X=>X.activityHistoryFilters.searchString;function getUniqueObjects(X,W,J){return Array.from(X.map(te=>({id:W.reduce((re,ne)=>re==null?void 0:re[ne],te),title:J.reduce((re,ne)=>re==null?void 0:re[ne],te)})).filter(te=>typeof te.id=="string"&&typeof te.title=="string").reduce((te,re)=>te.set(re.id,re),new Map).values())}class TrueSpec extends Spec{isSatisfiedBy(){return!0}}class CommonFilterSpec extends Spec{constructor(W){super(),this.commonFilters=W}isSatisfiedBy(W){return this.commonFilters.filter(re=>re.enabled).reduce((re,ne)=>re.and(new ne.spec),new TrueSpec).isSatisfiedBy(W)}}class FalseSpec extends Spec{isSatisfiedBy(){return!1}}class PropPathSpec extends Spec{constructor(W,J){super(),this.propPath=W,this.value=J}isSatisfiedBy(W){return this.propPath.reduce((te,re)=>te==null?void 0:te[re],W)===this.value}}class CustomFilterSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){const J=this.filters.filter(te=>te.enabled);return J.length===0?!0:J.every(te=>{if(!this.belongsToGroup(W,te))return!0;const re=te.filters.filter(ne=>ne.enabled||ne.singleOption);return re.length===0?!0:re.every(ne=>ne.singleOption?ne.enabled?!0:new PropPathSpec(ne.propPathValue,!1).isSatisfiedBy(W):!ne.enabledValues||ne.enabledValues.length===0?!0:ne.enabledValues.reduce((de,ue)=>de.or(new PropPathSpec(ne.propPathValue,ue)),new FalseSpec).isSatisfiedBy(W))})}belongsToGroup(W,J){return W.type===J.id}}const normalizeStringToNFD=X=>X==null?"":String(X).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase(),propContainsString=(X,W)=>{const J=normalizeStringToNFD(X),te=normalizeStringToNFD(W);return J.toString().toLowerCase().indexOf(te)!==-1||J.toString().indexOf(te)!==-1},commonFieldsSearchPredicate=(X,W)=>{var ue,ce,he,pe,fe,ge,be;const J=((ue=X.professional)==null?void 0:ue.name)&&propContainsString((ce=X.professional)==null?void 0:ce.name,W),te=X.center.description&&propContainsString(X.center.description,W),re=((he=X.professional)==null?void 0:he.speciality.description)&&propContainsString((pe=X.professional)==null?void 0:pe.speciality.description,W),ne=((fe=X.professional)==null?void 0:fe.role.description)&&propContainsString((ge=X.professional)==null?void 0:ge.role.description,W),oe=X.service.description&&propContainsString(X.service.description,W),de=(be=X.diagnostics)==null?void 0:be.some(me=>propContainsString(me.id,W)||propContainsString(me.description,W));return J||te||re||ne||oe||de};class SearchStringSpec extends Spec{constructor(W,J){super(),this.searchString=W,this.searchPredicate=J}isSatisfiedBy(W){var re;if(!((re=this.searchString)!=null&&re.trim()))return!0;const J=commonFieldsSearchPredicate(W,this.searchString),te=this.searchPredicate?this.searchPredicate(this.searchString.toLowerCase(),W):!1;return!!(J||te)}}class TypeSpec extends Spec{constructor(W){super(),this.itemType=W}isSatisfiedBy(W){return(W==null?void 0:W.type)===this.itemType}}class ComposedTypeSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){return this.filters.filter(re=>re.enabled).map(re=>re.id).reduce((re,ne)=>re.or(new TypeSpec(ne)),new FalseSpec).isSatisfiedBy(W)}}const activityHistoryFiltersSelector=X=>X.activityHistoryFilters.filters,activityHistoryCommonFiltersSelector=createSelector(activityHistoryFiltersSelector,X=>{var W;return((W=X.find(isCommonFilterGroup))==null?void 0:W.filters)||[]}),activityHistoryEnabledCommonFiltersSelector=createSelector(activityHistoryCommonFiltersSelector,X=>X.filter(W=>W.enabled)),areCommonFiltersActive=createSelector(activityHistoryEnabledCommonFiltersSelector,X=>!!X.length),activityHistoryCustomFilterGroupsSelector=createSelector(activityHistoryFiltersSelector,X=>X.filter(isCustomFilter).sort(sortBySortProperty)),sortBySortProperty=(X,W)=>Number(X.sort)-Number(W.sort),areCustomFiltersActive=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.some(W=>W.filters.some(J=>{var te;return(te=J.enabledValues)==null?void 0:te.length}))),activeGroupsWithEnabledFilters=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.filter(W=>W.enabled).map(({id:W,title:J,enabled:te,sort:re,filters:ne})=>({id:W,title:J,enabled:te,sort:re,filters:ne.filter(oe=>{var de;return(de=oe.enabledValues)==null?void 0:de.length})})).filter(W=>W.filters.length>0)),isSameVisit=(X,W)=>{var ne,oe,de,ue,ce,he,pe,fe,ge,be,me,ve,ye,we;const J=((ne=X.professional)==null?void 0:ne.id)===((oe=W.professional)==null?void 0:oe.id)&&((de=X.professional)==null?void 0:de.role.id)===((ue=W.professional)==null?void 0:ue.role.id)&&((ce=X.professional)==null?void 0:ce.speciality.id)===((he=W.professional)==null?void 0:he.speciality.id),te=((pe=X.ep)==null?void 0:pe.id)===((fe=W.ep)==null?void 0:fe.id)&&((ge=X.up)==null?void 0:ge.id)===((be=W.up)==null?void 0:be.id)&&((me=X.center)==null?void 0:me.id)===((ve=W.center)==null?void 0:ve.id)&&((ye=X.service)==null?void 0:ye.id)===((we=W.service)==null?void 0:we.id),re=new Date(X.date).toDateString()===new Date(W.date).toDateString();return J&&te&&re},withinEightHours=(X,W)=>Math.abs(new Date(X).getTime()-new Date(W).getTime())<=8*60*60*1e3,areSameDiagnostics=(X,W)=>{if(X.length!==W.length)return!1;const J=X.map(re=>re.codi).sort(),te=W.map(re=>re.codi).sort();return J.every((re,ne)=>re===te[ne])},groupActivityHistoryItems=X=>{const W=[];return X==null||X.forEach(J=>{let te=!1;for(const re of W){const ne=re.items[0],oe=re.items[re.items.length-1];if(isSameVisit(ne,J)&&withinEightHours(ne.date,J.date)&&withinEightHours(oe.date,J.date)){re.items.push(J),te=!0;break}}te||W.push({idGroup:Math.random().toString(36).substr(2,9),items:[J]})}),W.forEach(J=>{const te=[],re=[];J.items.forEach(ne=>{var oe;if(((oe=ne.diagnostics)==null?void 0:oe.length)>0){let de=!1;for(const ue of te){const ce=ue.items[0];if(areSameDiagnostics(ce.diagnostics,ne.diagnostics)){ue.items.push(ne),de=!0;break}}de||te.push({idSubGroup:Math.random().toString(36).substr(2,9),items:[ne]})}else re.push(ne)}),J.items=re,J.subGroups=te}),W},sortGroupsByMostRecentDate=X=>{const W=ne=>ne.reduce((oe,de)=>{const ue=new Date(de.date);return ue>oe?ue:oe},new Date(0)),J=ne=>ne.sort((oe,de)=>new Date(de.date).getTime()-new Date(oe.date).getTime()),te=ne=>W(ne.items),re=ne=>{const oe=ne.items.length>0?[W(ne.items)]:[],de=ne.subGroups.map(te),ue=[...oe,...de];return ue.length>0?new Date(Math.max(...ue.map(ce=>ce.getTime()))):new Date(0)};return X.forEach(ne=>{ne.items=J(ne.items),ne.subGroups.forEach(oe=>{oe.items=J(oe.items)}),ne.subGroups.sort((oe,de)=>te(de).getTime()-te(oe).getTime())}),X.sort((ne,oe)=>re(oe).getTime()-re(ne).getTime())},diagnosticFilterSelector=createSelector(activityHistoryFiltersSelector,X=>X.find(isDiagnosticFilter)),diagnosticFilterEnabledValuesSelector=createSelector(diagnosticFilterSelector,X=>(X==null?void 0:X.enabledValues)||[]),areDiagnosticFiltersActive=createSelector(diagnosticFilterEnabledValuesSelector,X=>!!X.length);class DiagnosticCodeSpec extends Spec{constructor(W){super(),this.diagnosticCodes=W}isSatisfiedBy(W){var te;return(te=this.diagnosticCodes)!=null&&te.length?(W.diagnostics??[]).some(re=>this.diagnosticCodes.includes(re.codi)):!0}}const activityHistoryCollectionsSelector=X=>X.activityHistoryCollections.collections,mapItemsWithMetadata=(X,W,J,te)=>X.map(re=>({...re,searchPredicate:te,componentFactory:W,type:J})),activityHistoryMappedItems=createSelector(activityHistoryCollectionsSelector,X=>Object.values(X).flatMap(W=>mapItemsWithMetadata(W.items,W.componentFactory,W.id,W.searchPredicate))),customFilterGroupsWithOptionsSelector=createSelector(activityHistoryCustomFilterGroupsSelector,activityHistoryCollectionsSelector,(X,W)=>X.map(te=>{const re=W[te.id];return{...te,filters:te.filters.map(ne=>({...ne,options:(ne.singleOption?[]:getUniqueObjects(re.items,ne.propPathValue,ne.propsPathDescription))||[]}))}})),activityHistoryGroupedItems=createSelector(activityHistoryMappedItems,activityHistorySearchStringSelector,activityHistoryCommonFiltersSelector,activityHistoryCustomFilterGroupsSelector,diagnosticFilterEnabledValuesSelector,(X,W,J,te,re)=>{const ne=X.filter(ue=>new SearchStringSpec(W,ue.searchPredicate).and(new CommonFilterSpec(J)).and(new ComposedTypeSpec(te)).and(new CustomFilterSpec(te)).and(new DiagnosticCodeSpec(re)).isSatisfiedBy(ue)),oe=groupActivityHistoryItems(ne);return sortGroupsByMostRecentDate(oe)}),styles$g=":host{min-height:1px;height:100%}.virtualizer{height:100%;padding-inline:16px}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-md);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:16px}.visit .visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .visit__items .item[has-divider]:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:16px;border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics:last-of-type{border:none}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item[has-divider]:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";function toDate(X){const W=Object.prototype.toString.call(X);return X instanceof Date||typeof X=="object"&&W==="[object Date]"?new X.constructor(+X):typeof X=="number"||W==="[object Number]"||typeof X=="string"||W==="[object String]"?new Date(X):new Date(NaN)}function constructFrom(X,W){return X instanceof Date?new X.constructor(W):new Date(W)}function addDays(X,W){const J=toDate(X);return isNaN(W)?constructFrom(X,NaN):(W&&J.setDate(J.getDate()+W),J)}const millisecondsInWeek=6048e5,millisecondsInDay=864e5,millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3;let defaultOptions={};function getDefaultOptions$1(){return defaultOptions}function startOfWeek(X,W){var de,ue,ce,he;const J=getDefaultOptions$1(),te=(W==null?void 0:W.weekStartsOn)??((ue=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:ue.weekStartsOn)??J.weekStartsOn??((he=(ce=J.locale)==null?void 0:ce.options)==null?void 0:he.weekStartsOn)??0,re=toDate(X),ne=re.getDay(),oe=(ne<te?7:0)+ne-te;return re.setDate(re.getDate()-oe),re.setHours(0,0,0,0),re}function startOfISOWeek(X){return startOfWeek(X,{weekStartsOn:1})}function getISOWeekYear(X){const W=toDate(X),J=W.getFullYear(),te=constructFrom(X,0);te.setFullYear(J+1,0,4),te.setHours(0,0,0,0);const re=startOfISOWeek(te),ne=constructFrom(X,0);ne.setFullYear(J,0,4),ne.setHours(0,0,0,0);const oe=startOfISOWeek(ne);return W.getTime()>=re.getTime()?J+1:W.getTime()>=oe.getTime()?J:J-1}function startOfDay(X){const W=toDate(X);return W.setHours(0,0,0,0),W}function getTimezoneOffsetInMilliseconds(X){const W=toDate(X),J=new Date(Date.UTC(W.getFullYear(),W.getMonth(),W.getDate(),W.getHours(),W.getMinutes(),W.getSeconds(),W.getMilliseconds()));return J.setUTCFullYear(W.getFullYear()),+X-+J}function differenceInCalendarDays(X,W){const J=startOfDay(X),te=startOfDay(W),re=+J-getTimezoneOffsetInMilliseconds(J),ne=+te-getTimezoneOffsetInMilliseconds(te);return Math.round((re-ne)/millisecondsInDay)}function startOfISOWeekYear(X){const W=getISOWeekYear(X),J=constructFrom(X,0);return J.setFullYear(W,0,4),J.setHours(0,0,0,0),startOfISOWeek(J)}function isDate(X){return X instanceof Date||typeof X=="object"&&Object.prototype.toString.call(X)==="[object Date]"}function isValid(X){if(!isDate(X)&&typeof X!="number")return!1;const W=toDate(X);return!isNaN(Number(W))}function endOfMonth(X){const W=toDate(X),J=W.getMonth();return W.setFullYear(W.getFullYear(),J+1,0),W.setHours(23,59,59,999),W}function eachDayOfInterval(X,W){const J=toDate(X.start),te=toDate(X.end);let re=+J>+te;const ne=re?+J:+te,oe=re?te:J;oe.setHours(0,0,0,0);let de=1;const ue=[];for(;+oe<=ne;)ue.push(toDate(oe)),oe.setDate(oe.getDate()+de),oe.setHours(0,0,0,0);return re?ue.reverse():ue}function startOfMonth(X){const W=toDate(X);return W.setDate(1),W.setHours(0,0,0,0),W}function startOfYear(X){const W=toDate(X),J=constructFrom(X,0);return J.setFullYear(W.getFullYear(),0,1),J.setHours(0,0,0,0),J}const formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=(X,W,J)=>{let te;const re=formatDistanceLocale[X];return typeof re=="string"?te=re:W===1?te=re.one:te=re.other.replace("{{count}}",W.toString()),J!=null&&J.addSuffix?J.comparison&&J.comparison>0?"in "+te:te+" ago":te};function buildFormatLongFn(X){return(W={})=>{const J=W.width?String(W.width):X.defaultWidth;return X.formats[J]||X.formats[X.defaultWidth]}}const dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=(X,W,J,te)=>formatRelativeLocale[X];function buildLocalizeFn(X){return(W,J)=>{const te=J!=null&&J.context?String(J.context):"standalone";let re;if(te==="formatting"&&X.formattingValues){const oe=X.defaultFormattingWidth||X.defaultWidth,de=J!=null&&J.width?String(J.width):oe;re=X.formattingValues[de]||X.formattingValues[oe]}else{const oe=X.defaultWidth,de=J!=null&&J.width?String(J.width):X.defaultWidth;re=X.values[de]||X.values[oe]}const ne=X.argumentCallback?X.argumentCallback(W):W;return re[ne]}}const eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=(X,W)=>{const J=Number(X),te=J%100;if(te>20||te<10)switch(te%10){case 1:return J+"st";case 2:return J+"nd";case 3:return J+"rd"}return J+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:X=>X-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(X){return(W,J={})=>{const te=J.width,re=te&&X.matchPatterns[te]||X.matchPatterns[X.defaultMatchWidth],ne=W.match(re);if(!ne)return null;const oe=ne[0],de=te&&X.parsePatterns[te]||X.parsePatterns[X.defaultParseWidth],ue=Array.isArray(de)?findIndex(de,pe=>pe.test(oe)):findKey(de,pe=>pe.test(oe));let ce;ce=X.valueCallback?X.valueCallback(ue):ue,ce=J.valueCallback?J.valueCallback(ce):ce;const he=W.slice(oe.length);return{value:ce,rest:he}}}function findKey(X,W){for(const J in X)if(Object.prototype.hasOwnProperty.call(X,J)&&W(X[J]))return J}function findIndex(X,W){for(let J=0;J<X.length;J++)if(W(X[J]))return J}function buildMatchPatternFn(X){return(W,J={})=>{const te=W.match(X.matchPattern);if(!te)return null;const re=te[0],ne=W.match(X.parsePattern);if(!ne)return null;let oe=X.valueCallback?X.valueCallback(ne[0]):ne[0];oe=J.valueCallback?J.valueCallback(oe):oe;const de=W.slice(re.length);return{value:oe,rest:de}}}const matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:X=>parseInt(X,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:X=>X+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},enUS={code:"en-US",formatDistance,formatLong,formatRelative,localize,match,options:{weekStartsOn:0,firstWeekContainsDate:1}};function getDayOfYear(X){const W=toDate(X);return differenceInCalendarDays(W,startOfYear(W))+1}function getISOWeek(X){const W=toDate(X),J=+startOfISOWeek(W)-+startOfISOWeekYear(W);return Math.round(J/millisecondsInWeek)+1}function getWeekYear(X,W){var he,pe,fe,ge;const J=toDate(X),te=J.getFullYear(),re=getDefaultOptions$1(),ne=(W==null?void 0:W.firstWeekContainsDate)??((pe=(he=W==null?void 0:W.locale)==null?void 0:he.options)==null?void 0:pe.firstWeekContainsDate)??re.firstWeekContainsDate??((ge=(fe=re.locale)==null?void 0:fe.options)==null?void 0:ge.firstWeekContainsDate)??1,oe=constructFrom(X,0);oe.setFullYear(te+1,0,ne),oe.setHours(0,0,0,0);const de=startOfWeek(oe,W),ue=constructFrom(X,0);ue.setFullYear(te,0,ne),ue.setHours(0,0,0,0);const ce=startOfWeek(ue,W);return J.getTime()>=de.getTime()?te+1:J.getTime()>=ce.getTime()?te:te-1}function startOfWeekYear(X,W){var de,ue,ce,he;const J=getDefaultOptions$1(),te=(W==null?void 0:W.firstWeekContainsDate)??((ue=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:ue.firstWeekContainsDate)??J.firstWeekContainsDate??((he=(ce=J.locale)==null?void 0:ce.options)==null?void 0:he.firstWeekContainsDate)??1,re=getWeekYear(X,W),ne=constructFrom(X,0);return ne.setFullYear(re,0,te),ne.setHours(0,0,0,0),startOfWeek(ne,W)}function getWeek(X,W){const J=toDate(X),te=+startOfWeek(J,W)-+startOfWeekYear(J,W);return Math.round(te/millisecondsInWeek)+1}function addLeadingZeros(X,W){const J=X<0?"-":"",te=Math.abs(X).toString().padStart(W,"0");return J+te}const lightFormatters={y(X,W){const J=X.getFullYear(),te=J>0?J:1-J;return addLeadingZeros(W==="yy"?te%100:te,W.length)},M(X,W){const J=X.getMonth();return W==="M"?String(J+1):addLeadingZeros(J+1,2)},d(X,W){return addLeadingZeros(X.getDate(),W.length)},a(X,W){const J=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.toUpperCase();case"aaa":return J;case"aaaaa":return J[0];case"aaaa":default:return J==="am"?"a.m.":"p.m."}},h(X,W){return addLeadingZeros(X.getHours()%12||12,W.length)},H(X,W){return addLeadingZeros(X.getHours(),W.length)},m(X,W){return addLeadingZeros(X.getMinutes(),W.length)},s(X,W){return addLeadingZeros(X.getSeconds(),W.length)},S(X,W){const J=W.length,te=X.getMilliseconds(),re=Math.trunc(te*Math.pow(10,J-3));return addLeadingZeros(re,W.length)}},dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(X,W,J){const te=X.getFullYear()>0?1:0;switch(W){case"G":case"GG":case"GGG":return J.era(te,{width:"abbreviated"});case"GGGGG":return J.era(te,{width:"narrow"});case"GGGG":default:return J.era(te,{width:"wide"})}},y:function(X,W,J){if(W==="yo"){const te=X.getFullYear(),re=te>0?te:1-te;return J.ordinalNumber(re,{unit:"year"})}return lightFormatters.y(X,W)},Y:function(X,W,J,te){const re=getWeekYear(X,te),ne=re>0?re:1-re;if(W==="YY"){const oe=ne%100;return addLeadingZeros(oe,2)}return W==="Yo"?J.ordinalNumber(ne,{unit:"year"}):addLeadingZeros(ne,W.length)},R:function(X,W){const J=getISOWeekYear(X);return addLeadingZeros(J,W.length)},u:function(X,W){const J=X.getFullYear();return addLeadingZeros(J,W.length)},Q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"Q":return String(te);case"QQ":return addLeadingZeros(te,2);case"Qo":return J.ordinalNumber(te,{unit:"quarter"});case"QQQ":return J.quarter(te,{width:"abbreviated",context:"formatting"});case"QQQQQ":return J.quarter(te,{width:"narrow",context:"formatting"});case"QQQQ":default:return J.quarter(te,{width:"wide",context:"formatting"})}},q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"q":return String(te);case"qq":return addLeadingZeros(te,2);case"qo":return J.ordinalNumber(te,{unit:"quarter"});case"qqq":return J.quarter(te,{width:"abbreviated",context:"standalone"});case"qqqqq":return J.quarter(te,{width:"narrow",context:"standalone"});case"qqqq":default:return J.quarter(te,{width:"wide",context:"standalone"})}},M:function(X,W,J){const te=X.getMonth();switch(W){case"M":case"MM":return lightFormatters.M(X,W);case"Mo":return J.ordinalNumber(te+1,{unit:"month"});case"MMM":return J.month(te,{width:"abbreviated",context:"formatting"});case"MMMMM":return J.month(te,{width:"narrow",context:"formatting"});case"MMMM":default:return J.month(te,{width:"wide",context:"formatting"})}},L:function(X,W,J){const te=X.getMonth();switch(W){case"L":return String(te+1);case"LL":return addLeadingZeros(te+1,2);case"Lo":return J.ordinalNumber(te+1,{unit:"month"});case"LLL":return J.month(te,{width:"abbreviated",context:"standalone"});case"LLLLL":return J.month(te,{width:"narrow",context:"standalone"});case"LLLL":default:return J.month(te,{width:"wide",context:"standalone"})}},w:function(X,W,J,te){const re=getWeek(X,te);return W==="wo"?J.ordinalNumber(re,{unit:"week"}):addLeadingZeros(re,W.length)},I:function(X,W,J){const te=getISOWeek(X);return W==="Io"?J.ordinalNumber(te,{unit:"week"}):addLeadingZeros(te,W.length)},d:function(X,W,J){return W==="do"?J.ordinalNumber(X.getDate(),{unit:"date"}):lightFormatters.d(X,W)},D:function(X,W,J){const te=getDayOfYear(X);return W==="Do"?J.ordinalNumber(te,{unit:"dayOfYear"}):addLeadingZeros(te,W.length)},E:function(X,W,J){const te=X.getDay();switch(W){case"E":case"EE":case"EEE":return J.day(te,{width:"abbreviated",context:"formatting"});case"EEEEE":return J.day(te,{width:"narrow",context:"formatting"});case"EEEEEE":return J.day(te,{width:"short",context:"formatting"});case"EEEE":default:return J.day(te,{width:"wide",context:"formatting"})}},e:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"e":return String(ne);case"ee":return addLeadingZeros(ne,2);case"eo":return J.ordinalNumber(ne,{unit:"day"});case"eee":return J.day(re,{width:"abbreviated",context:"formatting"});case"eeeee":return J.day(re,{width:"narrow",context:"formatting"});case"eeeeee":return J.day(re,{width:"short",context:"formatting"});case"eeee":default:return J.day(re,{width:"wide",context:"formatting"})}},c:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"c":return String(ne);case"cc":return addLeadingZeros(ne,W.length);case"co":return J.ordinalNumber(ne,{unit:"day"});case"ccc":return J.day(re,{width:"abbreviated",context:"standalone"});case"ccccc":return J.day(re,{width:"narrow",context:"standalone"});case"cccccc":return J.day(re,{width:"short",context:"standalone"});case"cccc":default:return J.day(re,{width:"wide",context:"standalone"})}},i:function(X,W,J){const te=X.getDay(),re=te===0?7:te;switch(W){case"i":return String(re);case"ii":return addLeadingZeros(re,W.length);case"io":return J.ordinalNumber(re,{unit:"day"});case"iii":return J.day(te,{width:"abbreviated",context:"formatting"});case"iiiii":return J.day(te,{width:"narrow",context:"formatting"});case"iiiiii":return J.day(te,{width:"short",context:"formatting"});case"iiii":default:return J.day(te,{width:"wide",context:"formatting"})}},a:function(X,W,J){const re=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"aaa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"aaaa":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},b:function(X,W,J){const te=X.getHours();let re;switch(te===12?re=dayPeriodEnum.noon:te===0?re=dayPeriodEnum.midnight:re=te/12>=1?"pm":"am",W){case"b":case"bb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"bbb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"bbbb":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},B:function(X,W,J){const te=X.getHours();let re;switch(te>=17?re=dayPeriodEnum.evening:te>=12?re=dayPeriodEnum.afternoon:te>=4?re=dayPeriodEnum.morning:re=dayPeriodEnum.night,W){case"B":case"BB":case"BBB":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"BBBBB":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"BBBB":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},h:function(X,W,J){if(W==="ho"){let te=X.getHours()%12;return te===0&&(te=12),J.ordinalNumber(te,{unit:"hour"})}return lightFormatters.h(X,W)},H:function(X,W,J){return W==="Ho"?J.ordinalNumber(X.getHours(),{unit:"hour"}):lightFormatters.H(X,W)},K:function(X,W,J){const te=X.getHours()%12;return W==="Ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},k:function(X,W,J){let te=X.getHours();return te===0&&(te=24),W==="ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},m:function(X,W,J){return W==="mo"?J.ordinalNumber(X.getMinutes(),{unit:"minute"}):lightFormatters.m(X,W)},s:function(X,W,J){return W==="so"?J.ordinalNumber(X.getSeconds(),{unit:"second"}):lightFormatters.s(X,W)},S:function(X,W){return lightFormatters.S(X,W)},X:function(X,W,J){const te=X.getTimezoneOffset();if(te===0)return"Z";switch(W){case"X":return formatTimezoneWithOptionalMinutes(te);case"XXXX":case"XX":return formatTimezone(te);case"XXXXX":case"XXX":default:return formatTimezone(te,":")}},x:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"x":return formatTimezoneWithOptionalMinutes(te);case"xxxx":case"xx":return formatTimezone(te);case"xxxxx":case"xxx":default:return formatTimezone(te,":")}},O:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(te,":");case"OOOO":default:return"GMT"+formatTimezone(te,":")}},z:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(te,":");case"zzzz":default:return"GMT"+formatTimezone(te,":")}},t:function(X,W,J){const te=Math.trunc(X.getTime()/1e3);return addLeadingZeros(te,W.length)},T:function(X,W,J){const te=X.getTime();return addLeadingZeros(te,W.length)}};function formatTimezoneShort(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=Math.trunc(te/60),ne=te%60;return ne===0?J+String(re):J+String(re)+W+addLeadingZeros(ne,2)}function formatTimezoneWithOptionalMinutes(X,W){return X%60===0?(X>0?"-":"+")+addLeadingZeros(Math.abs(X)/60,2):formatTimezone(X,W)}function formatTimezone(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=addLeadingZeros(Math.trunc(te/60),2),ne=addLeadingZeros(te%60,2);return J+re+W+ne}const dateLongFormatter=(X,W)=>{switch(X){case"P":return W.date({width:"short"});case"PP":return W.date({width:"medium"});case"PPP":return W.date({width:"long"});case"PPPP":default:return W.date({width:"full"})}},timeLongFormatter=(X,W)=>{switch(X){case"p":return W.time({width:"short"});case"pp":return W.time({width:"medium"});case"ppp":return W.time({width:"long"});case"pppp":default:return W.time({width:"full"})}},dateTimeLongFormatter=(X,W)=>{const J=X.match(/(P+)(p+)?/)||[],te=J[1],re=J[2];if(!re)return dateLongFormatter(X,W);let ne;switch(te){case"P":ne=W.dateTime({width:"short"});break;case"PP":ne=W.dateTime({width:"medium"});break;case"PPP":ne=W.dateTime({width:"long"});break;case"PPPP":default:ne=W.dateTime({width:"full"});break}return ne.replace("{{date}}",dateLongFormatter(te,W)).replace("{{time}}",timeLongFormatter(re,W))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(X){return dayOfYearTokenRE.test(X)}function isProtectedWeekYearToken(X){return weekYearTokenRE.test(X)}function warnOrThrowProtectedError(X,W,J){const te=message(X,W,J);if(console.warn(te),throwTokens.includes(X))throw new RangeError(te)}function message(X,W,J){const te=X[0]==="Y"?"years":"days of the month";return`Use \`${X.toLowerCase()}\` instead of \`${X}\` (in \`${W}\`) for formatting ${te} to the input \`${J}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(X,W,J){var he,pe,fe,ge;const te=getDefaultOptions$1(),re=te.locale??enUS,ne=te.firstWeekContainsDate??((pe=(he=te.locale)==null?void 0:he.options)==null?void 0:pe.firstWeekContainsDate)??1,oe=te.weekStartsOn??((ge=(fe=te.locale)==null?void 0:fe.options)==null?void 0:ge.weekStartsOn)??0,de=toDate(X);if(!isValid(de))throw new RangeError("Invalid time value");let ue=W.match(longFormattingTokensRegExp$1).map(be=>{const me=be[0];if(me==="p"||me==="P"){const ve=longFormatters[me];return ve(be,re.formatLong)}return be}).join("").match(formattingTokensRegExp$1).map(be=>{if(be==="''")return{isToken:!1,value:"'"};const me=be[0];if(me==="'")return{isToken:!1,value:cleanEscapedString$1(be)};if(formatters[me])return{isToken:!0,value:be};if(me.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+me+"`");return{isToken:!1,value:be}});re.localize.preprocessor&&(ue=re.localize.preprocessor(de,ue));const ce={firstWeekContainsDate:ne,weekStartsOn:oe,locale:re};return ue.map(be=>{if(!be.isToken)return be.value;const me=be.value;(isProtectedWeekYearToken(me)||isProtectedDayOfYearToken(me))&&warnOrThrowProtectedError(me,W,String(X));const ve=formatters[me[0]];return ve(de,me,re.localize,ce)}).join("")}function cleanEscapedString$1(X){const W=X.match(escapedStringRegExp$1);return W?W[1].replace(doubleQuoteRegExp$1,"'"):X}function getDay(X){return toDate(X).getDay()}function getDefaultOptions(){return Object.assign({},getDefaultOptions$1())}function getISODay(X){let J=toDate(X).getDay();return J===0&&(J=7),J}function transpose(X,W){const J=W instanceof Date?constructFrom(W,0):new W(0);return J.setFullYear(X.getFullYear(),X.getMonth(),X.getDate()),J.setHours(X.getHours(),X.getMinutes(),X.getSeconds(),X.getMilliseconds()),J}const TIMEZONE_UNIT_PRIORITY=10;class Setter{constructor(){zt(this,"subPriority",0)}validate(W,J){return!0}}class ValueSetter extends Setter{constructor(W,J,te,re,ne){super(),this.value=W,this.validateValue=J,this.setValue=te,this.priority=re,ne&&(this.subPriority=ne)}validate(W,J){return this.validateValue(W,this.value,J)}set(W,J,te){return this.setValue(W,J,this.value,te)}}class DateToSystemTimezoneSetter extends Setter{constructor(){super(...arguments);zt(this,"priority",TIMEZONE_UNIT_PRIORITY);zt(this,"subPriority",-1)}set(J,te){return te.timestampIsSet?J:constructFrom(J,transpose(J,Date))}}class Parser{run(W,J,te,re){const ne=this.parse(W,J,te,re);return ne?{setter:new ValueSetter(ne.value,this.validate,this.set,this.priority,this.subPriority),rest:ne.rest}:null}validate(W,J,te){return!0}}class EraParser extends Parser{constructor(){super(...arguments);zt(this,"priority",140);zt(this,"incompatibleTokens",["R","u","t","T"])}parse(J,te,re){switch(te){case"G":case"GG":case"GGG":return re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"});case"GGGGG":return re.era(J,{width:"narrow"});case"GGGG":default:return re.era(J,{width:"wide"})||re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"})}}set(J,te,re){return te.era=re,J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}const numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(X,W){return X&&{value:W(X.value),rest:X.rest}}function parseNumericPattern(X,W){const J=W.match(X);return J?{value:parseInt(J[0],10),rest:W.slice(J[0].length)}:null}function parseTimezonePattern(X,W){const J=W.match(X);if(!J)return null;if(J[0]==="Z")return{value:0,rest:W.slice(1)};const te=J[1]==="+"?1:-1,re=J[2]?parseInt(J[2],10):0,ne=J[3]?parseInt(J[3],10):0,oe=J[5]?parseInt(J[5],10):0;return{value:te*(re*millisecondsInHour+ne*millisecondsInMinute+oe*millisecondsInSecond),rest:W.slice(J[0].length)}}function parseAnyDigitsSigned(X){return parseNumericPattern(numericPatterns.anyDigitsSigned,X)}function parseNDigits(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigit,W);case 2:return parseNumericPattern(numericPatterns.twoDigits,W);case 3:return parseNumericPattern(numericPatterns.threeDigits,W);case 4:return parseNumericPattern(numericPatterns.fourDigits,W);default:return parseNumericPattern(new RegExp("^\\d{1,"+X+"}"),W)}}function parseNDigitsSigned(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,W);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,W);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,W);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,W);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+X+"}"),W)}}function dayPeriodEnumToHours(X){switch(X){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(X,W){const J=W>0,te=J?W:1-W;let re;if(te<=50)re=X||100;else{const ne=te+50,oe=Math.trunc(ne/100)*100,de=X>=ne%100;re=X+oe-(de?100:0)}return J?re:1-re}function isLeapYearIndex(X){return X%400===0||X%4===0&&X%100!==0}class YearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="yy"});switch(te){case"y":return mapValue(parseNDigits(4,J),ne);case"yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re){const ne=J.getFullYear();if(re.isTwoDigitYear){const de=normalizeTwoDigitYear(re.year,ne);return J.setFullYear(de,0,1),J.setHours(0,0,0,0),J}const oe=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(oe,0,1),J.setHours(0,0,0,0),J}}class LocalWeekYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="YY"});switch(te){case"Y":return mapValue(parseNDigits(4,J),ne);case"Yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re,ne){const oe=getWeekYear(J,ne);if(re.isTwoDigitYear){const ue=normalizeTwoDigitYear(re.year,oe);return J.setFullYear(ue,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}const de=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(de,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}}class ISOWeekYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="R"?4:te.length,J)}set(J,te,re){const ne=constructFrom(J,0);return ne.setFullYear(re,0,4),ne.setHours(0,0,0,0),startOfISOWeek(ne)}}class ExtendedYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",130);zt(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="u"?4:te.length,J)}set(J,te,re){return J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}class QuarterParser extends Parser{constructor(){super(...arguments);zt(this,"priority",120);zt(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"Q":case"QQ":return parseNDigits(te.length,J);case"Qo":return re.ordinalNumber(J,{unit:"quarter"});case"QQQ":return re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQQ":return re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQ":default:return re.quarter(J,{width:"wide",context:"formatting"})||re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class StandAloneQuarterParser extends Parser{constructor(){super(...arguments);zt(this,"priority",120);zt(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"q":case"qq":return parseNDigits(te.length,J);case"qo":return re.ordinalNumber(J,{unit:"quarter"});case"qqq":return re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"});case"qqqqq":return re.quarter(J,{width:"narrow",context:"standalone"});case"qqqq":default:return re.quarter(J,{width:"wide",context:"standalone"})||re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class MonthParser extends Parser{constructor(){super(...arguments);zt(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);zt(this,"priority",110)}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"M":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"MM":return mapValue(parseNDigits(2,J),ne);case"Mo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"MMM":return re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"});case"MMMMM":return re.month(J,{width:"narrow",context:"formatting"});case"MMMM":default:return re.month(J,{width:"wide",context:"formatting"})||re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}class StandAloneMonthParser extends Parser{constructor(){super(...arguments);zt(this,"priority",110);zt(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"L":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"LL":return mapValue(parseNDigits(2,J),ne);case"Lo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"LLL":return re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"});case"LLLLL":return re.month(J,{width:"narrow",context:"standalone"});case"LLLL":default:return re.month(J,{width:"wide",context:"standalone"})||re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}function setWeek(X,W,J){const te=toDate(X),re=getWeek(te,J)-W;return te.setDate(te.getDate()-re*7),te}class LocalWeekParser extends Parser{constructor(){super(...arguments);zt(this,"priority",100);zt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(J,te,re){switch(te){case"w":return parseNumericPattern(numericPatterns.week,J);case"wo":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re,ne){return startOfWeek(setWeek(J,re,ne),ne)}}function setISOWeek(X,W){const J=toDate(X),te=getISOWeek(J)-W;return J.setDate(J.getDate()-te*7),J}class ISOWeekParser extends Parser{constructor(){super(...arguments);zt(this,"priority",100);zt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(J,te,re){switch(te){case"I":return parseNumericPattern(numericPatterns.week,J);case"Io":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re){return startOfISOWeek(setISOWeek(J,re))}}const DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31];class DateParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"subPriority",1);zt(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"d":return parseNumericPattern(numericPatterns.date,J);case"do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear(),ne=isLeapYearIndex(re),oe=J.getMonth();return ne?te>=1&&te<=DAYS_IN_MONTH_LEAP_YEAR[oe]:te>=1&&te<=DAYS_IN_MONTH[oe]}set(J,te,re){return J.setDate(re),J.setHours(0,0,0,0),J}}class DayOfYearParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"subpriority",1);zt(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(J,te,re){switch(te){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,J);case"Do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear();return isLeapYearIndex(re)?te>=1&&te<=366:te>=1&&te<=365}set(J,te,re){return J.setMonth(0,re),J.setHours(0,0,0,0),J}}function setDay(X,W,J){var pe,fe,ge,be;const te=getDefaultOptions$1(),re=(J==null?void 0:J.weekStartsOn)??((fe=(pe=J==null?void 0:J.locale)==null?void 0:pe.options)==null?void 0:fe.weekStartsOn)??te.weekStartsOn??((be=(ge=te.locale)==null?void 0:ge.options)==null?void 0:be.weekStartsOn)??0,ne=toDate(X),oe=ne.getDay(),ue=(W%7+7)%7,ce=7-re,he=W<0||W>6?W-(oe+ce)%7:(ue+ce)%7-(oe+ce)%7;return addDays(ne,he)}class DayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"E":case"EE":case"EEE":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEEE":return re.day(J,{width:"narrow",context:"formatting"});case"EEEEEE":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEE":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class LocalDayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(J,te,re,ne){const oe=de=>{const ue=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+ue};switch(te){case"e":case"ee":return mapValue(parseNDigits(te.length,J),oe);case"eo":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"eee":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeeee":return re.day(J,{width:"narrow",context:"formatting"});case"eeeeee":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeee":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class StandAloneLocalDayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(J,te,re,ne){const oe=de=>{const ue=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+ue};switch(te){case"c":case"cc":return mapValue(parseNDigits(te.length,J),oe);case"co":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"ccc":return re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"ccccc":return re.day(J,{width:"narrow",context:"standalone"});case"cccccc":return re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"cccc":default:return re.day(J,{width:"wide",context:"standalone"})||re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}function setISODay(X,W){const J=toDate(X),te=getISODay(J),re=W-te;return addDays(J,re)}class ISODayParser extends Parser{constructor(){super(...arguments);zt(this,"priority",90);zt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe===0?7:oe;switch(te){case"i":case"ii":return parseNDigits(te.length,J);case"io":return re.ordinalNumber(J,{unit:"day"});case"iii":return mapValue(re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiii":return mapValue(re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiiii":return mapValue(re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiii":default:return mapValue(re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne)}}validate(J,te){return te>=1&&te<=7}set(J,te,re){return J=setISODay(J,re),J.setHours(0,0,0,0),J}}class AMPMParser extends Parser{constructor(){super(...arguments);zt(this,"priority",80);zt(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(J,te,re){switch(te){case"a":case"aa":case"aaa":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaaa":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaa":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class AMPMMidnightParser extends Parser{constructor(){super(...arguments);zt(this,"priority",80);zt(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(J,te,re){switch(te){case"b":case"bb":case"bbb":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbbb":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbb":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class DayPeriodParser extends Parser{constructor(){super(...arguments);zt(this,"priority",80);zt(this,"incompatibleTokens",["a","b","t","T"])}parse(J,te,re){switch(te){case"B":case"BB":case"BBB":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBBB":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBB":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class Hour1to12Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["H","K","k","t","T"])}parse(J,te,re){switch(te){case"h":return parseNumericPattern(numericPatterns.hour12h,J);case"ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=12}set(J,te,re){const ne=J.getHours()>=12;return ne&&re<12?J.setHours(re+12,0,0,0):!ne&&re===12?J.setHours(0,0,0,0):J.setHours(re,0,0,0),J}}class Hour0to23Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(J,te,re){switch(te){case"H":return parseNumericPattern(numericPatterns.hour23h,J);case"Ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=23}set(J,te,re){return J.setHours(re,0,0,0),J}}class Hour0To11Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["h","H","k","t","T"])}parse(J,te,re){switch(te){case"K":return parseNumericPattern(numericPatterns.hour11h,J);case"Ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.getHours()>=12&&re<12?J.setHours(re+12,0,0,0):J.setHours(re,0,0,0),J}}class Hour1To24Parser extends Parser{constructor(){super(...arguments);zt(this,"priority",70);zt(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(J,te,re){switch(te){case"k":return parseNumericPattern(numericPatterns.hour24h,J);case"ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=24}set(J,te,re){const ne=re<=24?re%24:re;return J.setHours(ne,0,0,0),J}}class MinuteParser extends Parser{constructor(){super(...arguments);zt(this,"priority",60);zt(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"m":return parseNumericPattern(numericPatterns.minute,J);case"mo":return re.ordinalNumber(J,{unit:"minute"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setMinutes(re,0,0),J}}class SecondParser extends Parser{constructor(){super(...arguments);zt(this,"priority",50);zt(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"s":return parseNumericPattern(numericPatterns.second,J);case"so":return re.ordinalNumber(J,{unit:"second"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setSeconds(re,0),J}}class FractionOfSecondParser extends Parser{constructor(){super(...arguments);zt(this,"priority",30);zt(this,"incompatibleTokens",["t","T"])}parse(J,te){const re=ne=>Math.trunc(ne*Math.pow(10,-te.length+3));return mapValue(parseNDigits(te.length,J),re)}set(J,te,re){return J.setMilliseconds(re),J}}class ISOTimezoneWithZParser extends Parser{constructor(){super(...arguments);zt(this,"priority",10);zt(this,"incompatibleTokens",["t","T","x"])}parse(J,te){switch(te){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"XX":return parseTimezonePattern(timezonePatterns.basic,J);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class ISOTimezoneParser extends Parser{constructor(){super(...arguments);zt(this,"priority",10);zt(this,"incompatibleTokens",["t","T","X"])}parse(J,te){switch(te){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"xx":return parseTimezonePattern(timezonePatterns.basic,J);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class TimestampSecondsParser extends Parser{constructor(){super(...arguments);zt(this,"priority",40);zt(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re*1e3),{timestampIsSet:!0}]}}class TimestampMillisecondsParser extends Parser{constructor(){super(...arguments);zt(this,"priority",20);zt(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re),{timestampIsSet:!0}]}}const parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser},formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse(X,W,J,te){var me,ve,ye,we;const re=getDefaultOptions(),ne=re.locale??enUS,oe=re.firstWeekContainsDate??((ve=(me=re.locale)==null?void 0:me.options)==null?void 0:ve.firstWeekContainsDate)??1,de=re.weekStartsOn??((we=(ye=re.locale)==null?void 0:ye.options)==null?void 0:we.weekStartsOn)??0,ue={firstWeekContainsDate:oe,weekStartsOn:de,locale:ne},ce=[new DateToSystemTimezoneSetter],he=W.match(longFormattingTokensRegExp).map(Se=>{const _e=Se[0];if(_e in longFormatters){const Ce=longFormatters[_e];return Ce(Se,ne.formatLong)}return Se}).join("").match(formattingTokensRegExp),pe=[];for(let Se of he){isProtectedWeekYearToken(Se)&&warnOrThrowProtectedError(Se,W,X),isProtectedDayOfYearToken(Se)&&warnOrThrowProtectedError(Se,W,X);const _e=Se[0],Ce=parsers[_e];if(Ce){const{incompatibleTokens:Le}=Ce;if(Array.isArray(Le)){const Ie=pe.find(Ne=>Le.includes(Ne.token)||Ne.token===_e);if(Ie)throw new RangeError(`The format string mustn't contain \`${Ie.fullToken}\` and \`${Se}\` at the same time`)}else if(Ce.incompatibleTokens==="*"&&pe.length>0)throw new RangeError(`The format string mustn't contain \`${Se}\` and any other token at the same time`);pe.push({token:_e,fullToken:Se});const Pe=Ce.run(X,Se,ne.match,ue);if(!Pe)return constructFrom(J,NaN);ce.push(Pe.setter),X=Pe.rest}else{if(_e.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_e+"`");if(Se==="''"?Se="'":_e==="'"&&(Se=cleanEscapedString(Se)),X.indexOf(Se)===0)X=X.slice(Se.length);else return constructFrom(J,NaN)}}if(X.length>0&¬WhitespaceRegExp.test(X))return constructFrom(J,NaN);const fe=ce.map(Se=>Se.priority).sort((Se,_e)=>_e-Se).filter((Se,_e,Ce)=>Ce.indexOf(Se)===_e).map(Se=>ce.filter(_e=>_e.priority===Se).sort((_e,Ce)=>Ce.subPriority-_e.subPriority)).map(Se=>Se[0]);let ge=toDate(J);if(isNaN(ge.getTime()))return constructFrom(J,NaN);const be={};for(const Se of fe){if(!Se.validate(ge,ue))return constructFrom(J,NaN);const _e=Se.set(ge,be,ue);Array.isArray(_e)?(ge=_e[0],Object.assign(be,_e[1])):ge=_e}return constructFrom(J,ge)}function cleanEscapedString(X){return X.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}const notFound="data:image/svg+xml,%3csvg%20width='215'%20height='150'%20viewBox='0%200%20215%20150'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.9'%20d='M135.132%2057.43C96.9221%2047.658%2083.3815%20-29.7048%2026.9734%2012.5083C-13.0511%2042.4595%2011.4691%20115.499%2061.6878%20107.019C92.0822%20101.867%2087.3917%20101.341%20113.129%20115.244C139.231%20129.308%20167.972%20136.397%20195.855%20111.436C210.28%2098.5179%20215.939%2067.0352%20201.939%2050.7417C184.388%2030.3592%20158.485%2063.4098%20135.132%2057.43Z'%20fill='%23EFF7FF'/%3e%3cellipse%20cx='120.5'%20cy='143.5'%20rx='52.5'%20ry='3.5'%20fill='%23F5F5F5'/%3e%3cpath%20d='M121.387%2080.2184C121.995%2079.5948%20122.563%2078.953%20123.09%2078.2959L134.396%2089.3383C135.09%2090.0177%20134.851%2091.389%20133.861%2092.4024C132.872%2093.4159%20131.505%2093.6888%20130.811%2093.0094L119.505%2081.967C120.148%2081.424%20120.777%2080.8407%20121.385%2080.2171L121.387%2080.2184Z'%20fill='%231D1D1D'/%3e%3cpath%20opacity='0.6'%20d='M121.127%2079.9896C132.157%2068.6986%20131.888%2050.5485%20120.527%2039.4502C109.166%2028.3519%2091.0149%2028.5081%2079.9849%2039.799C68.955%2051.09%2069.2233%2069.2401%2080.5843%2080.3385C91.9453%2091.4368%20110.097%2091.2806%20121.127%2079.9896Z'%20fill='%238FC2F5'/%3e%3cpath%20d='M78.0382%2083.0622C90.8729%2095.6382%20111.378%2095.4578%20123.835%2082.6609C136.293%2069.8625%20135.986%2049.2932%20123.15%2036.7173C110.316%2024.1413%2089.8107%2024.3217%2077.3538%2037.1186C64.8956%2049.9169%2065.2022%2070.4862%2078.0382%2083.0622ZM80.642%2080.387C69.289%2069.264%2069.0172%2051.0692%2080.037%2039.749C91.0569%2028.4288%20109.194%2028.2694%20120.547%2039.3938C131.9%2050.5182%20132.171%2068.713%20121.152%2080.0332C110.132%2091.3534%2091.9949%2091.5128%2080.642%2080.3884V80.387Z'%20fill='%237BACFC'/%3e%3cpath%20d='M169.953%20128.522L171.714%20126.696C173.474%20124.871%20173.421%20121.964%20171.595%20120.205L135.013%2084.9265C133.187%2083.1661%20130.281%2083.2205%20128.522%2085.0451L126.761%2086.8711C125.001%2088.6957%20125.055%2091.6028%20126.88%2093.3619L163.462%20128.64C165.287%20130.401%20168.194%20130.346%20169.953%20128.522Z'%20fill='%23656565'/%3e%3cpath%20opacity='0.35'%20d='M88.8399%2071.2315C96.506%2079.2245%20101.258%2078.1642%20100.757%2082.4547C100.256%2086.7452%2091.398%2085.7448%2082.7698%2076.0396C74.1415%2066.3344%2075.0893%2054.9166%2079.8491%2055.2485C84.6089%2055.5803%2080.129%2062.1492%2088.8399%2071.2315Z'%20fill='white'/%3e%3c/svg%3e";/**
|
|
321
321
|
* @license
|
|
322
322
|
* Copyright 2018 Google LLC
|
|
323
323
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -341,8 +341,10 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
341
341
|
* @license
|
|
342
342
|
* Copyright 2021 Google LLC
|
|
343
343
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
344
|
-
*/const defaultKeyFunction=X=>X,defaultRenderItem=(X,W)=>ke$1`${W}: ${JSON.stringify(X,null,2)}`;class VirtualizeDirective extends $t{constructor(W){if(super(W),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(J,te)=>defaultRenderItem(J,te+this._first),this._keyFunction=(J,te)=>defaultKeyFunction(J,te+this._first),this._items=[],W.type!==t$f.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(W){W&&this._setFunctions(W);const J=[];if(this._first>=0&&this._last>=this._first)for(let te=this._first;te<=this._last;te++)J.push(this._items[te]);return Qt(J,this._keyFunction,this._renderItem)}update(W,[J]){this._setFunctions(J);const te=this._items!==J.items;return this._items=J.items||[],this._virtualizer?this._updateVirtualizerConfig(W,J):this._initialize(W,J),te?R:this.render()}async _updateVirtualizerConfig(W,J){if(!await this._virtualizer.updateLayoutConfig(J.layout||{})){const re=W.parentNode;this._makeVirtualizer(re,J)}this._virtualizer.items=this._items}_setFunctions(W){const{renderItem:J,keyFunction:te}=W;J&&(this._renderItem=(re,ne)=>J(re,ne+this._first)),te&&(this._keyFunction=(re,ne)=>te(re,ne+this._first))}_makeVirtualizer(W,J){this._virtualizer&&this._virtualizer.disconnected();const{layout:te,scroller:re,items:ne}=J;this._virtualizer=new Virtualizer({hostElement:W,layout:te,scroller:re}),this._virtualizer.items=ne,this._virtualizer.connected()}_initialize(W,J){const te=W.parentNode;te&&te.nodeType===1&&(te.addEventListener("rangeChanged",re=>{this._first=re.first,this._last=re.last,this.setValue(this.render())}),this._makeVirtualizer(te,J))}disconnected(){var W;(W=this._virtualizer)==null||W.disconnected()}reconnected(){var W;(W=this._virtualizer)==null||W.connected()}}const virtualize=e$J(VirtualizeDirective);function shouldShowRole(X){return!X.professional.speciality.description}const hasItemDivider=(X,W)=>{const J=W.findIndex(te=>te.id===X.id);return J===-1?!1:J===W.length-1?!0:!X.diagnostics.length},mergeHistoryItemsAndSubgroups=X=>{const W=X.items.map(te=>({type:"item",date:new Date(te.date),item:te})),J=X.subGroups.map(te=>({type:"subGroup",date:te.items.length?new Date(te.items[0].date):new Date(0),subGroup:te}));return[...W,...J].sort((te,re)=>re.date.getTime()-te.date.getTime())},template$
|
|
344
|
+
*/const defaultKeyFunction=X=>X,defaultRenderItem=(X,W)=>ke$1`${W}: ${JSON.stringify(X,null,2)}`;class VirtualizeDirective extends $t{constructor(W){if(super(W),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(J,te)=>defaultRenderItem(J,te+this._first),this._keyFunction=(J,te)=>defaultKeyFunction(J,te+this._first),this._items=[],W.type!==t$f.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(W){W&&this._setFunctions(W);const J=[];if(this._first>=0&&this._last>=this._first)for(let te=this._first;te<=this._last;te++)J.push(this._items[te]);return Qt(J,this._keyFunction,this._renderItem)}update(W,[J]){this._setFunctions(J);const te=this._items!==J.items;return this._items=J.items||[],this._virtualizer?this._updateVirtualizerConfig(W,J):this._initialize(W,J),te?R:this.render()}async _updateVirtualizerConfig(W,J){if(!await this._virtualizer.updateLayoutConfig(J.layout||{})){const re=W.parentNode;this._makeVirtualizer(re,J)}this._virtualizer.items=this._items}_setFunctions(W){const{renderItem:J,keyFunction:te}=W;J&&(this._renderItem=(re,ne)=>J(re,ne+this._first)),te&&(this._keyFunction=(re,ne)=>te(re,ne+this._first))}_makeVirtualizer(W,J){this._virtualizer&&this._virtualizer.disconnected();const{layout:te,scroller:re,items:ne}=J;this._virtualizer=new Virtualizer({hostElement:W,layout:te,scroller:re}),this._virtualizer.items=ne,this._virtualizer.connected()}_initialize(W,J){const te=W.parentNode;te&&te.nodeType===1&&(te.addEventListener("rangeChanged",re=>{this._first=re.first,this._last=re.last,this.setValue(this.render())}),this._makeVirtualizer(te,J))}disconnected(){var W;(W=this._virtualizer)==null||W.disconnected()}reconnected(){var W;(W=this._virtualizer)==null||W.connected()}}const virtualize=e$J(VirtualizeDirective);function shouldShowRole(X){return!X.professional.speciality.description}const hasItemDivider=(X,W)=>{const J=W.findIndex(te=>te.id===X.id);return J===-1?!1:J===W.length-1?!0:!X.diagnostics.length},mergeHistoryItemsAndSubgroups=X=>{const W=X.items.map(te=>({type:"item",date:new Date(te.date),item:te})),J=X.subGroups.map(te=>({type:"subGroup",date:te.items.length?new Date(te.items[0].date):new Date(0),subGroup:te}));return[...W,...J].sort((te,re)=>re.date.getTime()-te.date.getTime())},template$h=X=>{var W;return X._hasUpdatedOnce?ke$1`
|
|
345
345
|
<div class="container">
|
|
346
|
+
<activity-history-full-data-error></activity-history-full-data-error>
|
|
347
|
+
<activity-history-partial-data-error></activity-history-partial-data-error>
|
|
346
348
|
${((W=X.historyGroups)==null?void 0:W.length)>0?ke$1`
|
|
347
349
|
<div class="virtualizer">
|
|
348
350
|
${virtualize({items:X.historyGroups,renderItem:(J,te)=>{var re,ne,oe,de;return ke$1`
|
|
@@ -390,7 +392,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
390
392
|
</div>
|
|
391
393
|
</div>
|
|
392
394
|
</div>
|
|
393
|
-
`:D$1,renderProfessionalValues=(X,W)=>{const J=shouldShowRole(W),te=[X.highlighted(W.professional.name),J?X.highlighted(W.professional.role.description):null,X.highlighted(W.up.description)
|
|
395
|
+
`:D$1,renderProfessionalValues=(X,W)=>{const J=shouldShowRole(W),te=[X.highlighted(W.professional.name),J?X.highlighted(W.professional.role.description):null,X.highlighted(W.up.description),X.highlighted(W.professional.speciality.description),X.highlighted(W.service.description)].filter(Boolean);return te.map((ne,oe)=>ke$1`${ne}${oe<te.length-1?" | ":""}`)},diagnosticHeaderTemplate=X=>X&&ke$1`
|
|
394
396
|
<div class="diagnostics__header">
|
|
395
397
|
|
|
396
398
|
${X.diagnostics.filter(W=>W.descripcio!=null&&W.descripcio.trim()!=="").map(W=>{var J;return ke$1`<dss-badge text=${(J=W.descripcio)==null?void 0:J.toUpperCase()} state="info" size="sm" outlined></dss-badge>`})}
|
|
@@ -399,26 +401,47 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
399
401
|
* @license
|
|
400
402
|
* Copyright 2017 Google LLC
|
|
401
403
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
402
|
-
*/class le extends i$y{constructor(W){if(super(W),this.it=D$1,W.type!==t$f.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(W){if(W===D$1||W==null)return this._t=void 0,this.it=W;if(W===R)return W;if(typeof W!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(W===this.it)return this._t;this.it=W;const J=[W];return J.raw=J,this._t={_$litType$:this.constructor.resultType,strings:J,values:[]}}}le.directiveName="unsafeHTML",le.resultType=1;const ae=e$J(le);var __defProp$
|
|
404
|
+
*/class le extends i$y{constructor(W){if(super(W),this.it=D$1,W.type!==t$f.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(W){if(W===D$1||W==null)return this._t=void 0,this.it=W;if(W===R)return W;if(typeof W!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(W===this.it)return this._t;this.it=W;const J=[W];return J.raw=J,this._t={_$litType$:this.constructor.resultType,strings:J,values:[]}}}le.directiveName="unsafeHTML",le.resultType=1;const ae=e$J(le),isAnyCollectionBusySelector=X=>X.activityHistoryCollections.busy.length>0,isAnyCollectionLoadingWithoutAnyLoaded=X=>{const W=Object.values(X.activityHistoryCollections.collections);return!(W!=null&&W.length)&&isAnyCollectionBusySelector(X)},isSomeCollectionLoadedAndOtherLoading=X=>Object.values(X.activityHistoryCollections.collections)&&isAnyCollectionBusySelector(X);var __defProp$o=Object.defineProperty,__getOwnPropDesc$f=Object.getOwnPropertyDescriptor,__decorateClass$o=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$f(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$o(W,J,re),re};const createZIndexStyles=X=>{let W="";for(let J=0;J<=X;J++)W+=`.zIndex${J} { z-index: ${J} !important; }
|
|
403
405
|
`;return W};let ActivityHistoryTimeline=class extends h$q{constructor(){super(...arguments),this._hasUpdatedOnce=!1}render(){var J;const X=((J=this.historyGroups)==null?void 0:J.length)??0,W=createZIndexStyles(X);return ke$1`
|
|
404
406
|
<style>
|
|
405
407
|
${r$H(W)}
|
|
406
408
|
</style>
|
|
407
|
-
${template$
|
|
409
|
+
${template$h(this)}
|
|
408
410
|
`}firstUpdated(X){super.firstUpdated(X),this._hasUpdatedOnce=!0}async updated(X){var W;X.has("historyGroups")&&((W=this.historyGroups)!=null&&W.length)&&await this.prepareComponents(this.historyGroups)}async prepareComponents(X){for(const W of X){W.items=await Promise.all(W.items.map(async J=>({...J,component:await J.componentFactory({item:J})})));for(const J of W.subGroups)J.items=await Promise.all(J.items.map(async te=>({...te,component:await te.componentFactory({item:te})})))}this.requestUpdate()}highlightMatch(X,W){if(!this.searchString||this.searchString.length<2)return X;const J=new RegExp(`(${W})`,"gi");return X.replace(J,'<span class="highlight">$1</span>')}highlighted(X){return X?ae(this.highlightMatch(X,this.searchString)):null}_scrollIntoDate(X){let W=null,J=Number.POSITIVE_INFINITY;this.shadowRoot.querySelectorAll(".visit").forEach(te=>{const re=new Date(te.dataset.date).getTime(),ne=Math.abs(re-X);ne<J&&(J=ne,W=te)}),W&&W.scrollIntoView({behavior:"smooth",block:"start"})}};ActivityHistoryTimeline.styles=i$B`
|
|
409
|
-
${r$H(styles$
|
|
410
|
-
`,__decorateClass$
|
|
411
|
+
${r$H(styles$g)}
|
|
412
|
+
`,__decorateClass$o([connectedProperty(activityHistoryGroupedItems)],ActivityHistoryTimeline.prototype,"historyGroups",2),__decorateClass$o([connectedProperty(isAnyCollectionLoadingWithoutAnyLoaded)],ActivityHistoryTimeline.prototype,"isAnyCollectionLoadingWithoutAnyLoaded",2),__decorateClass$o([connectedProperty(isSomeCollectionLoadedAndOtherLoading)],ActivityHistoryTimeline.prototype,"isSomeCollectionLoadedAndOtherLoading",2),__decorateClass$o([connectedProperty(activityHistorySearchStringSelector)],ActivityHistoryTimeline.prototype,"searchString",2),ActivityHistoryTimeline=__decorateClass$o([t$i("activity-history-timeline")],ActivityHistoryTimeline);/**
|
|
411
413
|
* @license
|
|
412
414
|
* Copyright 2021 Google LLC
|
|
413
415
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
414
|
-
*/function nn(X,W,J){return X?W(X):J==null?void 0:J(X)}const template$
|
|
416
|
+
*/function nn(X,W,J){return X?W(X):J==null?void 0:J(X)}const template$g=X=>!X.areCustomFiltersActive&&!X.areCommonFiltersActive&&!X.areDiagnosticFiltersActive&&X.searchString.length<1?D$1:ke$1`
|
|
415
417
|
<div class="active-filters-header">
|
|
416
418
|
<active-filters-badges></active-filters-badges>
|
|
417
419
|
${nn(X.searchString.length>1,()=>ke$1`<activity-history-search-results searchQuery=${X.searchString}></activity-history-search-results>`)}
|
|
418
420
|
</div>
|
|
419
|
-
`,styles$
|
|
421
|
+
`,styles$f=".active-filters-header{display:flex;flex-direction:column;border-width:0px 0px 1px 0px;border-style:solid;border-color:#d8d8d8;background-color:#fff;padding:var(--dss-spacing-sm) var(--dss-spacing-md);gap:var(--dss-spacing-xs);font-size:14px;line-height:24px}";var __defProp$n=Object.defineProperty,__getOwnPropDesc$e=Object.getOwnPropertyDescriptor,__decorateClass$n=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$e(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$n(W,J,re),re};let ActiveFiltersHeader=class extends h$q{render(){return ke$1`${template$g(this)}`}};ActiveFiltersHeader.styles=i$B`
|
|
422
|
+
${r$H(styles$f)}
|
|
423
|
+
`,__decorateClass$n([connectedProperty(activityHistorySearchStringSelector)],ActiveFiltersHeader.prototype,"searchString",2),__decorateClass$n([connectedProperty(areCustomFiltersActive)],ActiveFiltersHeader.prototype,"areCustomFiltersActive",2),__decorateClass$n([connectedProperty(areCommonFiltersActive)],ActiveFiltersHeader.prototype,"areCommonFiltersActive",2),__decorateClass$n([connectedProperty(areDiagnosticFiltersActive)],ActiveFiltersHeader.prototype,"areDiagnosticFiltersActive",2),ActiveFiltersHeader=__decorateClass$n([t$i("active-filters-header")],ActiveFiltersHeader);const styles$e=":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;height:100%;justify-content:center}",showError="data:image/svg+xml,%3csvg%20width='215'%20height='150'%20viewBox='0%200%20215%20150'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M132.567%20147.925C107.663%20137.604%2098.7018%20141.859%2073.5817%20144.094C53.0605%20145.899%2028.8192%20138.451%2013.3757%20118.871C-27.3088%2067.293%2034.5441%2014.0839%2069.5091%202.68275C94.145%20-5.32822%20109.688%205.00477%20126.605%2028.3004C133.183%2037.3621%20138.613%2048.3337%20146.353%2055.9441C154.667%2064.106%20164.606%2063.9667%20172.441%2070.7586C210.442%20103.691%20165.801%20161.689%20132.567%20147.925Z'%20fill='%23EFF7FF'/%3e%3cpath%20d='M100.714%20124.222C100.714%20124.335%20100.714%20124.448%20100.714%20124.561C100.703%20125.212%20100.443%20125.832%2099.9909%20126.288C99.5388%20126.745%2098.9306%20127%2098.297%20127L37.3382%20126.232C36.7472%20126.217%2036.1824%20125.979%2035.7523%20125.562C35.3223%20125.145%2035.0575%20124.579%2035.0089%20123.974C34.997%20123.869%2034.997%20123.763%2035.0089%20123.658C35.0218%20123.158%2035.1821%20122.675%2035.4687%20122.272C35.7552%20121.868%2036.1543%20121.564%2036.6131%20121.399C36.8615%20121.318%2037.1214%20121.28%2037.3822%20121.286L98.341%20122.032C98.7724%20122.017%2099.1984%20122.134%2099.5657%20122.367C99.9331%20122.6%20100.226%20122.939%20100.407%20123.341C100.568%20123.61%20100.673%20123.91%20100.714%20124.222Z'%20fill='%23656565'/%3e%3cpath%20opacity='0.5'%20d='M95.9608%20127L204.061%20126.226C204.373%20126.226%20204.683%20126.162%20204.972%20126.037C205.261%20125.912%20205.523%20125.728%20205.743%20125.498C205.963%20125.267%20206.137%20124.993%20206.254%20124.692C206.372%20124.391%20206.431%20124.069%20206.428%20123.744C206.417%20123.092%20206.161%20122.47%20205.715%20122.011C205.268%20121.552%20204.667%20121.291%20204.039%20121.286L95.9389%20122.06C95.3108%20122.072%2094.7119%20122.338%2094.2697%20122.801C93.8275%20123.264%2093.5769%20123.889%2093.5713%20124.541C93.5827%20125.194%2093.8388%20125.815%2094.2851%20126.275C94.7314%20126.734%2095.3326%20126.994%2095.9608%20127Z'%20fill='%2300356A'/%3e%3cpath%20d='M212.109%2054.5398L207.23%20114.387C207.064%20116.104%20206.378%20117.729%20205.262%20119.044C204.147%20120.36%20202.656%20121.303%20200.989%20121.747C200.446%20121.91%20199.885%20122.006%20199.318%20122.033H199.033L99.2345%20122.714H99.0147C98.0548%20122.719%2097.1045%20122.522%2096.2259%20122.136C95.3472%20121.749%2094.5598%20121.182%2093.915%20120.471C93.2702%20119.76%2092.7825%20118.921%2092.4835%20118.009C92.1845%20117.098%2092.0811%20116.133%2092.1798%20115.178L97.0588%2055.3307C97.2569%2053.278%2098.2004%2051.3689%2099.7108%2049.9642C101.221%2048.5595%20103.194%2047.7565%20105.256%2047.707H106.773L205.055%2047.0039C206.032%2046.9708%20207.005%2047.1471%20207.908%2047.5208C208.812%2047.8946%20209.625%2048.4572%20210.293%2049.1709C210.961%2049.8846%20211.469%2050.7329%20211.782%2051.6589C212.095%2052.5849%20212.207%2053.5672%20212.109%2054.5398Z'%20fill='%237BACFC'/%3e%3cpath%20opacity='0.2'%20d='M208.156%2047.0002L109.387%2047.6899C108.732%2047.6984%20108.081%2047.7926%20107.451%2047.97C105.803%2048.4018%20104.328%2049.3229%20103.224%2050.6096C102.12%2051.8962%20101.439%2053.4868%20101.274%2055.1677L96.4673%20113.891C96.3645%20114.839%2096.4677%20115.798%2096.7699%20116.703C97.0721%20117.609%2097.5665%20118.439%2098.2196%20119.139C98.8728%20119.84%2099.6696%20120.393%20100.557%20120.763C101.444%20121.133%20102.4%20121.31%20103.362%20121.283L200.609%20120.593H202.11C204.152%20120.549%20206.107%20119.763%20207.603%20118.385C209.099%20117.006%20210.031%20115.131%20210.223%20113.116L214.964%2054.4134C215.062%2053.4725%20214.959%2052.5216%20214.66%2051.6231C214.362%2050.7245%20213.876%2049.8983%20213.233%2049.1986C212.591%2048.499%20211.806%2047.9415%20210.932%2047.5627C210.057%2047.1839%20209.111%2046.9922%20208.156%2047.0002Z'%20fill='white'/%3e%3ccircle%20cx='33'%20cy='31'%20r='20'%20fill='%23B60000'/%3e%3cpath%20d='M41.4%2022.6133C40.88%2022.0933%2040.04%2022.0933%2039.52%2022.6133L33%2029.12L26.48%2022.6C25.96%2022.08%2025.12%2022.08%2024.6%2022.6C24.08%2023.12%2024.08%2023.96%2024.6%2024.48L31.12%2031L24.6%2037.52C24.08%2038.04%2024.08%2038.88%2024.6%2039.4C25.12%2039.92%2025.96%2039.92%2026.48%2039.4L33%2032.88L39.52%2039.4C40.04%2039.92%2040.88%2039.92%2041.4%2039.4C41.92%2038.88%2041.92%2038.04%2041.4%2037.52L34.88%2031L41.4%2024.48C41.9066%2023.9733%2041.9066%2023.12%2041.4%2022.6133Z'%20fill='white'/%3e%3c/svg%3e",template$f=X=>ke$1`
|
|
424
|
+
${X.isAllDataFailedToLoad?renderErrorFeedback(X):D$1}
|
|
425
|
+
`,renderErrorFeedback=X=>ke$1`
|
|
426
|
+
<div class="container">
|
|
427
|
+
<dss-user-feedback imagealt=${translate("error.imageAlt")} variant="default" size="lg" imagesrc=${showError} title=${translate("error.title")} description=${translate("error.general.title")} hasdetails="" detailslabel=${translate("error.viewDetails")}>
|
|
428
|
+
<div slot="details">
|
|
429
|
+
${X.errorMessages.length>0?ke$1`<div>${X.errorMessages.map(W=>ke$1`<div>${W.message}</div>`)}</div>`:translate("error.general.noInfo")}
|
|
430
|
+
</div>
|
|
431
|
+
<dss-button @onClick=${X.handleClickFeedback} label=${translate("error.general.refresh")} size="lg"></dss-button>
|
|
432
|
+
</dss-user-feedback>
|
|
433
|
+
</div>
|
|
434
|
+
`,isErrorOccurred=X=>X.activityHistoryCollections.error.length>0,areCollectionsEmpty=X=>{const W=X.activityHistoryCollections.collections;return Object.values(W).every(J=>!J.items||J.items.length===0)},isAllDataFailedToLoad=X=>!isAnyCollectionLoadingWithoutAnyLoaded(X)&&!isSomeCollectionLoadedAndOtherLoading(X)&&isErrorOccurred(X)&&areCollectionsEmpty(X),selectErrorMessages=X=>X.activityHistoryCollections.error;class HandleHistoryItemsAddError{constructor(W){this.entities=W}}var __defProp$m=Object.defineProperty,__getOwnPropDesc$d=Object.getOwnPropertyDescriptor,__decorateClass$m=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$d(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$m(W,J,re),re};let ActivityHistoryFullDataError=class extends h$q{constructor(){super(...arguments),this.errorMessages=[]}render(){return ke$1`${template$f(this)}`}handleClickFeedback(){shellApi.broker.send(new HandleHistoryItemsAddError(this.errorMessages))}};ActivityHistoryFullDataError.styles=i$B`
|
|
435
|
+
${r$H(styles$e)}
|
|
436
|
+
`,__decorateClass$m([connectedProperty(isAllDataFailedToLoad)],ActivityHistoryFullDataError.prototype,"isAllDataFailedToLoad",2),__decorateClass$m([connectedProperty(selectErrorMessages)],ActivityHistoryFullDataError.prototype,"errorMessages",2),ActivityHistoryFullDataError=__decorateClass$m([t$i("activity-history-full-data-error")],ActivityHistoryFullDataError);const styles$d=":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;padding-top:16px;padding-inline:16px}",template$e=X=>{const W=X.getCombinedMessage();return ke$1`
|
|
437
|
+
${X.isErrorOccurred?renderPartialErrorAlert(X,W):D$1}
|
|
438
|
+
`},renderPartialErrorAlert=(X,W)=>ke$1`
|
|
439
|
+
<div class="container">
|
|
440
|
+
<dss-alert @onButtonClick=${X.handleClickAlert} state="warning" size="lg" message="${W}" buttonLabel=${translate("error.partial.refresh")} hasbutton></dss-alert>
|
|
441
|
+
</div>
|
|
442
|
+
`;var __defProp$l=Object.defineProperty,__getOwnPropDesc$c=Object.getOwnPropertyDescriptor,__decorateClass$l=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$c(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$l(W,J,re),re};let ActivityHistoryPartialDataError=class extends h$q{constructor(){super(...arguments),this.errorMessages=[]}render(){return ke$1`${template$e(this)}`}handleClickAlert(){shellApi.broker.send(new HandleHistoryItemsAddError(this.errorMessages))}getCombinedMessage(){const X=translate("error.partial.title"),W=this.errorMessages.length>0?this.errorMessages.map(J=>J.entityDescription):[];return W.length>0?`${X} ${W[0]}${W.length>1?` i ${W.slice(1).join(" i ")}`:""}`:X}};ActivityHistoryPartialDataError.styles=i$B`
|
|
420
443
|
${r$H(styles$d)}
|
|
421
|
-
`,__decorateClass$l([connectedProperty(
|
|
444
|
+
`,__decorateClass$l([connectedProperty(isErrorOccurred)],ActivityHistoryPartialDataError.prototype,"isErrorOccurred",2),__decorateClass$l([connectedProperty(selectErrorMessages)],ActivityHistoryPartialDataError.prototype,"errorMessages",2),ActivityHistoryPartialDataError=__decorateClass$l([t$i("activity-history-partial-data-error")],ActivityHistoryPartialDataError);const styles$c=".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,189);width:56px;height:100%;box-sizing:border-box;display:flex;flex-direction:column}.filters-sidebar dss-icon-button{align-self:center}.filters-sidebar[expanded]{width:296px}.filters-sidebar[expanded] .filters-sidebar-opened{display:flex;align-items:center;justify-content:space-between;padding-inline:8px;color:var(--color-neutral-900);font-weight:700;font-size:16px;line-height:24px}.filter-container{display:flex;flex-direction:column;padding:16px 8px 8px;overflow:auto}.filter-container .filter{padding:8px 0;border-bottom:1px solid var(--color-neutral-200)}.filter-group{display:flex;flex-direction:column;padding-top:12px}.filter-group .custom-filter{display:flex;flex-direction:column;padding:6px 8px 6px var(--dss-spacing-xl)}.filter-group .custom-filter .custom-filter-content{display:flex;flex-direction:column}",filterTemplates={[ActivityHistoryFilterType.Switch]:(X,W,J,te,re)=>ke$1`
|
|
422
445
|
<dss-input-switch size="sm" .checked=${te} @onChangeValue=${J} >
|
|
423
446
|
<input slot="input" id="switch-${X}" aria-label=${W} type="checkbox" ?disabled=${!re}>
|
|
424
447
|
<label slot="label" for="switch-${X}">${W}</label>
|
|
@@ -426,30 +449,36 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
426
449
|
<dss-checkbox variant="default" .checked=${te} @onChange=${ne=>J(ne)}>
|
|
427
450
|
<input slot="input" id="checkboxStory-${X}" type="checkbox" ?disabled=${!re}>
|
|
428
451
|
<label slot="label" for="checkboxStory-${X}">${W}</label>
|
|
429
|
-
</dss-checkbox>`},getFilterTemplate=(X,W,J,te)=>{var he,pe;const re=!!(J!=null&&J.id)&&!!te,ne=crypto.randomUUID(),oe=re?te.title:X.title,de=fe=>{X.singleOption?W(J==null?void 0:J.id,X.id,null,fe.detail):re&&te?W(J==null?void 0:J.id,X.id,te.id,fe.detail):W(X.id,fe.detail)},ue=re&&te?(he=X.enabledValues)==null?void 0:he.includes(te.id):X.enabled,ce=re&&te||X.singleOption?J.enabled:!0;return((pe=filterTemplates[X.type])==null?void 0:pe.call(filterTemplates,ne,oe,de,ue,ce))||ke$1``},template$d=X=>ke$1`
|
|
452
|
+
</dss-checkbox>`},getFilterTemplate=(X,W,J,te)=>{var he,pe;const re=!!(J!=null&&J.id)&&!!te,ne=crypto.randomUUID(),oe=re?te.title:X.title,de=fe=>{X.singleOption?W(J==null?void 0:J.id,X.id,null,fe.detail):re&&te?W(J==null?void 0:J.id,X.id,te.id,fe.detail):W(X.id,fe.detail)},ue=re&&te?(he=X.enabledValues)==null?void 0:he.includes(te.id):X.enabled,ce=re&&te||X.singleOption?J.enabled:!0;return((pe=filterTemplates[X.type])==null?void 0:pe.call(filterTemplates,ne,oe,de,ue,ce))||ke$1``},template$d=X=>{var W;return ke$1`
|
|
430
453
|
<div class="filters-sidebar" ?expanded=${X.filtersExpanded} >
|
|
431
454
|
${X.filtersExpanded?ke$1`<div class="filters-sidebar-opened">${translate("filters.filters")}<dss-icon-button ?hidden=${X.wrapperMaximized} @click=${()=>X._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_left"></dss-icon-button></div>
|
|
432
455
|
<div class="filter-container">
|
|
433
|
-
${Qt(X.commonFilters,
|
|
434
|
-
${
|
|
456
|
+
${Qt(X.commonFilters,J=>ke$1`<div class="filter">${getFilterTemplate(J,X._onChangeCommonFilterValue.bind(X))}</div> `)}
|
|
457
|
+
${X.diagnosticFilter&&ke$1`<div class="filter">
|
|
458
|
+
<dss-input-dropdown icon="" multiple dropdownFixed type="default" .elements=${(W=X.diagnosticFilter)==null?void 0:W.values} @onInputDropdownChange=${X._handleDiagnosticFilterChange} .selectedValue=${X.diagnosticFilterEnabledValues}>
|
|
459
|
+
<label slot="label" for="diagnostic-filter">${X.diagnosticFilter.title}</label>
|
|
460
|
+
<input id="diagnostic-filter" slot="input" type="text" class="dss-input" autocomplete="off"/>
|
|
461
|
+
</dss-input-dropdown>
|
|
462
|
+
</div>`}
|
|
463
|
+
${Qt(X.customFilterGroups,J=>ke$1`
|
|
435
464
|
<div class="filter-group">
|
|
436
|
-
<dss-input-switch size="sm" .checked=${
|
|
437
|
-
<input slot="input" id="switch-${
|
|
438
|
-
<label slot="label" for="switch-${
|
|
465
|
+
<dss-input-switch size="sm" .checked=${J.enabled} @onChangeValue=${te=>X._onChangeCustomFilterGroupValue(J.id,te.detail)}>
|
|
466
|
+
<input slot="input" id="switch-${J.id}" aria-label=${J.title} type="checkbox">
|
|
467
|
+
<label slot="label" for="switch-${J.id}">${J.title}</label>
|
|
439
468
|
</dss-input-switch>
|
|
440
|
-
${(
|
|
469
|
+
${(J==null?void 0:J.filters)&&Qt(J.filters,te=>customFilterTemplate(te,X,J))}
|
|
441
470
|
</div> `)}
|
|
442
471
|
</div> `:ke$1`<dss-icon-button @click=${()=>X._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_right"></dss-icon-button>`}
|
|
443
472
|
</div>
|
|
444
|
-
|
|
473
|
+
`},customFilterTemplate=(X,W,J)=>ke$1`
|
|
445
474
|
<div class="custom-filter">
|
|
446
475
|
${X.singleOption?getFilterTemplate(X,W._onChangeCustomFilterValue.bind(W),J):ke$1`<div class="custom-filter-title">${X.title}</div>
|
|
447
476
|
<div class="custom-filter-content">${Qt(X.options,te=>ke$1`${getFilterTemplate(X,W._onChangeCustomFilterValue.bind(W),J,te)}`)}</div>`}
|
|
448
477
|
|
|
449
478
|
</div>
|
|
450
|
-
`;class SetCustomFilterGroup{constructor(W){this.payload=W}}class SetCommonFilter{constructor(W){this.payload=W}}class SetCustomFilterValue{constructor(W){this.payload=W}}var __defProp$k=Object.defineProperty,__getOwnPropDesc$b=Object.getOwnPropertyDescriptor,__decorateClass$k=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$b(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$k(W,J,re),re};let ActivityHistoryFilters=class extends h$q{constructor(){super(...arguments),this.filtersExpanded=!1}render(){return ke$1`${template$d(this)}`}updated(X){X.has("wrapperMaximized")&&(this.filtersExpanded=this.wrapperMaximized)}_toggleFilters(){this.filtersExpanded=!this.filtersExpanded}_onChangeCommonFilterValue(X,W){this.api.broker.send(new SetCommonFilter({id:X,enabled:W}))}_onChangeCustomFilterGroupValue(X,W){this.api.broker.send(new SetCustomFilterGroup({id:X,enabled:W}))}_onChangeCustomFilterValue(X,W,J,te){this.api.broker.send(new SetCustomFilterValue({filterGroupId:X,filterId:W,optionId:J,enabled:te}))}};ActivityHistoryFilters.styles=i$B`
|
|
479
|
+
`;class SetCustomFilterGroup{constructor(W){this.payload=W}}class SetCommonFilter{constructor(W){this.payload=W}}class SetCustomFilterValue{constructor(W){this.payload=W}}class SetDiagnosticFiltersCommand{constructor(W){this.payload=W}}var __defProp$k=Object.defineProperty,__getOwnPropDesc$b=Object.getOwnPropertyDescriptor,__decorateClass$k=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$b(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$k(W,J,re),re};let ActivityHistoryFilters=class extends h$q{constructor(){super(...arguments),this.filtersExpanded=!1}render(){return ke$1`${template$d(this)}`}updated(X){X.has("wrapperMaximized")&&(this.filtersExpanded=this.wrapperMaximized)}_toggleFilters(){this.filtersExpanded=!this.filtersExpanded}_onChangeCommonFilterValue(X,W){this.api.broker.send(new SetCommonFilter({id:X,enabled:W}))}_onChangeCustomFilterGroupValue(X,W){this.api.broker.send(new SetCustomFilterGroup({id:X,enabled:W}))}_onChangeCustomFilterValue(X,W,J,te){this.api.broker.send(new SetCustomFilterValue({filterGroupId:X,filterId:W,optionId:J,enabled:te}))}_handleDiagnosticFilterChange(X){const W=X.detail.selectedValue;this.api.broker.send(new SetDiagnosticFiltersCommand(W))}};ActivityHistoryFilters.styles=i$B`
|
|
451
480
|
${r$H(styles$c)}
|
|
452
|
-
`,__decorateClass$k([connectedProperty(activityHistoryCommonFiltersSelector)],ActivityHistoryFilters.prototype,"commonFilters",2),__decorateClass$k([connectedProperty(customFilterGroupsWithOptionsSelector)],ActivityHistoryFilters.prototype,"customFilterGroups",2),__decorateClass$k([lazyInject(TYPES.primaryApi)],ActivityHistoryFilters.prototype,"api",2),__decorateClass$k([r$E()],ActivityHistoryFilters.prototype,"filtersExpanded",2),__decorateClass$k([n$w({type:Boolean})],ActivityHistoryFilters.prototype,"wrapperMaximized",2),ActivityHistoryFilters=__decorateClass$k([t$i("activity-history-filters")],ActivityHistoryFilters);const{setCommonFilterValue}=activityHistoryFiltersSlice.actions;class SetCommonFilterHandler extends StoreBaseHandler{async handle(W){try{this.store.dispatch(setCommonFilterValue(W.payload))}catch(J){console.log(J.message)}}}let request$
|
|
481
|
+
`,__decorateClass$k([connectedProperty(activityHistoryCommonFiltersSelector)],ActivityHistoryFilters.prototype,"commonFilters",2),__decorateClass$k([connectedProperty(customFilterGroupsWithOptionsSelector)],ActivityHistoryFilters.prototype,"customFilterGroups",2),__decorateClass$k([connectedProperty(diagnosticFilterSelector)],ActivityHistoryFilters.prototype,"diagnosticFilter",2),__decorateClass$k([connectedProperty(diagnosticFilterEnabledValuesSelector)],ActivityHistoryFilters.prototype,"diagnosticFilterEnabledValues",2),__decorateClass$k([lazyInject(TYPES.primaryApi)],ActivityHistoryFilters.prototype,"api",2),__decorateClass$k([r$E()],ActivityHistoryFilters.prototype,"filtersExpanded",2),__decorateClass$k([n$w({type:Boolean})],ActivityHistoryFilters.prototype,"wrapperMaximized",2),ActivityHistoryFilters=__decorateClass$k([t$i("activity-history-filters")],ActivityHistoryFilters);const{setCommonFilterValue}=activityHistoryFiltersSlice.actions;class SetCommonFilterHandler extends StoreBaseHandler{async handle(W){try{this.store.dispatch(setCommonFilterValue(W.payload))}catch(J){console.log(J.message)}}}let request$b;const bootstrapSetCommonFilter=X=>{request$b=X.registerRequest(SetCommonFilter,SetCommonFilterHandler)},teardownSetCommonFilter=()=>{request$b==null||request$b.dispose()},{addCustomFilters}=activityHistoryFiltersSlice.actions;class AddCustomFiltersHandler extends StoreBaseHandler{async handle(W){try{this.store.dispatch(addCustomFilters(W.payload))}catch(J){console.log(J.message)}}}let request$a;const bootstrapAddCustomFilter=X=>{request$a=X.registerRequest(AddCustomFiltersCommand,AddCustomFiltersHandler)},teardownAddCustomFilter=()=>{request$a==null||request$a.dispose()},{setCustomFilterGroupValue}=activityHistoryFiltersSlice.actions;class SetCustomFilterGroupHandler extends StoreBaseHandler{async handle(W){try{this.store.dispatch(setCustomFilterGroupValue(W.payload))}catch(J){console.log(J.message)}}}let request$9;const bootstrapSetCustomFilterGroup=X=>{request$9=X.registerRequest(SetCustomFilterGroup,SetCustomFilterGroupHandler)},teardownSetCustomFilterGroup=()=>{request$9==null||request$9.dispose()},{setCustomFilterValue}=activityHistoryFiltersSlice.actions;class SetCustomFilterValueHandler extends StoreBaseHandler{async handle(W){try{this.store.dispatch(setCustomFilterValue(W.payload))}catch(J){console.log(J.message)}}}let request$8;const bootstrapSetCustomFilterValue=X=>{request$8=X.registerRequest(SetCustomFilterValue,SetCustomFilterValueHandler)},teardownSetCustomFilterValue=()=>{request$8==null||request$8.dispose()};class AddDiagnosticFiltersHandler extends StoreBaseHandler{async handle(W){try{this.store.dispatch(addDiagnosticFilters(W.payload))}catch(J){console.log(J.message)}}}class AddDiagnosticFiltersCommand{constructor(W){this.payload=W}}let request$7;const bootstrapAddDiagnosticFilter=X=>{request$7=X.registerRequest(AddDiagnosticFiltersCommand,AddDiagnosticFiltersHandler)},teardownAddDiagnosticFilter=()=>{request$7==null||request$7.dispose()},{setDiagnosticFilterValues}=activityHistoryFiltersSlice.actions;class SetDiagnosticFiltersHandler extends StoreBaseHandler{async handle(W){try{this.store.dispatch(setDiagnosticFilterValues(W.payload))}catch(J){console.log(J.message)}}}let request$6;const bootstrapSetDiagnosticFilter=X=>{request$6=X.registerRequest(SetDiagnosticFiltersCommand,SetDiagnosticFiltersHandler)},teardownSetDiagnosticFilter=()=>{request$6==null||request$6.dispose()},bootstrapFilters=X=>{bootstrapSetCommonFilter(X),bootstrapAddCustomFilter(X),bootstrapSetCustomFilterGroup(X),bootstrapSetCustomFilterValue(X),bootstrapAddDiagnosticFilter(X),bootstrapSetDiagnosticFilter(X)},teardownFilters=()=>{teardownSetCommonFilter(),teardownAddCustomFilter(),teardownSetCustomFilterGroup(),teardownSetCustomFilterValue(),teardownAddDiagnosticFilter(),teardownSetDiagnosticFilter()},events={activityHistorySearched:"activity_history_searched"},{setSearchString}=activityHistoryFiltersSlice.actions;class SearchItemsHandler extends BaseHandler{async handle(W){try{this.store.dispatch(setSearchString(W.searchString)),setTimeout(()=>{this.api.broker.publish(events.activityHistorySearched,{searchQuery:W.searchString})},300)}catch(J){console.log(J.message)}}}class SearchActivityHistoryItems{constructor(W){this.searchString=W,this.searchString=W}}const styles$b=".search-header{color:var(--color-neutral-900);font-weight:600}",template$c=X=>ke$1`<div class="search-header">
|
|
453
482
|
${translate("searchBarResults")} “${X.searchQuery}”
|
|
454
483
|
</div>`;var __defProp$j=Object.defineProperty,__getOwnPropDesc$a=Object.getOwnPropertyDescriptor,__decorateClass$j=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$a(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$j(W,J,re),re};let ActivityHistorySearchResults=class extends h$q{constructor(){super(...arguments),this.searchQuery=""}render(){return ke$1`${template$c(this)}`}};ActivityHistorySearchResults.styles=i$B`
|
|
455
484
|
${r$H(styles$b)}
|
|
@@ -476,7 +505,16 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
476
505
|
@click=${()=>W._onDeleteCommonFilterValue(X.id)}
|
|
477
506
|
@onDelete=${()=>W._onDeleteCommonFilterValue(X.id)}
|
|
478
507
|
></dss-chip>
|
|
479
|
-
`,
|
|
508
|
+
`,renderDiagnosticChip=(X,W,J)=>ke$1`
|
|
509
|
+
<dss-chip
|
|
510
|
+
label=${W}
|
|
511
|
+
size="sm"
|
|
512
|
+
hasdelete
|
|
513
|
+
selected
|
|
514
|
+
@click=${()=>J._onDeleteDiagnosticFilterValue(X)}
|
|
515
|
+
@onDelete=${()=>J._onDeleteDiagnosticFilterValue(X)}
|
|
516
|
+
></dss-chip>
|
|
517
|
+
`,renderFilterTitle=X=>ke$1`<div class="filter-title">${`${X}:`}</div>`,template$a=X=>{if(X.enabledFilters.length===0&&X.enabledCommonFilters.length===0&&X.diagnosticFilterEnabled.enabledValues.length===0)return D$1;let W=0;const J=[],te=[],re=[],ne=X.diagnosticFilterEnabled;if(ne){const{title:oe,values:de,enabledValues:ue}=ne,ce=de.filter(he=>ue.includes(he.value));if(ce.length>0){let he=!1,pe=!1;for(const fe of ce){const ge=renderDiagnosticChip(fe.value,fe.label,X);W<MAX_VISIBLE_CHIPS?(he||(J.push(renderFilterTitle(oe)),he=!0),J.push(ge),W++):(pe||(te.push(renderFilterTitle(oe)),pe=!0),te.push(ge),re.push(ge))}}}for(const oe of X.enabledCommonFilters){const de=renderCommonChip(oe,X);W<MAX_VISIBLE_CHIPS?(J.push(de),W++):(te.push(de),re.push(de))}for(const{title:oe,id:de,filters:ue}of X.enabledFilters){let ce=!1,he=!1;for(const pe of ue)for(const fe of[...new Set(pe.enabledValues)]){const ge=renderChip(de,pe,normalizeDeletedFilterBooleanValue(fe),X);W<MAX_VISIBLE_CHIPS?(ce||(J.push(renderFilterTitle(oe)),ce=!0),J.push(ge),W++):(he||(te.push(renderFilterTitle(oe)),he=!0),te.push(ge),re.push(ge))}}return ke$1`
|
|
480
518
|
<div class="filters-container">
|
|
481
519
|
<div class="filters-header">${translate("chipHeader.selection")}</div>
|
|
482
520
|
<div class="filter-groups">
|
|
@@ -495,11 +533,11 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
495
533
|
`:D$1}
|
|
496
534
|
</div>
|
|
497
535
|
</div>
|
|
498
|
-
`},styles$9=".filters-container{display:flex;gap:var(--dss-spacing-md)}.filters-header{font-weight:700}.filter-groups{display:flex;gap:var(--dss-spacing-xs)}.filter-group{display:flex;gap:var(--dss-spacing-xs);color:var(--color-neutral-600);font-weight:600}.popover-content{box-sizing:border-box;display:flex;flex-wrap:wrap;gap:var(--dss-spacing-xs);padding:10px;max-width:368px;max-height:336px;overflow:auto}";var __defProp$h=Object.defineProperty,__getOwnPropDesc$8=Object.getOwnPropertyDescriptor,__decorateClass$h=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$8(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$h(W,J,re),re};let ActiveFiltersBadges=class extends h$q{render(){return ke$1`${template$a(this)}`}_onDeleteFilterValue(X,W,J,te){this.api.broker.send(new SetCustomFilterValue({filterGroupId:X,filterId:W,optionId:J,enabled:te}))}_onDeleteCommonFilterValue(X){this.api.broker.send(new SetCommonFilter({id:X,enabled:!1}))}};ActiveFiltersBadges.styles=i$B`
|
|
536
|
+
`},styles$9=".filters-container{display:flex;gap:var(--dss-spacing-md)}.filters-header{font-weight:700}.filter-groups{display:flex;gap:var(--dss-spacing-xs)}.filter-group{display:flex;gap:var(--dss-spacing-xs);color:var(--color-neutral-600);font-weight:600}.popover-content{box-sizing:border-box;display:flex;flex-wrap:wrap;gap:var(--dss-spacing-xs);padding:10px;max-width:368px;max-height:336px;overflow:auto}";var __defProp$h=Object.defineProperty,__getOwnPropDesc$8=Object.getOwnPropertyDescriptor,__decorateClass$h=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$8(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$h(W,J,re),re};let ActiveFiltersBadges=class extends h$q{render(){return ke$1`${template$a(this)}`}_onDeleteFilterValue(X,W,J,te){this.api.broker.send(new SetCustomFilterValue({filterGroupId:X,filterId:W,optionId:J,enabled:te}))}_onDeleteCommonFilterValue(X){this.api.broker.send(new SetCommonFilter({id:X,enabled:!1}))}_onDeleteDiagnosticFilterValue(X){this.api.broker.send(new SetDiagnosticFiltersCommand([...this.diagnosticFilterEnabled.enabledValues.filter(W=>W!==X)]))}};ActiveFiltersBadges.styles=i$B`
|
|
499
537
|
${r$H(styles$9)}
|
|
500
|
-
`,__decorateClass$h([lazyInject(TYPES.primaryApi)],ActiveFiltersBadges.prototype,"api",2),__decorateClass$h([connectedProperty(activityHistoryEnabledCommonFiltersSelector)],ActiveFiltersBadges.prototype,"enabledCommonFilters",2),__decorateClass$h([connectedProperty(activeGroupsWithEnabledFilters)],ActiveFiltersBadges.prototype,"enabledFilters",2),ActiveFiltersBadges=__decorateClass$h([t$i("active-filters-badges")],ActiveFiltersBadges);let request$
|
|
538
|
+
`,__decorateClass$h([lazyInject(TYPES.primaryApi)],ActiveFiltersBadges.prototype,"api",2),__decorateClass$h([connectedProperty(activityHistoryEnabledCommonFiltersSelector)],ActiveFiltersBadges.prototype,"enabledCommonFilters",2),__decorateClass$h([connectedProperty(activeGroupsWithEnabledFilters)],ActiveFiltersBadges.prototype,"enabledFilters",2),__decorateClass$h([connectedProperty(diagnosticFilterSelector)],ActiveFiltersBadges.prototype,"diagnosticFilterEnabled",2),ActiveFiltersBadges=__decorateClass$h([t$i("active-filters-badges")],ActiveFiltersBadges);let request$5;const bootstrapSearchItems=X=>{request$5=X.registerRequest(SearchActivityHistoryItems,SearchItemsHandler)},teardownSearchItems=()=>{request$5==null||request$5.dispose()};class HandleHistoryItemsAddErrorHandler extends BaseHandler{async handle(W){try{const J=W.entities.map(te=>te.entityId);await this.dispatchRemoveErrorItems(J),this.api.broker.publish(shellEvents.refresh_history_data_requested,J)}catch{this.api.notificationService.error(translate("error.errorToRefresh"))}}async dispatchRemoveErrorItems(W){for(const J of W)this.store.dispatch(removeErrorHistoryItem(J))}}let request$4;const bootstrapHandleHistoryItemsAddError=X=>{teardownHandleHistoryItemsAddError(),request$4=registerRequest(X,container)(HandleHistoryItemsAddError,HandleHistoryItemsAddErrorHandler)},teardownHandleHistoryItemsAddError=()=>{request$4==null||request$4.dispose()},styles$8=".spinner-container{display:flex;flex-direction:row;align-items:center;gap:24px;justify-content:center;padding-top:16px}.spinner-full-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}",template$9=X=>X.isAnyCollectionLoadingWithoutAnyLoaded?ke$1`<div class="spinner-full-container"><dss-spinner></dss-spinner></div>`:X.isSomeCollectionLoadedAndOtherLoading?ke$1`<div class="spinner-container"><dss-spinner size="sm"></dss-spinner><div class="busy-description">${translate("busyEntriesLoading")}</div></div>`:D$1;var __defProp$g=Object.defineProperty,__getOwnPropDesc$7=Object.getOwnPropertyDescriptor,__decorateClass$g=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$7(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$g(W,J,re),re};let ActivityHistoryBusy=class extends h$q{render(){return ke$1`${template$9(this)}`}};ActivityHistoryBusy.styles=i$B`
|
|
501
539
|
${r$H(styles$8)}
|
|
502
|
-
`,__decorateClass$g([connectedProperty(isAnyCollectionLoadingWithoutAnyLoaded)],ActivityHistoryBusy.prototype,"isAnyCollectionLoadingWithoutAnyLoaded",2),__decorateClass$g([connectedProperty(isSomeCollectionLoadedAndOtherLoading)],ActivityHistoryBusy.prototype,"isSomeCollectionLoadedAndOtherLoading",2),ActivityHistoryBusy=__decorateClass$g([t$i("activity-history-busy")],ActivityHistoryBusy);let broker;const bootstrapActivityHistoryItem=X=>{broker=brokerExtensions(X,container),bootstrapInjectAsyncHistoryItems(broker),bootstrapAddHistoryItem(broker),bootstrapAddHistoryItems(broker),bootstrapUpdateHistoryItem(broker),bootstrapExportPdf(broker),bootstrapFilters(broker),bootstrapSearchItems(broker)},teardownActivityHistoryItem=()=>{teardownInjectAsyncHistoryItems(),teardownAddHistoryItem(),teardownAddHistoryItems(),teardownUpdateHistoryItem(),teardownExportPdf(),teardownFilters(),teardownSearchItems()},styles$7=":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:24px;padding-bottom:24px;padding-inline:40px}.container[maximized] .header-maximized-container .header__maximized .header__maximized__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container[maximized] .header-maximized-container .header__maximized .title{color:var(--color-neutral-900);font-weight:700;font-size:20px;line-height:30px;white-space:nowrap}.container[maximized] .header-maximized-container .header__maximized .options{display:flex;align-items:center;color:var(--color-primary-400);font-weight:600;font-size:14px;line-height:24px;cursor:pointer}.container[maximized] .header-maximized-container .header__maximized .header__maximized__left{display:flex;flex-direction:row;gap:24px;align-items:center;width:100%}.container[maximized] .header-maximized-container .header__maximized .header__maximized__right{display:flex;flex-direction:row;gap:16px;align-items:center}.container[maximized] .wrapper{height:calc(100vh - 175px);border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm);margin-bottom:24px;margin-inline:40px;width:calc(100% - 80px)}.container .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgb(189,189,189);gap:16px}.container .header .header__left{display:flex;flex-direction:row;align-items:center;flex:1;gap:16px}.container .header .header__left .title{color:var(--color-neutral-800);font-weight:700;font-size:16px;line-height:24px;white-space:nowrap}.container .header .header__right{display:flex;flex-direction:row;align-items:center;gap:8px}.container .header .header__right .action-icons{display:flex;align-items:center}.container .wrapper{display:flex;flex-direction:row;min-height:1px;width:100%;height:100%}.container .wrapper[maximized] .content{width:100%;background:var(--color-neutral-50);border-top-right-radius:var(--dss-radius-sm)}.container .wrapper .content{width:100%;background:var(--color-neutral-50);border-bottom-right-radius:var(--dss-radius-sm);overflow:hidden}",template$8=X=>ke$1`<div class="container" ?maximized=${X.maximized}>
|
|
540
|
+
`,__decorateClass$g([connectedProperty(isAnyCollectionLoadingWithoutAnyLoaded)],ActivityHistoryBusy.prototype,"isAnyCollectionLoadingWithoutAnyLoaded",2),__decorateClass$g([connectedProperty(isSomeCollectionLoadedAndOtherLoading)],ActivityHistoryBusy.prototype,"isSomeCollectionLoadedAndOtherLoading",2),ActivityHistoryBusy=__decorateClass$g([t$i("activity-history-busy")],ActivityHistoryBusy);let broker;const bootstrapActivityHistoryItem=X=>{broker=brokerExtensions(X,container),bootstrapInjectAsyncHistoryItems(broker),bootstrapAddHistoryItem(broker),bootstrapAddHistoryItems(broker),bootstrapHandleHistoryItemsAddError(X),bootstrapUpdateHistoryItem(broker),bootstrapExportPdf(broker),bootstrapFilters(broker),bootstrapSearchItems(broker)},teardownActivityHistoryItem=()=>{teardownInjectAsyncHistoryItems(),teardownAddHistoryItem(),teardownAddHistoryItems(),teardownHandleHistoryItemsAddError(),teardownUpdateHistoryItem(),teardownExportPdf(),teardownFilters(),teardownSearchItems()},styles$7=":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:24px;padding-bottom:24px;padding-inline:40px}.container[maximized] .header-maximized-container .header__maximized .header__maximized__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container[maximized] .header-maximized-container .header__maximized .title{color:var(--color-neutral-900);font-weight:700;font-size:20px;line-height:30px;white-space:nowrap}.container[maximized] .header-maximized-container .header__maximized .options{display:flex;align-items:center;color:var(--color-primary-400);font-weight:600;font-size:14px;line-height:24px;cursor:pointer}.container[maximized] .header-maximized-container .header__maximized .header__maximized__left{display:flex;flex-direction:row;gap:24px;align-items:center;width:100%}.container[maximized] .header-maximized-container .header__maximized .header__maximized__right{display:flex;flex-direction:row;gap:16px;align-items:center}.container[maximized] .wrapper{height:calc(100vh - 175px);border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm);margin-bottom:24px;margin-inline:40px;width:calc(100% - 80px)}.container .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgb(189,189,189);gap:16px}.container .header .header__left{display:flex;flex-direction:row;align-items:center;flex:1;gap:16px}.container .header .header__left .title{color:var(--color-neutral-800);font-weight:700;font-size:16px;line-height:24px;white-space:nowrap}.container .header .header__right{display:flex;flex-direction:row;align-items:center;gap:8px}.container .header .header__right .action-icons{display:flex;align-items:center}.container .wrapper{display:flex;flex-direction:row;min-height:1px;width:100%;height:100%}.container .wrapper[maximized] .content{width:100%;background:var(--color-neutral-50);border-top-right-radius:var(--dss-radius-sm)}.container .wrapper .content{width:100%;background:var(--color-neutral-50);border-bottom-right-radius:var(--dss-radius-sm);overflow:hidden}",template$8=X=>ke$1`<div class="container" ?maximized=${X.maximized}>
|
|
503
541
|
${X.maximized?ke$1`${headerMaximizedTemplate(X)}`:ke$1`<div class="header">
|
|
504
542
|
<div class="header__left">
|
|
505
543
|
<div class="title">${translate("activityHistory")}</div>
|
|
@@ -556,11 +594,11 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
556
594
|
${r$H(styles$7)}
|
|
557
595
|
`,__decorateClass$f([n$w({type:Boolean,reflect:!0})],ActivityHistoryMain.prototype,"maximized",2),__decorateClass$f([lazyInject(TYPES.primaryApi)],ActivityHistoryMain.prototype,"api",2),__decorateClass$f([connectedProperty(activityHistoryCollectionsSelector)],ActivityHistoryMain.prototype,"historyItems",2),__decorateClass$f([n$w()],ActivityHistoryMain.prototype,"searchQuery",2),ActivityHistoryMain=__decorateClass$f([t$i("activity-history-main")],ActivityHistoryMain);const registerViews=X=>{X.regionManager.registerView(clinicalMonitoringRegions.content,{id:X.pluginInfo.pluginId,factory:()=>Promise.resolve(new ActivityHistoryMain)})},unregisterViews=()=>{const X=container.get(TYPES.primaryApi);X.regionManager.removeView(clinicalMonitoringRegions.content,X.pluginInfo.pluginId)},bootstrapFeatures=X=>{bootstrapActivityHistoryItem(X)},teardownFeatures=()=>{teardownActivityHistoryItem()},initialize=async X=>(registerViews(X),await initializeLocalization(X),bindDeps(X),bootstrapFeatures(X),Promise.resolve()),dispose=()=>(teardownFeatures(),unregisterViews(),unbindDeps(),Promise.resolve());let bootstrappedPlugins=[];const internalPlugins=[{pluginId:"activity-history",importer:()=>Promise.resolve({initialize,dispose})}],bootstrapPlugins=async X=>{const W=internalPlugins.concat(X||[]);bootstrappedPlugins=await v$e(W,primariaApiFactory)},disposePlugins=async()=>Promise.all(bootstrappedPlugins.map(X=>X==null?void 0:X.dispose()));var __defProp$e=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor,__decorateClass$e=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$5(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$e(W,J,re),re},__decorateParam$4=(X,W)=>(J,te)=>W(J,te,X);let ExitShellHandler=class{constructor(X){this.api=X}async handle({ecapEvent:X}){try{const W=this.api.pluginBusyManager.getBusyPluginTasks();if(W.length>0){const{confirmed:J}=await this.askForClose(W);if(!J)return}await Promise.race([disposePlugins(),this.timeout(5e3)]),disposeShell(),this.emitClose(X)}catch(W){this.api.notificationService.error(W.message),this.emitClose(X)}}askForClose(X){return this.api.interactionService.confirm({busyTasks:X},PluginBusyList,{title:translate$1("actions.askExit"),state:"error",confirmButtonText:"Sí",cancelButtonText:"No"})}timeout(X){return new Promise(W=>setTimeout(W,X))}emitClose(X){X?raiseCustomCloseEvent(X):raiseCloseEvent()}};ExitShellHandler=__decorateClass$e([__decorateParam$4(0,inject(TYPES$1.primaryApi))],ExitShellHandler);class ExitShell{constructor(W){this.ecapEvent=W}}let request$3;const useExitShell=X=>{disposeExitShell(),request$3=registerRequest(X,container$1)(ExitShell,ExitShellHandler)},disposeExitShell=()=>{request$3==null||request$3.dispose()};var __defProp$d=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor,__decorateClass$d=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$4(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$d(W,J,re),re},__decorateParam$3=(X,W)=>(J,te)=>W(J,te,X);let GetUserInfoBackendAdapter=class{constructor(X){this.api=X}getUserInfo(){var J;const X=jwtDecode(this.api.tokenManager.getToken()),W={userId:this.getUserId(X.access_info),firstName:X.access_info.trace_user_given_name,familyName:X.access_info.trace_user_family_name,lastName:X.access_info.trace_user_last_name,registrationNumber:(J=X.access_info.identifier.find(te=>te.type==="NUMCOL"))==null?void 0:J.value,workCenter:X.access_info.center_code,role:X.access_info.role_type,speciality:X.access_info.professional_category};return Promise.resolve(W)}getUserId(X){var W,J,te,re;return((J=(W=X.identifier)==null?void 0:W.find(ne=>ne.type==="DNI"))==null?void 0:J.value)||((re=(te=X.identifier)==null?void 0:te.find(ne=>ne.type==="NIE"))==null?void 0:re.value)}};GetUserInfoBackendAdapter=__decorateClass$d([injectable(),__decorateParam$3(0,inject(TYPES$1.primaryApi))],GetUserInfoBackendAdapter);var __defProp$c=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$c=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$3(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$c(W,J,re),re},__decorateParam$2=(X,W)=>(J,te)=>W(J,te,X);let GetUserInfoHandler=class{constructor(X,W){this.api=X,this.backendAdapter=W}async handle(X){try{const W=await this.backendAdapter.getUserInfo();return this.api.globalStateManager.setData("userInfo",W),W}catch(W){this.api.notificationService.error(W.message)}}};GetUserInfoHandler=__decorateClass$c([__decorateParam$2(0,inject(TYPES$1.primaryApi)),__decorateParam$2(1,inject(GetUserInfoBackendAdapter))],GetUserInfoHandler);class GetUserInfo{}let request$2;const useGetUserInfo=X=>{disposeGetUserInfo(),request$2=registerRequest(X,container$1)(GetUserInfo,GetUserInfoHandler),registerDep(GetUserInfoBackendAdapter)},disposeGetUserInfo=()=>{request$2==null||request$2.dispose(),unregisterDep(GetUserInfoBackendAdapter)},clinicalMonitoringId="clinical-monitoring",styles$6=":host{min-height:1px;height:100%;width:100%}.wrapper{position:relative;min-height:1px;height:100%;display:flex;flex-direction:row}.wrapper #widgets-sidebar-region{width:25%;border-left:1px solid rgb(189,189,189)}.wrapper .content{flex:1;display:flex;flex-direction:column}.wrapper .content #header-widgets-region{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;padding:24px 40px}.wrapper .content #content-widgets-region{flex:1;min-height:1px;height:100%;padding-inline:40px;padding-bottom:24px}",template$7=X=>ke$1`
|
|
558
596
|
<div class="wrapper">
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
597
|
+
<div class="content">
|
|
598
|
+
<div id="header-widgets-region"></div>
|
|
599
|
+
<div id="content-widgets-region"></div>
|
|
600
|
+
</div>
|
|
601
|
+
<div id="widgets-sidebar-region"></div>
|
|
564
602
|
</div>
|
|
565
603
|
`;var __defProp$b=Object.defineProperty,__decorateClass$b=(X,W,J,te)=>{for(var re=void 0,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=oe(W,J,re)||re);return re&&__defProp$b(W,J,re),re};const ji=class ji extends PrimariaRegionHost(h$q){render(){return ke$1`${template$7()}`}firstUpdated(){this._observeMaximizedState()}_observeMaximizedState(){const W=this.renderRoot.querySelector("#content-widgets-region");if(!W)return;new MutationObserver(()=>{const te=W.querySelector("activity-history-main");if(!te)return;const re=te.hasAttribute("maximized")||te.maximized;this._toggleWidgetsVisibility(!re)}).observe(W,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["maximized"]})}_toggleWidgetsVisibility(W){const J=this.renderRoot.querySelector("#widgets-sidebar-region"),te=this.renderRoot.querySelector("#header-widgets-region");J&&(J.style.display=W?"":"none"),te&&(te.style.display=W?"":"none")}};ji.styles=i$B`
|
|
566
604
|
${r$H(styles$6)}
|
|
@@ -745,7 +783,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
745
783
|
<slot></slot>
|
|
746
784
|
`:null}
|
|
747
785
|
</li>
|
|
748
|
-
`;var y$e=Object.defineProperty,g$l=Object.getOwnPropertyDescriptor,i$v=(X,W,J,te)=>{for(var re=te>1?void 0:te?g$l(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&y$e(W,J,re),re};let o$D=class extends h$q{constructor(){super(...arguments),this.leftIconFill=!1,this.rightIconFill=!1,this._state="primary",this._label="Label",this._leftIcon=void 0,this._rightIcon=void 0,this._actionIcon=void 0,this._actionState="primary",this._notifications=0,this._notificationsState="error",this._selected=!1,this._disabled=!1,this._hasNestedMenu=!1,this._nestedMenuPosition="top",this._first=!1,this._last=!1}static get styles(){return[r$H(e$I),r$H(o$E)]}set state(W){const J=this._state;this._state=W==="error"?W:"primary",this.requestUpdate("state",J)}get state(){return this._state}set label(W){const J=this._label;this._label=W,this.requestUpdate("label",J)}get label(){return this._label}set leftIcon(W){const J=this._leftIcon;this._leftIcon=W,this.requestUpdate("leftIcon",J)}get leftIcon(){return this._leftIcon||""}set rightIcon(W){const J=this._rightIcon;this._rightIcon=W,this.requestUpdate("rightIcon",J)}get rightIcon(){return this._rightIcon||""}set actionIcon(W){const J=this._actionIcon;this._actionIcon=W,this.requestUpdate("actionIcon",J)}get actionIcon(){return this._actionIcon||""}set actionState(W){const J=this._actionState;this._actionState=W,this.requestUpdate("actionState",J)}get actionState(){return this._actionState}set notifications(W){const J=this._notifications;this._notifications=W,this.requestUpdate("notifications",J)}get notifications(){return this._notifications}set notificationsState(W){const J=this._notificationsState;this._notificationsState=W,this.requestUpdate("notificationsState",J)}get notificationsState(){return this._notificationsState}set selected(W){const J=this._selected;this._selected=W,this.requestUpdate("selected",J)}get selected(){return this._selected}set disabled(W){const J=this._disabled;this._disabled=W,this.requestUpdate("disabled",J)}get disabled(){return this._disabled}set hasNestedMenu(W){const J=this._hasNestedMenu;this._hasNestedMenu=W,this.requestUpdate("hasNestedMenu",J)}get hasNestedMenu(){return this._hasNestedMenu}set nestedMenuPosition(W){const J=this._nestedMenuPosition;this._nestedMenuPosition=W,this.requestUpdate("nestedMenuPosition",J)}get nestedMenuPosition(){return this._nestedMenuPosition}set first(W){const J=this._first;this._first=W,this.requestUpdate("first",J)}get first(){return this._first}set last(W){const J=this._last;this._last=W,this.requestUpdate("last",J)}get last(){return this._last}_handleItemClick(){this._hasNestedMenu?(this._selected=!0,this.requestUpdate()):(this.dispatchEvent(new CustomEvent("onClick",{bubbles:!1,composed:!1})),this.dispatchEvent(new CustomEvent("onClose",{bubbles:!0,composed:!0})))}_handleKeydown(W){const J=W.key;J==="Enter"||J==="Space"?this._handleItemClick():J==="Escape"&&this._selected&&this._unselectItem()}_handleAction(W){W.stopPropagation(),this.dispatchEvent(new CustomEvent("onAction",{detail:this._label}))}_clickOutside(){document.addEventListener("click",W=>{W.composedPath().includes(this)||this._selected&&this._unselectItem()})}_unselectItem(){this._selected=!1,this.requestUpdate()}async firstUpdated(){try{await this.updateComplete,this._clickOutside()}catch{console.error("ERROR OCURRED")}}render(){return r$C(this)}};i$v([n$w({type:String})],o$D.prototype,"state",1),i$v([n$w({type:String})],o$D.prototype,"label",1),i$v([n$w({type:String})],o$D.prototype,"leftIcon",1),i$v([n$w(o$J)],o$D.prototype,"leftIconFill",2),i$v([n$w(o$J)],o$D.prototype,"rightIconFill",2),i$v([n$w({type:String})],o$D.prototype,"rightIcon",1),i$v([n$w({type:String})],o$D.prototype,"actionIcon",1),i$v([n$w({type:String})],o$D.prototype,"actionState",1),i$v([n$w({type:Number})],o$D.prototype,"notifications",1),i$v([n$w({type:String})],o$D.prototype,"notificationsState",1),i$v([n$w(o$J)],o$D.prototype,"selected",1),i$v([n$w(o$J)],o$D.prototype,"disabled",1),i$v([n$w(o$J)],o$D.prototype,"hasNestedMenu",1),i$v([n$w({type:String})],o$D.prototype,"nestedMenuPosition",1),i$v([n$w(o$J)],o$D.prototype,"first",1),i$v([n$w(o$J)],o$D.prototype,"last",1);var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(X,W){return X.concat([W+"-"+start,W+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(X,W){return X.concat([W,W+"-"+start,W+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(X){return X?(X.nodeName||"").toLowerCase():null}function getWindow(X){if(X==null)return window;if(X.toString()!=="[object Window]"){var W=X.ownerDocument;return W&&W.defaultView||window}return X}function isElement(X){var W=getWindow(X).Element;return X instanceof W||X instanceof Element}function isHTMLElement(X){var W=getWindow(X).HTMLElement;return X instanceof W||X instanceof HTMLElement}function isShadowRoot(X){if(typeof ShadowRoot>"u")return!1;var W=getWindow(X).ShadowRoot;return X instanceof W||X instanceof ShadowRoot}function applyStyles(X){var W=X.state;Object.keys(W.elements).forEach(function(J){var te=W.styles[J]||{},re=W.attributes[J]||{},ne=W.elements[J];!isHTMLElement(ne)||!getNodeName(ne)||(Object.assign(ne.style,te),Object.keys(re).forEach(function(oe){var de=re[oe];de===!1?ne.removeAttribute(oe):ne.setAttribute(oe,de===!0?"":de)}))})}function effect$2(X){var W=X.state,J={popper:{position:W.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(W.elements.popper.style,J.popper),W.styles=J,W.elements.arrow&&Object.assign(W.elements.arrow.style,J.arrow),function(){Object.keys(W.elements).forEach(function(te){var re=W.elements[te],ne=W.attributes[te]||{},oe=Object.keys(W.styles.hasOwnProperty(te)?W.styles[te]:J[te]),de=oe.reduce(function(ue,ce){return ue[ce]="",ue},{});!isHTMLElement(re)||!getNodeName(re)||(Object.assign(re.style,de),Object.keys(ne).forEach(function(ue){re.removeAttribute(ue)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(X){return X.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var X=navigator.userAgentData;return X!=null&&X.brands&&Array.isArray(X.brands)?X.brands.map(function(W){return W.brand+"/"+W.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(X,W,J){W===void 0&&(W=!1),J===void 0&&(J=!1);var te=X.getBoundingClientRect(),re=1,ne=1;W&&isHTMLElement(X)&&(re=X.offsetWidth>0&&round(te.width)/X.offsetWidth||1,ne=X.offsetHeight>0&&round(te.height)/X.offsetHeight||1);var oe=isElement(X)?getWindow(X):window,de=oe.visualViewport,ue=!isLayoutViewport()&&J,ce=(te.left+(ue&&de?de.offsetLeft:0))/re,he=(te.top+(ue&&de?de.offsetTop:0))/ne,pe=te.width/re,fe=te.height/ne;return{width:pe,height:fe,top:he,right:ce+pe,bottom:he+fe,left:ce,x:ce,y:he}}function getLayoutRect(X){var W=getBoundingClientRect(X),J=X.offsetWidth,te=X.offsetHeight;return Math.abs(W.width-J)<=1&&(J=W.width),Math.abs(W.height-te)<=1&&(te=W.height),{x:X.offsetLeft,y:X.offsetTop,width:J,height:te}}function contains(X,W){var J=W.getRootNode&&W.getRootNode();if(X.contains(W))return!0;if(J&&isShadowRoot(J)){var te=W;do{if(te&&X.isSameNode(te))return!0;te=te.parentNode||te.host}while(te)}return!1}function getComputedStyle$1(X){return getWindow(X).getComputedStyle(X)}function isTableElement(X){return["table","td","th"].indexOf(getNodeName(X))>=0}function getDocumentElement(X){return((isElement(X)?X.ownerDocument:X.document)||window.document).documentElement}function getParentNode(X){return getNodeName(X)==="html"?X:X.assignedSlot||X.parentNode||(isShadowRoot(X)?X.host:null)||getDocumentElement(X)}function getTrueOffsetParent(X){return!isHTMLElement(X)||getComputedStyle$1(X).position==="fixed"?null:X.offsetParent}function getContainingBlock(X){var W=/firefox/i.test(getUAString()),J=/Trident/i.test(getUAString());if(J&&isHTMLElement(X)){var te=getComputedStyle$1(X);if(te.position==="fixed")return null}var re=getParentNode(X);for(isShadowRoot(re)&&(re=re.host);isHTMLElement(re)&&["html","body"].indexOf(getNodeName(re))<0;){var ne=getComputedStyle$1(re);if(ne.transform!=="none"||ne.perspective!=="none"||ne.contain==="paint"||["transform","perspective"].indexOf(ne.willChange)!==-1||W&&ne.willChange==="filter"||W&&ne.filter&&ne.filter!=="none")return re;re=re.parentNode}return null}function getOffsetParent(X){for(var W=getWindow(X),J=getTrueOffsetParent(X);J&&isTableElement(J)&&getComputedStyle$1(J).position==="static";)J=getTrueOffsetParent(J);return J&&(getNodeName(J)==="html"||getNodeName(J)==="body"&&getComputedStyle$1(J).position==="static")?W:J||getContainingBlock(X)||W}function getMainAxisFromPlacement(X){return["top","bottom"].indexOf(X)>=0?"x":"y"}function within(X,W,J){return max(X,min(W,J))}function withinMaxClamp(X,W,J){var te=within(X,W,J);return te>J?J:te}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(X){return Object.assign({},getFreshSideObject(),X)}function expandToHashMap(X,W){return W.reduce(function(J,te){return J[te]=X,J},{})}var toPaddingObject=function(W,J){return W=typeof W=="function"?W(Object.assign({},J.rects,{placement:J.placement})):W,mergePaddingObject(typeof W!="number"?W:expandToHashMap(W,basePlacements))};function arrow(X){var W,J=X.state,te=X.name,re=X.options,ne=J.elements.arrow,oe=J.modifiersData.popperOffsets,de=getBasePlacement(J.placement),ue=getMainAxisFromPlacement(de),ce=[left,right].indexOf(de)>=0,he=ce?"height":"width";if(!(!ne||!oe)){var pe=toPaddingObject(re.padding,J),fe=getLayoutRect(ne),ge=ue==="y"?top:left,be=ue==="y"?bottom:right,me=J.rects.reference[he]+J.rects.reference[ue]-oe[ue]-J.rects.popper[he],ve=oe[ue]-J.rects.reference[ue],ye=getOffsetParent(ne),we=ye?ue==="y"?ye.clientHeight||0:ye.clientWidth||0:0,Se=me/2-ve/2,_e=pe[ge],Ce=we-fe[he]-pe[be],Le=we/2-fe[he]/2+Se,Pe=within(_e,Le,Ce),Ie=ue;J.modifiersData[te]=(W={},W[Ie]=Pe,W.centerOffset=Pe-Le,W)}}function effect$1(X){var W=X.state,J=X.options,te=J.element,re=te===void 0?"[data-popper-arrow]":te;re!=null&&(typeof re=="string"&&(re=W.elements.popper.querySelector(re),!re)||contains(W.elements.popper,re)&&(W.elements.arrow=re))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(X){return X.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(X,W){var J=X.x,te=X.y,re=W.devicePixelRatio||1;return{x:round(J*re)/re||0,y:round(te*re)/re||0}}function mapToStyles(X){var W,J=X.popper,te=X.popperRect,re=X.placement,ne=X.variation,oe=X.offsets,de=X.position,ue=X.gpuAcceleration,ce=X.adaptive,he=X.roundOffsets,pe=X.isFixed,fe=oe.x,ge=fe===void 0?0:fe,be=oe.y,me=be===void 0?0:be,ve=typeof he=="function"?he({x:ge,y:me}):{x:ge,y:me};ge=ve.x,me=ve.y;var ye=oe.hasOwnProperty("x"),we=oe.hasOwnProperty("y"),Se=left,_e=top,Ce=window;if(ce){var Le=getOffsetParent(J),Pe="clientHeight",Ie="clientWidth";if(Le===getWindow(J)&&(Le=getDocumentElement(J),getComputedStyle$1(Le).position!=="static"&&de==="absolute"&&(Pe="scrollHeight",Ie="scrollWidth")),Le=Le,re===top||(re===left||re===right)&&ne===end){_e=bottom;var Fe=pe&&Le===Ce&&Ce.visualViewport?Ce.visualViewport.height:Le[Pe];me-=Fe-te.height,me*=ue?1:-1}if(re===left||(re===top||re===bottom)&&ne===end){Se=right;var qe=pe&&Le===Ce&&Ce.visualViewport?Ce.visualViewport.width:Le[Ie];ge-=qe-te.width,ge*=ue?1:-1}}var Ae=Object.assign({position:de},ce&&unsetSides),De=he===!0?roundOffsetsByDPR({x:ge,y:me},getWindow(J)):{x:ge,y:me};if(ge=De.x,me=De.y,ue){var Me;return Object.assign({},Ae,(Me={},Me[_e]=we?"0":"",Me[Se]=ye?"0":"",Me.transform=(Ce.devicePixelRatio||1)<=1?"translate("+ge+"px, "+me+"px)":"translate3d("+ge+"px, "+me+"px, 0)",Me))}return Object.assign({},Ae,(W={},W[_e]=we?me+"px":"",W[Se]=ye?ge+"px":"",W.transform="",W))}function computeStyles(X){var W=X.state,J=X.options,te=J.gpuAcceleration,re=te===void 0?!0:te,ne=J.adaptive,oe=ne===void 0?!0:ne,de=J.roundOffsets,ue=de===void 0?!0:de,ce={placement:getBasePlacement(W.placement),variation:getVariation(W.placement),popper:W.elements.popper,popperRect:W.rects.popper,gpuAcceleration:re,isFixed:W.options.strategy==="fixed"};W.modifiersData.popperOffsets!=null&&(W.styles.popper=Object.assign({},W.styles.popper,mapToStyles(Object.assign({},ce,{offsets:W.modifiersData.popperOffsets,position:W.options.strategy,adaptive:oe,roundOffsets:ue})))),W.modifiersData.arrow!=null&&(W.styles.arrow=Object.assign({},W.styles.arrow,mapToStyles(Object.assign({},ce,{offsets:W.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ue})))),W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-placement":W.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(X){var W=X.state,J=X.instance,te=X.options,re=te.scroll,ne=re===void 0?!0:re,oe=te.resize,de=oe===void 0?!0:oe,ue=getWindow(W.elements.popper),ce=[].concat(W.scrollParents.reference,W.scrollParents.popper);return ne&&ce.forEach(function(he){he.addEventListener("scroll",J.update,passive)}),de&&ue.addEventListener("resize",J.update,passive),function(){ne&&ce.forEach(function(he){he.removeEventListener("scroll",J.update,passive)}),de&&ue.removeEventListener("resize",J.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(X){return X.replace(/left|right|bottom|top/g,function(W){return hash$1[W]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(X){return X.replace(/start|end/g,function(W){return hash[W]})}function getWindowScroll(X){var W=getWindow(X),J=W.pageXOffset,te=W.pageYOffset;return{scrollLeft:J,scrollTop:te}}function getWindowScrollBarX(X){return getBoundingClientRect(getDocumentElement(X)).left+getWindowScroll(X).scrollLeft}function getViewportRect(X,W){var J=getWindow(X),te=getDocumentElement(X),re=J.visualViewport,ne=te.clientWidth,oe=te.clientHeight,de=0,ue=0;if(re){ne=re.width,oe=re.height;var ce=isLayoutViewport();(ce||!ce&&W==="fixed")&&(de=re.offsetLeft,ue=re.offsetTop)}return{width:ne,height:oe,x:de+getWindowScrollBarX(X),y:ue}}function getDocumentRect(X){var W,J=getDocumentElement(X),te=getWindowScroll(X),re=(W=X.ownerDocument)==null?void 0:W.body,ne=max(J.scrollWidth,J.clientWidth,re?re.scrollWidth:0,re?re.clientWidth:0),oe=max(J.scrollHeight,J.clientHeight,re?re.scrollHeight:0,re?re.clientHeight:0),de=-te.scrollLeft+getWindowScrollBarX(X),ue=-te.scrollTop;return getComputedStyle$1(re||J).direction==="rtl"&&(de+=max(J.clientWidth,re?re.clientWidth:0)-ne),{width:ne,height:oe,x:de,y:ue}}function isScrollParent(X){var W=getComputedStyle$1(X),J=W.overflow,te=W.overflowX,re=W.overflowY;return/auto|scroll|overlay|hidden/.test(J+re+te)}function getScrollParent(X){return["html","body","#document"].indexOf(getNodeName(X))>=0?X.ownerDocument.body:isHTMLElement(X)&&isScrollParent(X)?X:getScrollParent(getParentNode(X))}function listScrollParents(X,W){var J;W===void 0&&(W=[]);var te=getScrollParent(X),re=te===((J=X.ownerDocument)==null?void 0:J.body),ne=getWindow(te),oe=re?[ne].concat(ne.visualViewport||[],isScrollParent(te)?te:[]):te,de=W.concat(oe);return re?de:de.concat(listScrollParents(getParentNode(oe)))}function rectToClientRect(X){return Object.assign({},X,{left:X.x,top:X.y,right:X.x+X.width,bottom:X.y+X.height})}function getInnerBoundingClientRect(X,W){var J=getBoundingClientRect(X,!1,W==="fixed");return J.top=J.top+X.clientTop,J.left=J.left+X.clientLeft,J.bottom=J.top+X.clientHeight,J.right=J.left+X.clientWidth,J.width=X.clientWidth,J.height=X.clientHeight,J.x=J.left,J.y=J.top,J}function getClientRectFromMixedType(X,W,J){return W===viewport?rectToClientRect(getViewportRect(X,J)):isElement(W)?getInnerBoundingClientRect(W,J):rectToClientRect(getDocumentRect(getDocumentElement(X)))}function getClippingParents(X){var W=listScrollParents(getParentNode(X)),J=["absolute","fixed"].indexOf(getComputedStyle$1(X).position)>=0,te=J&&isHTMLElement(X)?getOffsetParent(X):X;return isElement(te)?W.filter(function(re){return isElement(re)&&contains(re,te)&&getNodeName(re)!=="body"}):[]}function getClippingRect(X,W,J,te){var re=W==="clippingParents"?getClippingParents(X):[].concat(W),ne=[].concat(re,[J]),oe=ne[0],de=ne.reduce(function(ue,ce){var he=getClientRectFromMixedType(X,ce,te);return ue.top=max(he.top,ue.top),ue.right=min(he.right,ue.right),ue.bottom=min(he.bottom,ue.bottom),ue.left=max(he.left,ue.left),ue},getClientRectFromMixedType(X,oe,te));return de.width=de.right-de.left,de.height=de.bottom-de.top,de.x=de.left,de.y=de.top,de}function computeOffsets(X){var W=X.reference,J=X.element,te=X.placement,re=te?getBasePlacement(te):null,ne=te?getVariation(te):null,oe=W.x+W.width/2-J.width/2,de=W.y+W.height/2-J.height/2,ue;switch(re){case top:ue={x:oe,y:W.y-J.height};break;case bottom:ue={x:oe,y:W.y+W.height};break;case right:ue={x:W.x+W.width,y:de};break;case left:ue={x:W.x-J.width,y:de};break;default:ue={x:W.x,y:W.y}}var ce=re?getMainAxisFromPlacement(re):null;if(ce!=null){var he=ce==="y"?"height":"width";switch(ne){case start:ue[ce]=ue[ce]-(W[he]/2-J[he]/2);break;case end:ue[ce]=ue[ce]+(W[he]/2-J[he]/2);break}}return ue}function detectOverflow(X,W){W===void 0&&(W={});var J=W,te=J.placement,re=te===void 0?X.placement:te,ne=J.strategy,oe=ne===void 0?X.strategy:ne,de=J.boundary,ue=de===void 0?clippingParents:de,ce=J.rootBoundary,he=ce===void 0?viewport:ce,pe=J.elementContext,fe=pe===void 0?popper:pe,ge=J.altBoundary,be=ge===void 0?!1:ge,me=J.padding,ve=me===void 0?0:me,ye=mergePaddingObject(typeof ve!="number"?ve:expandToHashMap(ve,basePlacements)),we=fe===popper?reference:popper,Se=X.rects.popper,_e=X.elements[be?we:fe],Ce=getClippingRect(isElement(_e)?_e:_e.contextElement||getDocumentElement(X.elements.popper),ue,he,oe),Le=getBoundingClientRect(X.elements.reference),Pe=computeOffsets({reference:Le,element:Se,strategy:"absolute",placement:re}),Ie=rectToClientRect(Object.assign({},Se,Pe)),Fe=fe===popper?Ie:Le,qe={top:Ce.top-Fe.top+ye.top,bottom:Fe.bottom-Ce.bottom+ye.bottom,left:Ce.left-Fe.left+ye.left,right:Fe.right-Ce.right+ye.right},Ae=X.modifiersData.offset;if(fe===popper&&Ae){var De=Ae[re];Object.keys(qe).forEach(function(Me){var Be=[right,bottom].indexOf(Me)>=0?1:-1,Ve=[top,bottom].indexOf(Me)>=0?"y":"x";qe[Me]+=De[Ve]*Be})}return qe}function computeAutoPlacement(X,W){W===void 0&&(W={});var J=W,te=J.placement,re=J.boundary,ne=J.rootBoundary,oe=J.padding,de=J.flipVariations,ue=J.allowedAutoPlacements,ce=ue===void 0?placements:ue,he=getVariation(te),pe=he?de?variationPlacements:variationPlacements.filter(function(be){return getVariation(be)===he}):basePlacements,fe=pe.filter(function(be){return ce.indexOf(be)>=0});fe.length===0&&(fe=pe);var ge=fe.reduce(function(be,me){return be[me]=detectOverflow(X,{placement:me,boundary:re,rootBoundary:ne,padding:oe})[getBasePlacement(me)],be},{});return Object.keys(ge).sort(function(be,me){return ge[be]-ge[me]})}function getExpandedFallbackPlacements(X){if(getBasePlacement(X)===auto)return[];var W=getOppositePlacement(X);return[getOppositeVariationPlacement(X),W,getOppositeVariationPlacement(W)]}function flip(X){var W=X.state,J=X.options,te=X.name;if(!W.modifiersData[te]._skip){for(var re=J.mainAxis,ne=re===void 0?!0:re,oe=J.altAxis,de=oe===void 0?!0:oe,ue=J.fallbackPlacements,ce=J.padding,he=J.boundary,pe=J.rootBoundary,fe=J.altBoundary,ge=J.flipVariations,be=ge===void 0?!0:ge,me=J.allowedAutoPlacements,ve=W.options.placement,ye=getBasePlacement(ve),we=ye===ve,Se=ue||(we||!be?[getOppositePlacement(ve)]:getExpandedFallbackPlacements(ve)),_e=[ve].concat(Se).reduce(function(Xe,Ke){return Xe.concat(getBasePlacement(Ke)===auto?computeAutoPlacement(W,{placement:Ke,boundary:he,rootBoundary:pe,padding:ce,flipVariations:be,allowedAutoPlacements:me}):Ke)},[]),Ce=W.rects.reference,Le=W.rects.popper,Pe=new Map,Ie=!0,Fe=_e[0],qe=0;qe<_e.length;qe++){var Ae=_e[qe],De=getBasePlacement(Ae),Me=getVariation(Ae)===start,Be=[top,bottom].indexOf(De)>=0,Ve=Be?"width":"height",Je=detectOverflow(W,{placement:Ae,boundary:he,rootBoundary:pe,altBoundary:fe,padding:ce}),Ye=Be?Me?right:left:Me?bottom:top;Ce[Ve]>Le[Ve]&&(Ye=getOppositePlacement(Ye));var kt=getOppositePlacement(Ye),Qe=[];if(ne&&Qe.push(Je[De]<=0),de&&Qe.push(Je[Ye]<=0,Je[kt]<=0),Qe.every(function(Xe){return Xe})){Fe=Ae,Ie=!1;break}Pe.set(Ae,Qe)}if(Ie)for(var We=be?3:1,Ne=function(Ke){var je=_e.find(function(Ze){var nt=Pe.get(Ze);if(nt)return nt.slice(0,Ke).every(function(ot){return ot})});if(je)return Fe=je,"break"},He=We;He>0;He--){var Ge=Ne(He);if(Ge==="break")break}W.placement!==Fe&&(W.modifiersData[te]._skip=!0,W.placement=Fe,W.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(X,W,J){return J===void 0&&(J={x:0,y:0}),{top:X.top-W.height-J.y,right:X.right-W.width+J.x,bottom:X.bottom-W.height+J.y,left:X.left-W.width-J.x}}function isAnySideFullyClipped(X){return[top,right,bottom,left].some(function(W){return X[W]>=0})}function hide(X){var W=X.state,J=X.name,te=W.rects.reference,re=W.rects.popper,ne=W.modifiersData.preventOverflow,oe=detectOverflow(W,{elementContext:"reference"}),de=detectOverflow(W,{altBoundary:!0}),ue=getSideOffsets(oe,te),ce=getSideOffsets(de,re,ne),he=isAnySideFullyClipped(ue),pe=isAnySideFullyClipped(ce);W.modifiersData[J]={referenceClippingOffsets:ue,popperEscapeOffsets:ce,isReferenceHidden:he,hasPopperEscaped:pe},W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-reference-hidden":he,"data-popper-escaped":pe})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(X,W,J){var te=getBasePlacement(X),re=[left,top].indexOf(te)>=0?-1:1,ne=typeof J=="function"?J(Object.assign({},W,{placement:X})):J,oe=ne[0],de=ne[1];return oe=oe||0,de=(de||0)*re,[left,right].indexOf(te)>=0?{x:de,y:oe}:{x:oe,y:de}}function offset$1(X){var W=X.state,J=X.options,te=X.name,re=J.offset,ne=re===void 0?[0,0]:re,oe=placements.reduce(function(he,pe){return he[pe]=distanceAndSkiddingToXY(pe,W.rects,ne),he},{}),de=oe[W.placement],ue=de.x,ce=de.y;W.modifiersData.popperOffsets!=null&&(W.modifiersData.popperOffsets.x+=ue,W.modifiersData.popperOffsets.y+=ce),W.modifiersData[te]=oe}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(X){var W=X.state,J=X.name;W.modifiersData[J]=computeOffsets({reference:W.rects.reference,element:W.rects.popper,strategy:"absolute",placement:W.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(X){return X==="x"?"y":"x"}function preventOverflow(X){var W=X.state,J=X.options,te=X.name,re=J.mainAxis,ne=re===void 0?!0:re,oe=J.altAxis,de=oe===void 0?!1:oe,ue=J.boundary,ce=J.rootBoundary,he=J.altBoundary,pe=J.padding,fe=J.tether,ge=fe===void 0?!0:fe,be=J.tetherOffset,me=be===void 0?0:be,ve=detectOverflow(W,{boundary:ue,rootBoundary:ce,padding:pe,altBoundary:he}),ye=getBasePlacement(W.placement),we=getVariation(W.placement),Se=!we,_e=getMainAxisFromPlacement(ye),Ce=getAltAxis(_e),Le=W.modifiersData.popperOffsets,Pe=W.rects.reference,Ie=W.rects.popper,Fe=typeof me=="function"?me(Object.assign({},W.rects,{placement:W.placement})):me,qe=typeof Fe=="number"?{mainAxis:Fe,altAxis:Fe}:Object.assign({mainAxis:0,altAxis:0},Fe),Ae=W.modifiersData.offset?W.modifiersData.offset[W.placement]:null,De={x:0,y:0};if(Le){if(ne){var Me,Be=_e==="y"?top:left,Ve=_e==="y"?bottom:right,Je=_e==="y"?"height":"width",Ye=Le[_e],kt=Ye+ve[Be],Qe=Ye-ve[Ve],We=ge?-Ie[Je]/2:0,Ne=we===start?Pe[Je]:Ie[Je],He=we===start?-Ie[Je]:-Pe[Je],Ge=W.elements.arrow,Xe=ge&&Ge?getLayoutRect(Ge):{width:0,height:0},Ke=W.modifiersData["arrow#persistent"]?W.modifiersData["arrow#persistent"].padding:getFreshSideObject(),je=Ke[Be],Ze=Ke[Ve],nt=within(0,Pe[Je],Xe[Je]),ot=Se?Pe[Je]/2-We-nt-je-qe.mainAxis:Ne-nt-je-qe.mainAxis,Ct=Se?-Pe[Je]/2+We+nt+Ze+qe.mainAxis:He+nt+Ze+qe.mainAxis,Lt=W.elements.arrow&&getOffsetParent(W.elements.arrow),Bt=Lt?_e==="y"?Lt.clientTop||0:Lt.clientLeft||0:0,jt=(Me=Ae==null?void 0:Ae[_e])!=null?Me:0,Kt=Ye+ot-jt-Bt,ei=Ye+Ct-jt,mi=within(ge?min(kt,Kt):kt,Ye,ge?max(Qe,ei):Qe);Le[_e]=mi,De[_e]=mi-Ye}if(de){var di,xt=_e==="x"?top:left,St=_e==="x"?bottom:right,qt=Le[Ce],Dt=Ce==="y"?"height":"width",Tt=qt+ve[xt],Gt=qt-ve[St],Wt=[top,left].indexOf(ye)!==-1,Yt=(di=Ae==null?void 0:Ae[Ce])!=null?di:0,pi=Wt?Tt:qt-Pe[Dt]-Ie[Dt]-Yt+qe.altAxis,yi=Wt?qt+Pe[Dt]+Ie[Dt]-Yt-qe.altAxis:Gt,ai=ge&&Wt?withinMaxClamp(pi,qt,yi):within(ge?pi:Tt,qt,ge?yi:Gt);Le[Ce]=ai,De[Ce]=ai-qt}W.modifiersData[te]=De}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(X){return{scrollLeft:X.scrollLeft,scrollTop:X.scrollTop}}function getNodeScroll(X){return X===getWindow(X)||!isHTMLElement(X)?getWindowScroll(X):getHTMLElementScroll(X)}function isElementScaled(X){var W=X.getBoundingClientRect(),J=round(W.width)/X.offsetWidth||1,te=round(W.height)/X.offsetHeight||1;return J!==1||te!==1}function getCompositeRect(X,W,J){J===void 0&&(J=!1);var te=isHTMLElement(W),re=isHTMLElement(W)&&isElementScaled(W),ne=getDocumentElement(W),oe=getBoundingClientRect(X,re,J),de={scrollLeft:0,scrollTop:0},ue={x:0,y:0};return(te||!te&&!J)&&((getNodeName(W)!=="body"||isScrollParent(ne))&&(de=getNodeScroll(W)),isHTMLElement(W)?(ue=getBoundingClientRect(W,!0),ue.x+=W.clientLeft,ue.y+=W.clientTop):ne&&(ue.x=getWindowScrollBarX(ne))),{x:oe.left+de.scrollLeft-ue.x,y:oe.top+de.scrollTop-ue.y,width:oe.width,height:oe.height}}function order(X){var W=new Map,J=new Set,te=[];X.forEach(function(ne){W.set(ne.name,ne)});function re(ne){J.add(ne.name);var oe=[].concat(ne.requires||[],ne.requiresIfExists||[]);oe.forEach(function(de){if(!J.has(de)){var ue=W.get(de);ue&&re(ue)}}),te.push(ne)}return X.forEach(function(ne){J.has(ne.name)||re(ne)}),te}function orderModifiers(X){var W=order(X);return modifierPhases.reduce(function(J,te){return J.concat(W.filter(function(re){return re.phase===te}))},[])}function debounce(X){var W;return function(){return W||(W=new Promise(function(J){Promise.resolve().then(function(){W=void 0,J(X())})})),W}}function mergeByName(X){var W=X.reduce(function(J,te){var re=J[te.name];return J[te.name]=re?Object.assign({},re,te,{options:Object.assign({},re.options,te.options),data:Object.assign({},re.data,te.data)}):te,J},{});return Object.keys(W).map(function(J){return W[J]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var X=arguments.length,W=new Array(X),J=0;J<X;J++)W[J]=arguments[J];return!W.some(function(te){return!(te&&typeof te.getBoundingClientRect=="function")})}function popperGenerator(X){X===void 0&&(X={});var W=X,J=W.defaultModifiers,te=J===void 0?[]:J,re=W.defaultOptions,ne=re===void 0?DEFAULT_OPTIONS:re;return function(de,ue,ce){ce===void 0&&(ce=ne);var he={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,ne),modifiersData:{},elements:{reference:de,popper:ue},attributes:{},styles:{}},pe=[],fe=!1,ge={state:he,setOptions:function(ye){var we=typeof ye=="function"?ye(he.options):ye;me(),he.options=Object.assign({},ne,he.options,we),he.scrollParents={reference:isElement(de)?listScrollParents(de):de.contextElement?listScrollParents(de.contextElement):[],popper:listScrollParents(ue)};var Se=orderModifiers(mergeByName([].concat(te,he.options.modifiers)));return he.orderedModifiers=Se.filter(function(_e){return _e.enabled}),be(),ge.update()},forceUpdate:function(){if(!fe){var ye=he.elements,we=ye.reference,Se=ye.popper;if(areValidElements(we,Se)){he.rects={reference:getCompositeRect(we,getOffsetParent(Se),he.options.strategy==="fixed"),popper:getLayoutRect(Se)},he.reset=!1,he.placement=he.options.placement,he.orderedModifiers.forEach(function(qe){return he.modifiersData[qe.name]=Object.assign({},qe.data)});for(var _e=0;_e<he.orderedModifiers.length;_e++){if(he.reset===!0){he.reset=!1,_e=-1;continue}var Ce=he.orderedModifiers[_e],Le=Ce.fn,Pe=Ce.options,Ie=Pe===void 0?{}:Pe,Fe=Ce.name;typeof Le=="function"&&(he=Le({state:he,options:Ie,name:Fe,instance:ge})||he)}}}},update:debounce(function(){return new Promise(function(ve){ge.forceUpdate(),ve(he)})}),destroy:function(){me(),fe=!0}};if(!areValidElements(de,ue))return ge;ge.setOptions(ce).then(function(ve){!fe&&ce.onFirstUpdate&&ce.onFirstUpdate(ve)});function be(){he.orderedModifiers.forEach(function(ve){var ye=ve.name,we=ve.options,Se=we===void 0?{}:we,_e=ve.effect;if(typeof _e=="function"){var Ce=_e({state:he,name:ye,instance:ge,options:Se}),Le=function(){};pe.push(Ce||Le)}})}function me(){pe.forEach(function(ve){return ve()}),pe=[]}return ge}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$2,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers});const i$u=":host{display:block;width:-moz-max-content;width:max-content;opacity:0;visibility:hidden;z-index:999}:host(.visible){opacity:1;visibility:visible}.dss-action-menu{border-radius:var(--dss-radius-sm);box-shadow:0 1px 3px #0000001a,0 4px 8px 3px #0000000d;min-width:160px;width:-moz-max-content;width:max-content;max-width:280px;background-color:var(--color-white);overflow:hidden}.dss-action-menu--full-width{width:100%}",n$s=X=>ke$1`
|
|
786
|
+
`;var y$e=Object.defineProperty,g$l=Object.getOwnPropertyDescriptor,i$v=(X,W,J,te)=>{for(var re=te>1?void 0:te?g$l(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&y$e(W,J,re),re};let o$D=class extends h$q{constructor(){super(...arguments),this.leftIconFill=!1,this.rightIconFill=!1,this._state="primary",this._label="Label",this._leftIcon=void 0,this._rightIcon=void 0,this._actionIcon=void 0,this._actionState="primary",this._notifications=0,this._notificationsState="error",this._selected=!1,this._disabled=!1,this._hasNestedMenu=!1,this._nestedMenuPosition="top",this._first=!1,this._last=!1}static get styles(){return[r$H(e$I),r$H(o$E)]}set state(W){const J=this._state;this._state=W==="error"?W:"primary",this.requestUpdate("state",J)}get state(){return this._state}set label(W){const J=this._label;this._label=W,this.requestUpdate("label",J)}get label(){return this._label}set leftIcon(W){const J=this._leftIcon;this._leftIcon=W,this.requestUpdate("leftIcon",J)}get leftIcon(){return this._leftIcon||""}set rightIcon(W){const J=this._rightIcon;this._rightIcon=W,this.requestUpdate("rightIcon",J)}get rightIcon(){return this._rightIcon||""}set actionIcon(W){const J=this._actionIcon;this._actionIcon=W,this.requestUpdate("actionIcon",J)}get actionIcon(){return this._actionIcon||""}set actionState(W){const J=this._actionState;this._actionState=W,this.requestUpdate("actionState",J)}get actionState(){return this._actionState}set notifications(W){const J=this._notifications;this._notifications=W,this.requestUpdate("notifications",J)}get notifications(){return this._notifications}set notificationsState(W){const J=this._notificationsState;this._notificationsState=W,this.requestUpdate("notificationsState",J)}get notificationsState(){return this._notificationsState}set selected(W){const J=this._selected;this._selected=W,this.requestUpdate("selected",J)}get selected(){return this._selected}set disabled(W){const J=this._disabled;this._disabled=W,this.requestUpdate("disabled",J)}get disabled(){return this._disabled}set hasNestedMenu(W){const J=this._hasNestedMenu;this._hasNestedMenu=W,this.requestUpdate("hasNestedMenu",J)}get hasNestedMenu(){return this._hasNestedMenu}set nestedMenuPosition(W){const J=this._nestedMenuPosition;this._nestedMenuPosition=W,this.requestUpdate("nestedMenuPosition",J)}get nestedMenuPosition(){return this._nestedMenuPosition}set first(W){const J=this._first;this._first=W,this.requestUpdate("first",J)}get first(){return this._first}set last(W){const J=this._last;this._last=W,this.requestUpdate("last",J)}get last(){return this._last}_handleItemClick(){this._hasNestedMenu?(this._selected=!0,this.requestUpdate()):(this.dispatchEvent(new CustomEvent("onClick",{bubbles:!1,composed:!1})),this.dispatchEvent(new CustomEvent("onClose",{bubbles:!0,composed:!0})))}_handleKeydown(W){const J=W.key;J==="Enter"||J==="Space"?this._handleItemClick():J==="Escape"&&this._selected&&this._unselectItem()}_handleAction(W){W.stopPropagation(),this.dispatchEvent(new CustomEvent("onAction",{detail:this._label}))}_clickOutside(){document.addEventListener("click",W=>{W.composedPath().includes(this)||this._selected&&this._unselectItem()})}_unselectItem(){this._selected=!1,this.requestUpdate()}async firstUpdated(){try{await this.updateComplete,this._clickOutside()}catch{console.error("ERROR OCURRED")}}render(){return r$C(this)}};i$v([n$w({type:String})],o$D.prototype,"state",1),i$v([n$w({type:String})],o$D.prototype,"label",1),i$v([n$w({type:String})],o$D.prototype,"leftIcon",1),i$v([n$w(o$J)],o$D.prototype,"leftIconFill",2),i$v([n$w(o$J)],o$D.prototype,"rightIconFill",2),i$v([n$w({type:String})],o$D.prototype,"rightIcon",1),i$v([n$w({type:String})],o$D.prototype,"actionIcon",1),i$v([n$w({type:String})],o$D.prototype,"actionState",1),i$v([n$w({type:Number})],o$D.prototype,"notifications",1),i$v([n$w({type:String})],o$D.prototype,"notificationsState",1),i$v([n$w(o$J)],o$D.prototype,"selected",1),i$v([n$w(o$J)],o$D.prototype,"disabled",1),i$v([n$w(o$J)],o$D.prototype,"hasNestedMenu",1),i$v([n$w({type:String})],o$D.prototype,"nestedMenuPosition",1),i$v([n$w(o$J)],o$D.prototype,"first",1),i$v([n$w(o$J)],o$D.prototype,"last",1);var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(X,W){return X.concat([W+"-"+start,W+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(X,W){return X.concat([W,W+"-"+start,W+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(X){return X?(X.nodeName||"").toLowerCase():null}function getWindow(X){if(X==null)return window;if(X.toString()!=="[object Window]"){var W=X.ownerDocument;return W&&W.defaultView||window}return X}function isElement(X){var W=getWindow(X).Element;return X instanceof W||X instanceof Element}function isHTMLElement(X){var W=getWindow(X).HTMLElement;return X instanceof W||X instanceof HTMLElement}function isShadowRoot(X){if(typeof ShadowRoot>"u")return!1;var W=getWindow(X).ShadowRoot;return X instanceof W||X instanceof ShadowRoot}function applyStyles(X){var W=X.state;Object.keys(W.elements).forEach(function(J){var te=W.styles[J]||{},re=W.attributes[J]||{},ne=W.elements[J];!isHTMLElement(ne)||!getNodeName(ne)||(Object.assign(ne.style,te),Object.keys(re).forEach(function(oe){var de=re[oe];de===!1?ne.removeAttribute(oe):ne.setAttribute(oe,de===!0?"":de)}))})}function effect$2(X){var W=X.state,J={popper:{position:W.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(W.elements.popper.style,J.popper),W.styles=J,W.elements.arrow&&Object.assign(W.elements.arrow.style,J.arrow),function(){Object.keys(W.elements).forEach(function(te){var re=W.elements[te],ne=W.attributes[te]||{},oe=Object.keys(W.styles.hasOwnProperty(te)?W.styles[te]:J[te]),de=oe.reduce(function(ue,ce){return ue[ce]="",ue},{});!isHTMLElement(re)||!getNodeName(re)||(Object.assign(re.style,de),Object.keys(ne).forEach(function(ue){re.removeAttribute(ue)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(X){return X.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var X=navigator.userAgentData;return X!=null&&X.brands&&Array.isArray(X.brands)?X.brands.map(function(W){return W.brand+"/"+W.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(X,W,J){W===void 0&&(W=!1),J===void 0&&(J=!1);var te=X.getBoundingClientRect(),re=1,ne=1;W&&isHTMLElement(X)&&(re=X.offsetWidth>0&&round(te.width)/X.offsetWidth||1,ne=X.offsetHeight>0&&round(te.height)/X.offsetHeight||1);var oe=isElement(X)?getWindow(X):window,de=oe.visualViewport,ue=!isLayoutViewport()&&J,ce=(te.left+(ue&&de?de.offsetLeft:0))/re,he=(te.top+(ue&&de?de.offsetTop:0))/ne,pe=te.width/re,fe=te.height/ne;return{width:pe,height:fe,top:he,right:ce+pe,bottom:he+fe,left:ce,x:ce,y:he}}function getLayoutRect(X){var W=getBoundingClientRect(X),J=X.offsetWidth,te=X.offsetHeight;return Math.abs(W.width-J)<=1&&(J=W.width),Math.abs(W.height-te)<=1&&(te=W.height),{x:X.offsetLeft,y:X.offsetTop,width:J,height:te}}function contains(X,W){var J=W.getRootNode&&W.getRootNode();if(X.contains(W))return!0;if(J&&isShadowRoot(J)){var te=W;do{if(te&&X.isSameNode(te))return!0;te=te.parentNode||te.host}while(te)}return!1}function getComputedStyle$1(X){return getWindow(X).getComputedStyle(X)}function isTableElement(X){return["table","td","th"].indexOf(getNodeName(X))>=0}function getDocumentElement(X){return((isElement(X)?X.ownerDocument:X.document)||window.document).documentElement}function getParentNode(X){return getNodeName(X)==="html"?X:X.assignedSlot||X.parentNode||(isShadowRoot(X)?X.host:null)||getDocumentElement(X)}function getTrueOffsetParent(X){return!isHTMLElement(X)||getComputedStyle$1(X).position==="fixed"?null:X.offsetParent}function getContainingBlock(X){var W=/firefox/i.test(getUAString()),J=/Trident/i.test(getUAString());if(J&&isHTMLElement(X)){var te=getComputedStyle$1(X);if(te.position==="fixed")return null}var re=getParentNode(X);for(isShadowRoot(re)&&(re=re.host);isHTMLElement(re)&&["html","body"].indexOf(getNodeName(re))<0;){var ne=getComputedStyle$1(re);if(ne.transform!=="none"||ne.perspective!=="none"||ne.contain==="paint"||["transform","perspective"].indexOf(ne.willChange)!==-1||W&&ne.willChange==="filter"||W&&ne.filter&&ne.filter!=="none")return re;re=re.parentNode}return null}function getOffsetParent(X){for(var W=getWindow(X),J=getTrueOffsetParent(X);J&&isTableElement(J)&&getComputedStyle$1(J).position==="static";)J=getTrueOffsetParent(J);return J&&(getNodeName(J)==="html"||getNodeName(J)==="body"&&getComputedStyle$1(J).position==="static")?W:J||getContainingBlock(X)||W}function getMainAxisFromPlacement(X){return["top","bottom"].indexOf(X)>=0?"x":"y"}function within(X,W,J){return max(X,min(W,J))}function withinMaxClamp(X,W,J){var te=within(X,W,J);return te>J?J:te}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(X){return Object.assign({},getFreshSideObject(),X)}function expandToHashMap(X,W){return W.reduce(function(J,te){return J[te]=X,J},{})}var toPaddingObject=function(W,J){return W=typeof W=="function"?W(Object.assign({},J.rects,{placement:J.placement})):W,mergePaddingObject(typeof W!="number"?W:expandToHashMap(W,basePlacements))};function arrow(X){var W,J=X.state,te=X.name,re=X.options,ne=J.elements.arrow,oe=J.modifiersData.popperOffsets,de=getBasePlacement(J.placement),ue=getMainAxisFromPlacement(de),ce=[left,right].indexOf(de)>=0,he=ce?"height":"width";if(!(!ne||!oe)){var pe=toPaddingObject(re.padding,J),fe=getLayoutRect(ne),ge=ue==="y"?top:left,be=ue==="y"?bottom:right,me=J.rects.reference[he]+J.rects.reference[ue]-oe[ue]-J.rects.popper[he],ve=oe[ue]-J.rects.reference[ue],ye=getOffsetParent(ne),we=ye?ue==="y"?ye.clientHeight||0:ye.clientWidth||0:0,Se=me/2-ve/2,_e=pe[ge],Ce=we-fe[he]-pe[be],Le=we/2-fe[he]/2+Se,Pe=within(_e,Le,Ce),Ie=ue;J.modifiersData[te]=(W={},W[Ie]=Pe,W.centerOffset=Pe-Le,W)}}function effect$1(X){var W=X.state,J=X.options,te=J.element,re=te===void 0?"[data-popper-arrow]":te;re!=null&&(typeof re=="string"&&(re=W.elements.popper.querySelector(re),!re)||contains(W.elements.popper,re)&&(W.elements.arrow=re))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(X){return X.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(X,W){var J=X.x,te=X.y,re=W.devicePixelRatio||1;return{x:round(J*re)/re||0,y:round(te*re)/re||0}}function mapToStyles(X){var W,J=X.popper,te=X.popperRect,re=X.placement,ne=X.variation,oe=X.offsets,de=X.position,ue=X.gpuAcceleration,ce=X.adaptive,he=X.roundOffsets,pe=X.isFixed,fe=oe.x,ge=fe===void 0?0:fe,be=oe.y,me=be===void 0?0:be,ve=typeof he=="function"?he({x:ge,y:me}):{x:ge,y:me};ge=ve.x,me=ve.y;var ye=oe.hasOwnProperty("x"),we=oe.hasOwnProperty("y"),Se=left,_e=top,Ce=window;if(ce){var Le=getOffsetParent(J),Pe="clientHeight",Ie="clientWidth";if(Le===getWindow(J)&&(Le=getDocumentElement(J),getComputedStyle$1(Le).position!=="static"&&de==="absolute"&&(Pe="scrollHeight",Ie="scrollWidth")),Le=Le,re===top||(re===left||re===right)&&ne===end){_e=bottom;var Ne=pe&&Le===Ce&&Ce.visualViewport?Ce.visualViewport.height:Le[Pe];me-=Ne-te.height,me*=ue?1:-1}if(re===left||(re===top||re===bottom)&&ne===end){Se=right;var qe=pe&&Le===Ce&&Ce.visualViewport?Ce.visualViewport.width:Le[Ie];ge-=qe-te.width,ge*=ue?1:-1}}var Ae=Object.assign({position:de},ce&&unsetSides),De=he===!0?roundOffsetsByDPR({x:ge,y:me},getWindow(J)):{x:ge,y:me};if(ge=De.x,me=De.y,ue){var Me;return Object.assign({},Ae,(Me={},Me[_e]=we?"0":"",Me[Se]=ye?"0":"",Me.transform=(Ce.devicePixelRatio||1)<=1?"translate("+ge+"px, "+me+"px)":"translate3d("+ge+"px, "+me+"px, 0)",Me))}return Object.assign({},Ae,(W={},W[_e]=we?me+"px":"",W[Se]=ye?ge+"px":"",W.transform="",W))}function computeStyles(X){var W=X.state,J=X.options,te=J.gpuAcceleration,re=te===void 0?!0:te,ne=J.adaptive,oe=ne===void 0?!0:ne,de=J.roundOffsets,ue=de===void 0?!0:de,ce={placement:getBasePlacement(W.placement),variation:getVariation(W.placement),popper:W.elements.popper,popperRect:W.rects.popper,gpuAcceleration:re,isFixed:W.options.strategy==="fixed"};W.modifiersData.popperOffsets!=null&&(W.styles.popper=Object.assign({},W.styles.popper,mapToStyles(Object.assign({},ce,{offsets:W.modifiersData.popperOffsets,position:W.options.strategy,adaptive:oe,roundOffsets:ue})))),W.modifiersData.arrow!=null&&(W.styles.arrow=Object.assign({},W.styles.arrow,mapToStyles(Object.assign({},ce,{offsets:W.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ue})))),W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-placement":W.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(X){var W=X.state,J=X.instance,te=X.options,re=te.scroll,ne=re===void 0?!0:re,oe=te.resize,de=oe===void 0?!0:oe,ue=getWindow(W.elements.popper),ce=[].concat(W.scrollParents.reference,W.scrollParents.popper);return ne&&ce.forEach(function(he){he.addEventListener("scroll",J.update,passive)}),de&&ue.addEventListener("resize",J.update,passive),function(){ne&&ce.forEach(function(he){he.removeEventListener("scroll",J.update,passive)}),de&&ue.removeEventListener("resize",J.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(X){return X.replace(/left|right|bottom|top/g,function(W){return hash$1[W]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(X){return X.replace(/start|end/g,function(W){return hash[W]})}function getWindowScroll(X){var W=getWindow(X),J=W.pageXOffset,te=W.pageYOffset;return{scrollLeft:J,scrollTop:te}}function getWindowScrollBarX(X){return getBoundingClientRect(getDocumentElement(X)).left+getWindowScroll(X).scrollLeft}function getViewportRect(X,W){var J=getWindow(X),te=getDocumentElement(X),re=J.visualViewport,ne=te.clientWidth,oe=te.clientHeight,de=0,ue=0;if(re){ne=re.width,oe=re.height;var ce=isLayoutViewport();(ce||!ce&&W==="fixed")&&(de=re.offsetLeft,ue=re.offsetTop)}return{width:ne,height:oe,x:de+getWindowScrollBarX(X),y:ue}}function getDocumentRect(X){var W,J=getDocumentElement(X),te=getWindowScroll(X),re=(W=X.ownerDocument)==null?void 0:W.body,ne=max(J.scrollWidth,J.clientWidth,re?re.scrollWidth:0,re?re.clientWidth:0),oe=max(J.scrollHeight,J.clientHeight,re?re.scrollHeight:0,re?re.clientHeight:0),de=-te.scrollLeft+getWindowScrollBarX(X),ue=-te.scrollTop;return getComputedStyle$1(re||J).direction==="rtl"&&(de+=max(J.clientWidth,re?re.clientWidth:0)-ne),{width:ne,height:oe,x:de,y:ue}}function isScrollParent(X){var W=getComputedStyle$1(X),J=W.overflow,te=W.overflowX,re=W.overflowY;return/auto|scroll|overlay|hidden/.test(J+re+te)}function getScrollParent(X){return["html","body","#document"].indexOf(getNodeName(X))>=0?X.ownerDocument.body:isHTMLElement(X)&&isScrollParent(X)?X:getScrollParent(getParentNode(X))}function listScrollParents(X,W){var J;W===void 0&&(W=[]);var te=getScrollParent(X),re=te===((J=X.ownerDocument)==null?void 0:J.body),ne=getWindow(te),oe=re?[ne].concat(ne.visualViewport||[],isScrollParent(te)?te:[]):te,de=W.concat(oe);return re?de:de.concat(listScrollParents(getParentNode(oe)))}function rectToClientRect(X){return Object.assign({},X,{left:X.x,top:X.y,right:X.x+X.width,bottom:X.y+X.height})}function getInnerBoundingClientRect(X,W){var J=getBoundingClientRect(X,!1,W==="fixed");return J.top=J.top+X.clientTop,J.left=J.left+X.clientLeft,J.bottom=J.top+X.clientHeight,J.right=J.left+X.clientWidth,J.width=X.clientWidth,J.height=X.clientHeight,J.x=J.left,J.y=J.top,J}function getClientRectFromMixedType(X,W,J){return W===viewport?rectToClientRect(getViewportRect(X,J)):isElement(W)?getInnerBoundingClientRect(W,J):rectToClientRect(getDocumentRect(getDocumentElement(X)))}function getClippingParents(X){var W=listScrollParents(getParentNode(X)),J=["absolute","fixed"].indexOf(getComputedStyle$1(X).position)>=0,te=J&&isHTMLElement(X)?getOffsetParent(X):X;return isElement(te)?W.filter(function(re){return isElement(re)&&contains(re,te)&&getNodeName(re)!=="body"}):[]}function getClippingRect(X,W,J,te){var re=W==="clippingParents"?getClippingParents(X):[].concat(W),ne=[].concat(re,[J]),oe=ne[0],de=ne.reduce(function(ue,ce){var he=getClientRectFromMixedType(X,ce,te);return ue.top=max(he.top,ue.top),ue.right=min(he.right,ue.right),ue.bottom=min(he.bottom,ue.bottom),ue.left=max(he.left,ue.left),ue},getClientRectFromMixedType(X,oe,te));return de.width=de.right-de.left,de.height=de.bottom-de.top,de.x=de.left,de.y=de.top,de}function computeOffsets(X){var W=X.reference,J=X.element,te=X.placement,re=te?getBasePlacement(te):null,ne=te?getVariation(te):null,oe=W.x+W.width/2-J.width/2,de=W.y+W.height/2-J.height/2,ue;switch(re){case top:ue={x:oe,y:W.y-J.height};break;case bottom:ue={x:oe,y:W.y+W.height};break;case right:ue={x:W.x+W.width,y:de};break;case left:ue={x:W.x-J.width,y:de};break;default:ue={x:W.x,y:W.y}}var ce=re?getMainAxisFromPlacement(re):null;if(ce!=null){var he=ce==="y"?"height":"width";switch(ne){case start:ue[ce]=ue[ce]-(W[he]/2-J[he]/2);break;case end:ue[ce]=ue[ce]+(W[he]/2-J[he]/2);break}}return ue}function detectOverflow(X,W){W===void 0&&(W={});var J=W,te=J.placement,re=te===void 0?X.placement:te,ne=J.strategy,oe=ne===void 0?X.strategy:ne,de=J.boundary,ue=de===void 0?clippingParents:de,ce=J.rootBoundary,he=ce===void 0?viewport:ce,pe=J.elementContext,fe=pe===void 0?popper:pe,ge=J.altBoundary,be=ge===void 0?!1:ge,me=J.padding,ve=me===void 0?0:me,ye=mergePaddingObject(typeof ve!="number"?ve:expandToHashMap(ve,basePlacements)),we=fe===popper?reference:popper,Se=X.rects.popper,_e=X.elements[be?we:fe],Ce=getClippingRect(isElement(_e)?_e:_e.contextElement||getDocumentElement(X.elements.popper),ue,he,oe),Le=getBoundingClientRect(X.elements.reference),Pe=computeOffsets({reference:Le,element:Se,strategy:"absolute",placement:re}),Ie=rectToClientRect(Object.assign({},Se,Pe)),Ne=fe===popper?Ie:Le,qe={top:Ce.top-Ne.top+ye.top,bottom:Ne.bottom-Ce.bottom+ye.bottom,left:Ce.left-Ne.left+ye.left,right:Ne.right-Ce.right+ye.right},Ae=X.modifiersData.offset;if(fe===popper&&Ae){var De=Ae[re];Object.keys(qe).forEach(function(Me){var Be=[right,bottom].indexOf(Me)>=0?1:-1,Ve=[top,bottom].indexOf(Me)>=0?"y":"x";qe[Me]+=De[Ve]*Be})}return qe}function computeAutoPlacement(X,W){W===void 0&&(W={});var J=W,te=J.placement,re=J.boundary,ne=J.rootBoundary,oe=J.padding,de=J.flipVariations,ue=J.allowedAutoPlacements,ce=ue===void 0?placements:ue,he=getVariation(te),pe=he?de?variationPlacements:variationPlacements.filter(function(be){return getVariation(be)===he}):basePlacements,fe=pe.filter(function(be){return ce.indexOf(be)>=0});fe.length===0&&(fe=pe);var ge=fe.reduce(function(be,me){return be[me]=detectOverflow(X,{placement:me,boundary:re,rootBoundary:ne,padding:oe})[getBasePlacement(me)],be},{});return Object.keys(ge).sort(function(be,me){return ge[be]-ge[me]})}function getExpandedFallbackPlacements(X){if(getBasePlacement(X)===auto)return[];var W=getOppositePlacement(X);return[getOppositeVariationPlacement(X),W,getOppositeVariationPlacement(W)]}function flip(X){var W=X.state,J=X.options,te=X.name;if(!W.modifiersData[te]._skip){for(var re=J.mainAxis,ne=re===void 0?!0:re,oe=J.altAxis,de=oe===void 0?!0:oe,ue=J.fallbackPlacements,ce=J.padding,he=J.boundary,pe=J.rootBoundary,fe=J.altBoundary,ge=J.flipVariations,be=ge===void 0?!0:ge,me=J.allowedAutoPlacements,ve=W.options.placement,ye=getBasePlacement(ve),we=ye===ve,Se=ue||(we||!be?[getOppositePlacement(ve)]:getExpandedFallbackPlacements(ve)),_e=[ve].concat(Se).reduce(function(Xe,Ke){return Xe.concat(getBasePlacement(Ke)===auto?computeAutoPlacement(W,{placement:Ke,boundary:he,rootBoundary:pe,padding:ce,flipVariations:be,allowedAutoPlacements:me}):Ke)},[]),Ce=W.rects.reference,Le=W.rects.popper,Pe=new Map,Ie=!0,Ne=_e[0],qe=0;qe<_e.length;qe++){var Ae=_e[qe],De=getBasePlacement(Ae),Me=getVariation(Ae)===start,Be=[top,bottom].indexOf(De)>=0,Ve=Be?"width":"height",Je=detectOverflow(W,{placement:Ae,boundary:he,rootBoundary:pe,altBoundary:fe,padding:ce}),Ye=Be?Me?right:left:Me?bottom:top;Ce[Ve]>Le[Ve]&&(Ye=getOppositePlacement(Ye));var kt=getOppositePlacement(Ye),Qe=[];if(ne&&Qe.push(Je[De]<=0),de&&Qe.push(Je[Ye]<=0,Je[kt]<=0),Qe.every(function(Xe){return Xe})){Ne=Ae,Ie=!1;break}Pe.set(Ae,Qe)}if(Ie)for(var We=be?3:1,Fe=function(Ke){var je=_e.find(function(Ze){var nt=Pe.get(Ze);if(nt)return nt.slice(0,Ke).every(function(ot){return ot})});if(je)return Ne=je,"break"},He=We;He>0;He--){var Ge=Fe(He);if(Ge==="break")break}W.placement!==Ne&&(W.modifiersData[te]._skip=!0,W.placement=Ne,W.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(X,W,J){return J===void 0&&(J={x:0,y:0}),{top:X.top-W.height-J.y,right:X.right-W.width+J.x,bottom:X.bottom-W.height+J.y,left:X.left-W.width-J.x}}function isAnySideFullyClipped(X){return[top,right,bottom,left].some(function(W){return X[W]>=0})}function hide(X){var W=X.state,J=X.name,te=W.rects.reference,re=W.rects.popper,ne=W.modifiersData.preventOverflow,oe=detectOverflow(W,{elementContext:"reference"}),de=detectOverflow(W,{altBoundary:!0}),ue=getSideOffsets(oe,te),ce=getSideOffsets(de,re,ne),he=isAnySideFullyClipped(ue),pe=isAnySideFullyClipped(ce);W.modifiersData[J]={referenceClippingOffsets:ue,popperEscapeOffsets:ce,isReferenceHidden:he,hasPopperEscaped:pe},W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-reference-hidden":he,"data-popper-escaped":pe})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(X,W,J){var te=getBasePlacement(X),re=[left,top].indexOf(te)>=0?-1:1,ne=typeof J=="function"?J(Object.assign({},W,{placement:X})):J,oe=ne[0],de=ne[1];return oe=oe||0,de=(de||0)*re,[left,right].indexOf(te)>=0?{x:de,y:oe}:{x:oe,y:de}}function offset$1(X){var W=X.state,J=X.options,te=X.name,re=J.offset,ne=re===void 0?[0,0]:re,oe=placements.reduce(function(he,pe){return he[pe]=distanceAndSkiddingToXY(pe,W.rects,ne),he},{}),de=oe[W.placement],ue=de.x,ce=de.y;W.modifiersData.popperOffsets!=null&&(W.modifiersData.popperOffsets.x+=ue,W.modifiersData.popperOffsets.y+=ce),W.modifiersData[te]=oe}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(X){var W=X.state,J=X.name;W.modifiersData[J]=computeOffsets({reference:W.rects.reference,element:W.rects.popper,strategy:"absolute",placement:W.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(X){return X==="x"?"y":"x"}function preventOverflow(X){var W=X.state,J=X.options,te=X.name,re=J.mainAxis,ne=re===void 0?!0:re,oe=J.altAxis,de=oe===void 0?!1:oe,ue=J.boundary,ce=J.rootBoundary,he=J.altBoundary,pe=J.padding,fe=J.tether,ge=fe===void 0?!0:fe,be=J.tetherOffset,me=be===void 0?0:be,ve=detectOverflow(W,{boundary:ue,rootBoundary:ce,padding:pe,altBoundary:he}),ye=getBasePlacement(W.placement),we=getVariation(W.placement),Se=!we,_e=getMainAxisFromPlacement(ye),Ce=getAltAxis(_e),Le=W.modifiersData.popperOffsets,Pe=W.rects.reference,Ie=W.rects.popper,Ne=typeof me=="function"?me(Object.assign({},W.rects,{placement:W.placement})):me,qe=typeof Ne=="number"?{mainAxis:Ne,altAxis:Ne}:Object.assign({mainAxis:0,altAxis:0},Ne),Ae=W.modifiersData.offset?W.modifiersData.offset[W.placement]:null,De={x:0,y:0};if(Le){if(ne){var Me,Be=_e==="y"?top:left,Ve=_e==="y"?bottom:right,Je=_e==="y"?"height":"width",Ye=Le[_e],kt=Ye+ve[Be],Qe=Ye-ve[Ve],We=ge?-Ie[Je]/2:0,Fe=we===start?Pe[Je]:Ie[Je],He=we===start?-Ie[Je]:-Pe[Je],Ge=W.elements.arrow,Xe=ge&&Ge?getLayoutRect(Ge):{width:0,height:0},Ke=W.modifiersData["arrow#persistent"]?W.modifiersData["arrow#persistent"].padding:getFreshSideObject(),je=Ke[Be],Ze=Ke[Ve],nt=within(0,Pe[Je],Xe[Je]),ot=Se?Pe[Je]/2-We-nt-je-qe.mainAxis:Fe-nt-je-qe.mainAxis,Ct=Se?-Pe[Je]/2+We+nt+Ze+qe.mainAxis:He+nt+Ze+qe.mainAxis,Lt=W.elements.arrow&&getOffsetParent(W.elements.arrow),Bt=Lt?_e==="y"?Lt.clientTop||0:Lt.clientLeft||0:0,jt=(Me=Ae==null?void 0:Ae[_e])!=null?Me:0,Kt=Ye+ot-jt-Bt,ei=Ye+Ct-jt,mi=within(ge?min(kt,Kt):kt,Ye,ge?max(Qe,ei):Qe);Le[_e]=mi,De[_e]=mi-Ye}if(de){var di,xt=_e==="x"?top:left,St=_e==="x"?bottom:right,qt=Le[Ce],Dt=Ce==="y"?"height":"width",Tt=qt+ve[xt],Gt=qt-ve[St],Wt=[top,left].indexOf(ye)!==-1,Yt=(di=Ae==null?void 0:Ae[Ce])!=null?di:0,pi=Wt?Tt:qt-Pe[Dt]-Ie[Dt]-Yt+qe.altAxis,yi=Wt?qt+Pe[Dt]+Ie[Dt]-Yt-qe.altAxis:Gt,ai=ge&&Wt?withinMaxClamp(pi,qt,yi):within(ge?pi:Tt,qt,ge?yi:Gt);Le[Ce]=ai,De[Ce]=ai-qt}W.modifiersData[te]=De}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(X){return{scrollLeft:X.scrollLeft,scrollTop:X.scrollTop}}function getNodeScroll(X){return X===getWindow(X)||!isHTMLElement(X)?getWindowScroll(X):getHTMLElementScroll(X)}function isElementScaled(X){var W=X.getBoundingClientRect(),J=round(W.width)/X.offsetWidth||1,te=round(W.height)/X.offsetHeight||1;return J!==1||te!==1}function getCompositeRect(X,W,J){J===void 0&&(J=!1);var te=isHTMLElement(W),re=isHTMLElement(W)&&isElementScaled(W),ne=getDocumentElement(W),oe=getBoundingClientRect(X,re,J),de={scrollLeft:0,scrollTop:0},ue={x:0,y:0};return(te||!te&&!J)&&((getNodeName(W)!=="body"||isScrollParent(ne))&&(de=getNodeScroll(W)),isHTMLElement(W)?(ue=getBoundingClientRect(W,!0),ue.x+=W.clientLeft,ue.y+=W.clientTop):ne&&(ue.x=getWindowScrollBarX(ne))),{x:oe.left+de.scrollLeft-ue.x,y:oe.top+de.scrollTop-ue.y,width:oe.width,height:oe.height}}function order(X){var W=new Map,J=new Set,te=[];X.forEach(function(ne){W.set(ne.name,ne)});function re(ne){J.add(ne.name);var oe=[].concat(ne.requires||[],ne.requiresIfExists||[]);oe.forEach(function(de){if(!J.has(de)){var ue=W.get(de);ue&&re(ue)}}),te.push(ne)}return X.forEach(function(ne){J.has(ne.name)||re(ne)}),te}function orderModifiers(X){var W=order(X);return modifierPhases.reduce(function(J,te){return J.concat(W.filter(function(re){return re.phase===te}))},[])}function debounce(X){var W;return function(){return W||(W=new Promise(function(J){Promise.resolve().then(function(){W=void 0,J(X())})})),W}}function mergeByName(X){var W=X.reduce(function(J,te){var re=J[te.name];return J[te.name]=re?Object.assign({},re,te,{options:Object.assign({},re.options,te.options),data:Object.assign({},re.data,te.data)}):te,J},{});return Object.keys(W).map(function(J){return W[J]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var X=arguments.length,W=new Array(X),J=0;J<X;J++)W[J]=arguments[J];return!W.some(function(te){return!(te&&typeof te.getBoundingClientRect=="function")})}function popperGenerator(X){X===void 0&&(X={});var W=X,J=W.defaultModifiers,te=J===void 0?[]:J,re=W.defaultOptions,ne=re===void 0?DEFAULT_OPTIONS:re;return function(de,ue,ce){ce===void 0&&(ce=ne);var he={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,ne),modifiersData:{},elements:{reference:de,popper:ue},attributes:{},styles:{}},pe=[],fe=!1,ge={state:he,setOptions:function(ye){var we=typeof ye=="function"?ye(he.options):ye;me(),he.options=Object.assign({},ne,he.options,we),he.scrollParents={reference:isElement(de)?listScrollParents(de):de.contextElement?listScrollParents(de.contextElement):[],popper:listScrollParents(ue)};var Se=orderModifiers(mergeByName([].concat(te,he.options.modifiers)));return he.orderedModifiers=Se.filter(function(_e){return _e.enabled}),be(),ge.update()},forceUpdate:function(){if(!fe){var ye=he.elements,we=ye.reference,Se=ye.popper;if(areValidElements(we,Se)){he.rects={reference:getCompositeRect(we,getOffsetParent(Se),he.options.strategy==="fixed"),popper:getLayoutRect(Se)},he.reset=!1,he.placement=he.options.placement,he.orderedModifiers.forEach(function(qe){return he.modifiersData[qe.name]=Object.assign({},qe.data)});for(var _e=0;_e<he.orderedModifiers.length;_e++){if(he.reset===!0){he.reset=!1,_e=-1;continue}var Ce=he.orderedModifiers[_e],Le=Ce.fn,Pe=Ce.options,Ie=Pe===void 0?{}:Pe,Ne=Ce.name;typeof Le=="function"&&(he=Le({state:he,options:Ie,name:Ne,instance:ge})||he)}}}},update:debounce(function(){return new Promise(function(ve){ge.forceUpdate(),ve(he)})}),destroy:function(){me(),fe=!0}};if(!areValidElements(de,ue))return ge;ge.setOptions(ce).then(function(ve){!fe&&ce.onFirstUpdate&&ce.onFirstUpdate(ve)});function be(){he.orderedModifiers.forEach(function(ve){var ye=ve.name,we=ve.options,Se=we===void 0?{}:we,_e=ve.effect;if(typeof _e=="function"){var Ce=_e({state:he,name:ye,instance:ge,options:Se}),Le=function(){};pe.push(Ce||Le)}})}function me(){pe.forEach(function(ve){return ve()}),pe=[]}return ge}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$2,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers});const i$u=":host{display:block;width:-moz-max-content;width:max-content;opacity:0;visibility:hidden;z-index:999}:host(.visible){opacity:1;visibility:visible}.dss-action-menu{border-radius:var(--dss-radius-sm);box-shadow:0 1px 3px #0000001a,0 4px 8px 3px #0000000d;min-width:160px;width:-moz-max-content;width:max-content;max-width:280px;background-color:var(--color-white);overflow:hidden}.dss-action-menu--full-width{width:100%}",n$s=X=>ke$1`
|
|
749
787
|
<ul
|
|
750
788
|
class=${Rt({"dss-action-menu":!0,"dss-action-menu--full-width":!!X._fullWidth})}
|
|
751
789
|
aria-label="Menu d'accions"
|
|
@@ -1232,7 +1270,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
1232
1270
|
</div>
|
|
1233
1271
|
`}
|
|
1234
1272
|
</div>
|
|
1235
|
-
`}};l$k([n$w({type:Number})],o$v.prototype,"internalSelectedCounter",2),l$k([n$w(o$J)],o$v.prototype,"hideHeader",1),l$k([n$w(o$J)],o$v.prototype,"hidePaginator",1),l$k([n$w({type:Array})],o$v.prototype,"columnsHeader",1),l$k([n$w({type:Array})],o$v.prototype,"data",1),l$k([n$w(o$J)],o$v.prototype,"multiselect",1),l$k([n$w(o$J)],o$v.prototype,"radioselect",1),l$k([n$w({type:String})],o$v.prototype,"selectedRowsLabel",1),l$k([n$w({type:Number})],o$v.prototype,"selectedRowsCounter",1),l$k([n$w(o$J)],o$v.prototype,"showConfig",2),l$k([n$w({type:String})],o$v.prototype,"configTableLabel",2),l$k([n$w({type:String})],o$v.prototype,"tableTitle",1),l$k([n$w({type:Array})],o$v.prototype,"filters",1),l$k([n$w(o$J)],o$v.prototype,"innerFilters",1),l$k([n$w(o$J)],o$v.prototype,"expandTable",1),l$k([n$w({type:String})],o$v.prototype,"expandLabel",1),l$k([n$w({type:String})],o$v.prototype,"collapseLabel",1),l$k([n$w({type:String})],o$v.prototype,"filtersLabel",1),l$k([n$w({type:String})],o$v.prototype,"cleanFiltersLabel",1),l$k([n$w({type:String})],o$v.prototype,"noFiltersLabel",1),l$k([n$w(o$J)],o$v.prototype,"hideHeaderTitleAndExpand",1),l$k([n$w(o$J)],o$v.prototype,"disableSorting",1),l$k([n$w({type:Number})],o$v.prototype,"totalResults",1),l$k([n$w({type:Number})],o$v.prototype,"currentIndex",1),l$k([n$w({type:Number})],o$v.prototype,"pageSize",1),l$k([n$w({type:Array})],o$v.prototype,"pageSizeOptions",1),l$k([n$w({type:String})],o$v.prototype,"resultsLabel",1),l$k([n$w({type:String})],o$v.prototype,"rowsPerPageLabel",1),l$k([n$w(o$J)],o$v.prototype,"hidePaginationResults",1),l$k([n$w(o$J)],o$v.prototype,"pageSizeOptionsDisabled",1),l$k([n$w(o$J)],o$v.prototype,"hideFooter",1),l$k([n$w({type:Number})],o$v.prototype,"fixedColumnsBefore",2),l$k([n$w({type:Number})],o$v.prototype,"fixedColumnsAfter",2),l$k([n$w({type:String})],o$v.prototype,"tableInfo",2);const O$1=er`dss-calendar${tr(f$j())}`,e$x=er`dss-icon${tr(f$j())}`,Z=X=>{var W,J,te,re,ne,oe,de,ue,ce,he,pe,fe,ge,be,me,ve,ye,we,Se,_e,Ce,Le,Pe,Ie,
|
|
1273
|
+
`}};l$k([n$w({type:Number})],o$v.prototype,"internalSelectedCounter",2),l$k([n$w(o$J)],o$v.prototype,"hideHeader",1),l$k([n$w(o$J)],o$v.prototype,"hidePaginator",1),l$k([n$w({type:Array})],o$v.prototype,"columnsHeader",1),l$k([n$w({type:Array})],o$v.prototype,"data",1),l$k([n$w(o$J)],o$v.prototype,"multiselect",1),l$k([n$w(o$J)],o$v.prototype,"radioselect",1),l$k([n$w({type:String})],o$v.prototype,"selectedRowsLabel",1),l$k([n$w({type:Number})],o$v.prototype,"selectedRowsCounter",1),l$k([n$w(o$J)],o$v.prototype,"showConfig",2),l$k([n$w({type:String})],o$v.prototype,"configTableLabel",2),l$k([n$w({type:String})],o$v.prototype,"tableTitle",1),l$k([n$w({type:Array})],o$v.prototype,"filters",1),l$k([n$w(o$J)],o$v.prototype,"innerFilters",1),l$k([n$w(o$J)],o$v.prototype,"expandTable",1),l$k([n$w({type:String})],o$v.prototype,"expandLabel",1),l$k([n$w({type:String})],o$v.prototype,"collapseLabel",1),l$k([n$w({type:String})],o$v.prototype,"filtersLabel",1),l$k([n$w({type:String})],o$v.prototype,"cleanFiltersLabel",1),l$k([n$w({type:String})],o$v.prototype,"noFiltersLabel",1),l$k([n$w(o$J)],o$v.prototype,"hideHeaderTitleAndExpand",1),l$k([n$w(o$J)],o$v.prototype,"disableSorting",1),l$k([n$w({type:Number})],o$v.prototype,"totalResults",1),l$k([n$w({type:Number})],o$v.prototype,"currentIndex",1),l$k([n$w({type:Number})],o$v.prototype,"pageSize",1),l$k([n$w({type:Array})],o$v.prototype,"pageSizeOptions",1),l$k([n$w({type:String})],o$v.prototype,"resultsLabel",1),l$k([n$w({type:String})],o$v.prototype,"rowsPerPageLabel",1),l$k([n$w(o$J)],o$v.prototype,"hidePaginationResults",1),l$k([n$w(o$J)],o$v.prototype,"pageSizeOptionsDisabled",1),l$k([n$w(o$J)],o$v.prototype,"hideFooter",1),l$k([n$w({type:Number})],o$v.prototype,"fixedColumnsBefore",2),l$k([n$w({type:Number})],o$v.prototype,"fixedColumnsAfter",2),l$k([n$w({type:String})],o$v.prototype,"tableInfo",2);const O$1=er`dss-calendar${tr(f$j())}`,e$x=er`dss-icon${tr(f$j())}`,Z=X=>{var W,J,te,re,ne,oe,de,ue,ce,he,pe,fe,ge,be,me,ve,ye,we,Se,_e,Ce,Le,Pe,Ie,Ne,qe,Ae,De,Me;const Be={"dss-datepicker-range--sm":X.inputSize!=="lg"},Ve={"dss-datepicker-range-help--invalid":X._invalid||!((W=X._inputRangeStart)!=null&&W.validity.valid)&&((J=X._inputRangeStart)==null?void 0:J.value)!==""||!((te=X._inputRangeEnd)!=null&&te.validity.valid)&&((re=X._inputRangeEnd)==null?void 0:re.value)!=="","dss-datepicker-range-help--disabled":((ne=X._inputRangeStart)==null?void 0:ne.disabled)&&((oe=X._inputRangeEnd)==null?void 0:oe.disabled)},Je={"dss-input-wrapper":!0,"dss-input-wrapper--required":(de=X._inputRangeStart)==null?void 0:de.required,"dss-input-wrapper--disabled":(ue=X._inputRangeStart)==null?void 0:ue.disabled,[`dss-input-wrapper--${X.inputSize}`]:!!X.inputSize},Ye={"dss-input-wrapper":!0,"dss-input-wrapper--required":(ce=X._inputRangeEnd)==null?void 0:ce.required,"dss-input-wrapper--disabled":(he=X._inputRangeEnd)==null?void 0:he.disabled,[`dss-input-wrapper--${X.inputSize}`]:!!X.inputSize},kt={"dss-input-group":!0,[`dss-input-group--${X.inputSize}`]:!!X.inputSize,"dss-input-group--invalid":X._invalid||!((pe=X._inputRangeStart)!=null&&pe.validity.valid)&&((fe=X._inputRangeStart)==null?void 0:fe.value)!=="","dss-input-group--required":(ge=X._inputRangeStart)==null?void 0:ge.required,"dss-input-group--disabled":(be=X._inputRangeStart)==null?void 0:be.disabled,"dss-input-group--focused":((me=X._inputRangeStart)==null?void 0:me.value)||X._isStartFocused||X._copyInputRangeStartPlaceholder,"dss-input-group--read-only":(ve=X._inputRangeStart)==null?void 0:ve.readOnly},Qe={"dss-input-group":!0,[`dss-input-group--${X.inputSize}`]:!!X.inputSize,"dss-input-group--invalid":X._invalid||!((ye=X._inputRangeEnd)!=null&&ye.validity.valid)&&((we=X._inputRangeEnd)==null?void 0:we.value)!=="","dss-input-group--required":(Se=X._inputRangeEnd)==null?void 0:Se.required,"dss-input-group--disabled":(_e=X._inputRangeEnd)==null?void 0:_e.disabled,"dss-input-group--focused":((Ce=X._inputRangeEnd)==null?void 0:Ce.value)||X._isEndFocused||X._copyInputRangeEndPlaceholder,"dss-input-group--read-only":(Le=X._inputRangeEnd)==null?void 0:Le.readOnly},We={"dss-calendar":!0,"dss-calendar--visible":X._showCalendar&&!((Pe=X._inputRangeStart)!=null&&Pe.readOnly)&&!((Ie=X._inputRangeEnd)!=null&&Ie.readOnly),"dss-calendar--disabled":((Ne=X._inputRangeStart)==null?void 0:Ne.disabled)&&((qe=X._inputRangeEnd)==null?void 0:qe.disabled),"dss-calendar--sm":X.inputSize!=="lg"};return ke`
|
|
1236
1274
|
<div class="dss-datepicker-range ${Rt(Be)}">
|
|
1237
1275
|
<div
|
|
1238
1276
|
class="dss-datepicker-range-inputs"
|
|
@@ -2439,7 +2477,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
2439
2477
|
`,ge=ke`<span
|
|
2440
2478
|
class="dss-icon--checked"
|
|
2441
2479
|
style="visibility: ${pe}"
|
|
2442
|
-
></span>`,be=Se=>{this._manuallySelect(Se,J.value)},me=Se=>{var _e,Ce,Le,Pe;if(Se.key==="Enter"||Se.key===" ")this._manuallySelect(Se,J.value);else if(Se.key==="ArrowUp"){const Ie=Se.target,
|
|
2480
|
+
></span>`,be=Se=>{this._manuallySelect(Se,J.value)},me=Se=>{var _e,Ce,Le,Pe;if(Se.key==="Enter"||Se.key===" ")this._manuallySelect(Se,J.value);else if(Se.key==="ArrowUp"){const Ie=Se.target,Ne=(Ce=(_e=Ie==null?void 0:Ie.closest(".dss-form-field"))==null?void 0:_e.previousElementSibling)==null?void 0:Ce.querySelector("input");Ne==null||Ne.focus()}else if(Se.key==="ArrowDown"){const Ie=Se.target,Ne=(Pe=(Le=Ie==null?void 0:Ie.closest(".dss-form-field"))==null?void 0:Le.nextElementSibling)==null?void 0:Pe.querySelector("input");Ne==null||Ne.focus()}},[ve,ye]=this._getIndexSubtext(J.label);let we=ke`${J.label}`;if(ve!==-1&&ye!==-1){const Se=J.label.slice(0,ve),_e=J.label.slice(ve,ye),Ce=J.label.slice(ye);we=ke`${Se}<span class="bold">${_e}</span>${Ce}`}return ke`
|
|
2443
2481
|
<div
|
|
2444
2482
|
class="${ce}"
|
|
2445
2483
|
@keyup="${me}"
|
|
@@ -6524,32 +6562,32 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
6524
6562
|
* Copyright (c) 2013, salesforce.com
|
|
6525
6563
|
*/(function(X,W){(function(te,re){X.exports=re()})(typeof self<"u"?self:commonjsGlobal,function(){return function(J){var te={};function re(ne){if(te[ne])return te[ne].exports;var oe=te[ne]={i:ne,l:!1,exports:{}};return J[ne].call(oe.exports,oe,oe.exports,re),oe.l=!0,oe.exports}return re.m=J,re.c=te,re.d=function(ne,oe,de){re.o(ne,oe)||Object.defineProperty(ne,oe,{configurable:!1,enumerable:!0,get:de})},re.n=function(ne){var oe=ne&&ne.__esModule?function(){return ne.default}:function(){return ne};return re.d(oe,"a",oe),oe},re.o=function(ne,oe){return Object.prototype.hasOwnProperty.call(ne,oe)},re.p="",re(re.s=110)}([function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(17),oe=re(18),de=re(19),ue=re(46),ce=re(47),he=re(48),pe=re(49),fe=re(50),ge=re(12),be=re(32),me=re(33),ve=re(31),ye=re(1),we={Scope:ye.Scope,create:ye.create,find:ye.find,query:ye.query,register:ye.register,Container:ne.default,Format:oe.default,Leaf:de.default,Embed:pe.default,Scroll:ue.default,Block:he.default,Inline:ce.default,Text:fe.default,Attributor:{Attribute:ge.default,Class:be.default,Style:me.default,Store:ve.default}};te.default=we},function(J,te,re){var ne=this&&this.__extends||function(){var ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,we){ye.__proto__=we}||function(ye,we){for(var Se in we)we.hasOwnProperty(Se)&&(ye[Se]=we[Se])};return function(ye,we){ve(ye,we);function Se(){this.constructor=ye}ye.prototype=we===null?Object.create(we):(Se.prototype=we.prototype,new Se)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=function(ve){ne(ye,ve);function ye(we){var Se=this;return we="[Parchment] "+we,Se=ve.call(this,we)||this,Se.message=we,Se.name=Se.constructor.name,Se}return ye}(Error);te.ParchmentError=oe;var de={},ue={},ce={},he={};te.DATA_KEY="__blot";var pe;(function(ve){ve[ve.TYPE=3]="TYPE",ve[ve.LEVEL=12]="LEVEL",ve[ve.ATTRIBUTE=13]="ATTRIBUTE",ve[ve.BLOT=14]="BLOT",ve[ve.INLINE=7]="INLINE",ve[ve.BLOCK=11]="BLOCK",ve[ve.BLOCK_BLOT=10]="BLOCK_BLOT",ve[ve.INLINE_BLOT=6]="INLINE_BLOT",ve[ve.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",ve[ve.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",ve[ve.ANY=15]="ANY"})(pe=te.Scope||(te.Scope={}));function fe(ve,ye){var we=be(ve);if(we==null)throw new oe("Unable to create "+ve+" blot");var Se=we,_e=ve instanceof Node||ve.nodeType===Node.TEXT_NODE?ve:Se.create(ye);return new Se(_e,ye)}te.create=fe;function ge(ve,ye){return ye===void 0&&(ye=!1),ve==null?null:ve[te.DATA_KEY]!=null?ve[te.DATA_KEY].blot:ye?ge(ve.parentNode,ye):null}te.find=ge;function be(ve,ye){ye===void 0&&(ye=pe.ANY);var we;if(typeof ve=="string")we=he[ve]||de[ve];else if(ve instanceof Text||ve.nodeType===Node.TEXT_NODE)we=he.text;else if(typeof ve=="number")ve&pe.LEVEL&pe.BLOCK?we=he.block:ve&pe.LEVEL&pe.INLINE&&(we=he.inline);else if(ve instanceof HTMLElement){var Se=(ve.getAttribute("class")||"").split(/\s+/);for(var _e in Se)if(we=ue[Se[_e]],we)break;we=we||ce[ve.tagName]}return we==null?null:ye&pe.LEVEL&we.scope&&ye&pe.TYPE&we.scope?we:null}te.query=be;function me(){for(var ve=[],ye=0;ye<arguments.length;ye++)ve[ye]=arguments[ye];if(ve.length>1)return ve.map(function(_e){return me(_e)});var we=ve[0];if(typeof we.blotName!="string"&&typeof we.attrName!="string")throw new oe("Invalid definition");if(we.blotName==="abstract")throw new oe("Cannot register abstract class");if(he[we.blotName||we.attrName]=we,typeof we.keyName=="string")de[we.keyName]=we;else if(we.className!=null&&(ue[we.className]=we),we.tagName!=null){Array.isArray(we.tagName)?we.tagName=we.tagName.map(function(_e){return _e.toUpperCase()}):we.tagName=we.tagName.toUpperCase();var Se=Array.isArray(we.tagName)?we.tagName:[we.tagName];Se.forEach(function(_e){(ce[_e]==null||we.className==null)&&(ce[_e]=we)})}return we}te.register=me},function(J,te,re){var ne=re(52),oe=re(11),de=re(3),ue=re(20),ce="\0",he=function(pe){Array.isArray(pe)?this.ops=pe:pe!=null&&Array.isArray(pe.ops)?this.ops=pe.ops:this.ops=[]};he.prototype.insert=function(pe,fe){var ge={};return pe.length===0?this:(ge.insert=pe,fe!=null&&typeof fe=="object"&&Object.keys(fe).length>0&&(ge.attributes=fe),this.push(ge))},he.prototype.delete=function(pe){return pe<=0?this:this.push({delete:pe})},he.prototype.retain=function(pe,fe){if(pe<=0)return this;var ge={retain:pe};return fe!=null&&typeof fe=="object"&&Object.keys(fe).length>0&&(ge.attributes=fe),this.push(ge)},he.prototype.push=function(pe){var fe=this.ops.length,ge=this.ops[fe-1];if(pe=de(!0,{},pe),typeof ge=="object"){if(typeof pe.delete=="number"&&typeof ge.delete=="number")return this.ops[fe-1]={delete:ge.delete+pe.delete},this;if(typeof ge.delete=="number"&&pe.insert!=null&&(fe-=1,ge=this.ops[fe-1],typeof ge!="object"))return this.ops.unshift(pe),this;if(oe(pe.attributes,ge.attributes)){if(typeof pe.insert=="string"&&typeof ge.insert=="string")return this.ops[fe-1]={insert:ge.insert+pe.insert},typeof pe.attributes=="object"&&(this.ops[fe-1].attributes=pe.attributes),this;if(typeof pe.retain=="number"&&typeof ge.retain=="number")return this.ops[fe-1]={retain:ge.retain+pe.retain},typeof pe.attributes=="object"&&(this.ops[fe-1].attributes=pe.attributes),this}}return fe===this.ops.length?this.ops.push(pe):this.ops.splice(fe,0,pe),this},he.prototype.chop=function(){var pe=this.ops[this.ops.length-1];return pe&&pe.retain&&!pe.attributes&&this.ops.pop(),this},he.prototype.filter=function(pe){return this.ops.filter(pe)},he.prototype.forEach=function(pe){this.ops.forEach(pe)},he.prototype.map=function(pe){return this.ops.map(pe)},he.prototype.partition=function(pe){var fe=[],ge=[];return this.forEach(function(be){var me=pe(be)?fe:ge;me.push(be)}),[fe,ge]},he.prototype.reduce=function(pe,fe){return this.ops.reduce(pe,fe)},he.prototype.changeLength=function(){return this.reduce(function(pe,fe){return fe.insert?pe+ue.length(fe):fe.delete?pe-fe.delete:pe},0)},he.prototype.length=function(){return this.reduce(function(pe,fe){return pe+ue.length(fe)},0)},he.prototype.slice=function(pe,fe){pe=pe||0,typeof fe!="number"&&(fe=1/0);for(var ge=[],be=ue.iterator(this.ops),me=0;me<fe&&be.hasNext();){var ve;me<pe?ve=be.next(pe-me):(ve=be.next(fe-me),ge.push(ve)),me+=ue.length(ve)}return new he(ge)},he.prototype.compose=function(pe){var fe=ue.iterator(this.ops),ge=ue.iterator(pe.ops),be=[],me=ge.peek();if(me!=null&&typeof me.retain=="number"&&me.attributes==null){for(var ve=me.retain;fe.peekType()==="insert"&&fe.peekLength()<=ve;)ve-=fe.peekLength(),be.push(fe.next());me.retain-ve>0&&ge.next(me.retain-ve)}for(var ye=new he(be);fe.hasNext()||ge.hasNext();)if(ge.peekType()==="insert")ye.push(ge.next());else if(fe.peekType()==="delete")ye.push(fe.next());else{var we=Math.min(fe.peekLength(),ge.peekLength()),Se=fe.next(we),_e=ge.next(we);if(typeof _e.retain=="number"){var Ce={};typeof Se.retain=="number"?Ce.retain=we:Ce.insert=Se.insert;var Le=ue.attributes.compose(Se.attributes,_e.attributes,typeof Se.retain=="number");if(Le&&(Ce.attributes=Le),ye.push(Ce),!ge.hasNext()&&oe(ye.ops[ye.ops.length-1],Ce)){var Pe=new he(fe.rest());return ye.concat(Pe).chop()}}else typeof _e.delete=="number"&&typeof Se.retain=="number"&&ye.push(_e)}return ye.chop()},he.prototype.concat=function(pe){var fe=new he(this.ops.slice());return pe.ops.length>0&&(fe.push(pe.ops[0]),fe.ops=fe.ops.concat(pe.ops.slice(1))),fe},he.prototype.diff=function(pe,fe){if(this.ops===pe.ops)return new he;var ge=[this,pe].map(function(we){return we.map(function(Se){if(Se.insert!=null)return typeof Se.insert=="string"?Se.insert:ce;var _e=we===pe?"on":"with";throw new Error("diff() called "+_e+" non-document")}).join("")}),be=new he,me=ne(ge[0],ge[1],fe),ve=ue.iterator(this.ops),ye=ue.iterator(pe.ops);return me.forEach(function(we){for(var Se=we[1].length;Se>0;){var _e=0;switch(we[0]){case ne.INSERT:_e=Math.min(ye.peekLength(),Se),be.push(ye.next(_e));break;case ne.DELETE:_e=Math.min(Se,ve.peekLength()),ve.next(_e),be.delete(_e);break;case ne.EQUAL:_e=Math.min(ve.peekLength(),ye.peekLength(),Se);var Ce=ve.next(_e),Le=ye.next(_e);oe(Ce.insert,Le.insert)?be.retain(_e,ue.attributes.diff(Ce.attributes,Le.attributes)):be.push(Le).delete(_e);break}Se-=_e}}),be.chop()},he.prototype.eachLine=function(pe,fe){fe=fe||`
|
|
6526
6564
|
`;for(var ge=ue.iterator(this.ops),be=new he,me=0;ge.hasNext();){if(ge.peekType()!=="insert")return;var ve=ge.peek(),ye=ue.length(ve)-ge.peekLength(),we=typeof ve.insert=="string"?ve.insert.indexOf(fe,ye)-ye:-1;if(we<0)be.push(ge.next());else if(we>0)be.push(ge.next(we));else{if(pe(be,ge.next(1).attributes||{},me)===!1)return;me+=1,be=new he}}be.length()>0&&pe(be,{},me)},he.prototype.transform=function(pe,fe){if(fe=!!fe,typeof pe=="number")return this.transformPosition(pe,fe);for(var ge=ue.iterator(this.ops),be=ue.iterator(pe.ops),me=new he;ge.hasNext()||be.hasNext();)if(ge.peekType()==="insert"&&(fe||be.peekType()!=="insert"))me.retain(ue.length(ge.next()));else if(be.peekType()==="insert")me.push(be.next());else{var ve=Math.min(ge.peekLength(),be.peekLength()),ye=ge.next(ve),we=be.next(ve);if(ye.delete)continue;we.delete?me.push(we):me.retain(ve,ue.attributes.transform(ye.attributes,we.attributes,fe))}return me.chop()},he.prototype.transformPosition=function(pe,fe){fe=!!fe;for(var ge=ue.iterator(this.ops),be=0;ge.hasNext()&&be<=pe;){var me=ge.peekLength(),ve=ge.peekType();if(ge.next(),ve==="delete"){pe-=Math.min(me,pe-be);continue}else ve==="insert"&&(be<pe||!fe)&&(pe+=me);be+=me}return pe},J.exports=he},function(J,te){var re=Object.prototype.hasOwnProperty,ne=Object.prototype.toString,oe=Object.defineProperty,de=Object.getOwnPropertyDescriptor,ue=function(ge){return typeof Array.isArray=="function"?Array.isArray(ge):ne.call(ge)==="[object Array]"},ce=function(ge){if(!ge||ne.call(ge)!=="[object Object]")return!1;var be=re.call(ge,"constructor"),me=ge.constructor&&ge.constructor.prototype&&re.call(ge.constructor.prototype,"isPrototypeOf");if(ge.constructor&&!be&&!me)return!1;var ve;for(ve in ge);return typeof ve>"u"||re.call(ge,ve)},he=function(ge,be){oe&&be.name==="__proto__"?oe(ge,be.name,{enumerable:!0,configurable:!0,value:be.newValue,writable:!0}):ge[be.name]=be.newValue},pe=function(ge,be){if(be==="__proto__")if(re.call(ge,be)){if(de)return de(ge,be).value}else return;return ge[be]};J.exports=function fe(){var ge,be,me,ve,ye,we,Se=arguments[0],_e=1,Ce=arguments.length,Le=!1;for(typeof Se=="boolean"&&(Le=Se,Se=arguments[1]||{},_e=2),(Se==null||typeof Se!="object"&&typeof Se!="function")&&(Se={});_e<Ce;++_e)if(ge=arguments[_e],ge!=null)for(be in ge)me=pe(Se,be),ve=pe(ge,be),Se!==ve&&(Le&&ve&&(ce(ve)||(ye=ue(ve)))?(ye?(ye=!1,we=me&&ue(me)?me:[]):we=me&&ce(me)?me:{},he(Se,{name:be,newValue:fe(Le,we,ve)})):typeof ve<"u"&&he(Se,{name:be,newValue:ve}));return Se}},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.BlockEmbed=te.bubbleFormats=void 0;var ne=function(){function Ae(De,Me){for(var Be=0;Be<Me.length;Be++){var Ve=Me[Be];Ve.enumerable=Ve.enumerable||!1,Ve.configurable=!0,"value"in Ve&&(Ve.writable=!0),Object.defineProperty(De,Ve.key,Ve)}}return function(De,Me,Be){return Me&&Ae(De.prototype,Me),Be&&Ae(De,Be),De}}(),oe=function Ae(De,Me,Be){De===null&&(De=Function.prototype);var Ve=Object.getOwnPropertyDescriptor(De,Me);if(Ve===void 0){var Je=Object.getPrototypeOf(De);return Je===null?void 0:Ae(Je,Me,Be)}else{if("value"in Ve)return Ve.value;var Ye=Ve.get;return Ye===void 0?void 0:Ye.call(Be)}},de=re(3),ue=Se(de),ce=re(2),he=Se(ce),pe=re(0),fe=Se(pe),ge=re(16),be=Se(ge),me=re(6),ve=Se(me),ye=re(7),we=Se(ye);function Se(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}function _e(Ae,De){if(!(Ae instanceof De))throw new TypeError("Cannot call a class as a function")}function Ce(Ae,De){if(!Ae)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return De&&(typeof De=="object"||typeof De=="function")?De:Ae}function Le(Ae,De){if(typeof De!="function"&&De!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof De);Ae.prototype=Object.create(De&&De.prototype,{constructor:{value:Ae,enumerable:!1,writable:!0,configurable:!0}}),De&&(Object.setPrototypeOf?Object.setPrototypeOf(Ae,De):Ae.__proto__=De)}var Pe=1,Ie=function(Ae){Le(De,Ae);function De(){return _e(this,De),Ce(this,(De.__proto__||Object.getPrototypeOf(De)).apply(this,arguments))}return ne(De,[{key:"attach",value:function(){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"attach",this).call(this),this.attributes=new fe.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new he.default().insert(this.value(),(0,ue.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(Be,Ve){var Je=fe.default.query(Be,fe.default.Scope.BLOCK_ATTRIBUTE);Je!=null&&this.attributes.attribute(Je,Ve)}},{key:"formatAt",value:function(Be,Ve,Je,Ye){this.format(Je,Ye)}},{key:"insertAt",value:function(Be,Ve,Je){if(typeof Ve=="string"&&Ve.endsWith(`
|
|
6527
|
-
`)){var Ye=fe.default.create(
|
|
6565
|
+
`)){var Ye=fe.default.create(Ne.blotName);this.parent.insertBefore(Ye,Be===0?this:this.next),Ye.insertAt(0,Ve.slice(0,-1))}else oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"insertAt",this).call(this,Be,Ve,Je)}}]),De}(fe.default.Embed);Ie.scope=fe.default.Scope.BLOCK_BLOT;var Ne=function(Ae){Le(De,Ae);function De(Me){_e(this,De);var Be=Ce(this,(De.__proto__||Object.getPrototypeOf(De)).call(this,Me));return Be.cache={},Be}return ne(De,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(fe.default.Leaf).reduce(function(Be,Ve){return Ve.length()===0?Be:Be.insert(Ve.value(),qe(Ve))},new he.default).insert(`
|
|
6528
6566
|
`,qe(this))),this.cache.delta}},{key:"deleteAt",value:function(Be,Ve){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"deleteAt",this).call(this,Be,Ve),this.cache={}}},{key:"formatAt",value:function(Be,Ve,Je,Ye){Ve<=0||(fe.default.query(Je,fe.default.Scope.BLOCK)?Be+Ve===this.length()&&this.format(Je,Ye):oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"formatAt",this).call(this,Be,Math.min(Ve,this.length()-Be-1),Je,Ye),this.cache={})}},{key:"insertAt",value:function(Be,Ve,Je){if(Je!=null)return oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"insertAt",this).call(this,Be,Ve,Je);if(Ve.length!==0){var Ye=Ve.split(`
|
|
6529
|
-
`),kt=Ye.shift();kt.length>0&&(Be<this.length()-1||this.children.tail==null?oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"insertAt",this).call(this,Math.min(Be,this.length()-1),kt):this.children.tail.insertAt(this.children.tail.length(),kt),this.cache={});var Qe=this;Ye.reduce(function(We,Ne){return Qe=Qe.split(We,!0),Qe.insertAt(0,Ne),Ne.length},Be+kt.length)}}},{key:"insertBefore",value:function(Be,Ve){var Je=this.children.head;oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"insertBefore",this).call(this,Be,Ve),Je instanceof be.default&&Je.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"length",this).call(this)+Pe),this.cache.length}},{key:"moveChildren",value:function(Be,Ve){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"moveChildren",this).call(this,Be,Ve),this.cache={}}},{key:"optimize",value:function(Be){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"optimize",this).call(this,Be),this.cache={}}},{key:"path",value:function(Be){return oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"path",this).call(this,Be,!0)}},{key:"removeChild",value:function(Be){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"removeChild",this).call(this,Be),this.cache={}}},{key:"split",value:function(Be){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ve&&(Be===0||Be>=this.length()-Pe)){var Je=this.clone();return Be===0?(this.parent.insertBefore(Je,this),this):(this.parent.insertBefore(Je,this.next),Je)}else{var Ye=oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"split",this).call(this,Be,Ve);return this.cache={},Ye}}}]),De}(fe.default.Block);Fe.blotName="block",Fe.tagName="P",Fe.defaultChild="break",Fe.allowedChildren=[ve.default,fe.default.Embed,we.default];function qe(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ae==null||(typeof Ae.formats=="function"&&(De=(0,ue.default)(De,Ae.formats())),Ae.parent==null||Ae.parent.blotName=="scroll"||Ae.parent.statics.scope!==Ae.statics.scope)?De:qe(Ae.parent,De)}te.bubbleFormats=qe,te.BlockEmbed=Ie,te.default=Fe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.overload=te.expandConfig=void 0;var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Qe){return typeof Qe}:function(Qe){return Qe&&typeof Symbol=="function"&&Qe.constructor===Symbol&&Qe!==Symbol.prototype?"symbol":typeof Qe},oe=function(){function Qe(We,Ne){var He=[],Ge=!0,Xe=!1,Ke=void 0;try{for(var je=We[Symbol.iterator](),Ze;!(Ge=(Ze=je.next()).done)&&(He.push(Ze.value),!(Ne&&He.length===Ne));Ge=!0);}catch(nt){Xe=!0,Ke=nt}finally{try{!Ge&&je.return&&je.return()}finally{if(Xe)throw Ke}}return He}return function(We,Ne){if(Array.isArray(We))return We;if(Symbol.iterator in Object(We))return Qe(We,Ne);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),de=function(){function Qe(We,Ne){for(var He=0;He<Ne.length;He++){var Ge=Ne[He];Ge.enumerable=Ge.enumerable||!1,Ge.configurable=!0,"value"in Ge&&(Ge.writable=!0),Object.defineProperty(We,Ge.key,Ge)}}return function(We,Ne,He){return Ne&&Qe(We.prototype,Ne),He&&Qe(We,He),We}}();re(51);var ue=re(2),ce=qe(ue),he=re(14),pe=qe(he),fe=re(8),ge=qe(fe),be=re(9),me=qe(be),ve=re(0),ye=qe(ve),we=re(15),Se=qe(we),_e=re(3),Ce=qe(_e),Le=re(10),Pe=qe(Le),Ie=re(35),Fe=qe(Ie);function qe(Qe){return Qe&&Qe.__esModule?Qe:{default:Qe}}function Ae(Qe,We,Ne){return We in Qe?Object.defineProperty(Qe,We,{value:Ne,enumerable:!0,configurable:!0,writable:!0}):Qe[We]=Ne,Qe}function De(Qe,We){if(!(Qe instanceof We))throw new TypeError("Cannot call a class as a function")}var Me=(0,Pe.default)("quill"),Be=function(){de(Qe,null,[{key:"debug",value:function(Ne){Ne===!0&&(Ne="log"),Pe.default.level(Ne)}},{key:"find",value:function(Ne){return Ne.__quill||ye.default.find(Ne)}},{key:"import",value:function(Ne){return this.imports[Ne]==null&&Me.error("Cannot import "+Ne+". Are you sure it was registered?"),this.imports[Ne]}},{key:"register",value:function(Ne,He){var Ge=this,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof Ne!="string"){var Ke=Ne.attrName||Ne.blotName;typeof Ke=="string"?this.register("formats/"+Ke,Ne,He):Object.keys(Ne).forEach(function(je){Ge.register(je,Ne[je],He)})}else this.imports[Ne]!=null&&!Xe&&Me.warn("Overwriting "+Ne+" with",He),this.imports[Ne]=He,(Ne.startsWith("blots/")||Ne.startsWith("formats/"))&&He.blotName!=="abstract"?ye.default.register(He):Ne.startsWith("modules")&&typeof He.register=="function"&&He.register()}}]);function Qe(We){var Ne=this,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(De(this,Qe),this.options=Ve(We,He),this.container=this.options.container,this.container==null)return Me.error("Invalid Quill container",We);this.options.debug&&Qe.debug(this.options.debug);var Ge=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new ge.default,this.scroll=ye.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new pe.default(this.scroll),this.selection=new Se.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(ge.default.events.EDITOR_CHANGE,function(Ke){Ke===ge.default.events.TEXT_CHANGE&&Ne.root.classList.toggle("ql-blank",Ne.editor.isBlank())}),this.emitter.on(ge.default.events.SCROLL_UPDATE,function(Ke,je){var Ze=Ne.selection.lastRange,nt=Ze&&Ze.length===0?Ze.index:void 0;Je.call(Ne,function(){return Ne.editor.update(null,je,nt)},Ke)});var Xe=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+Ge+"<p><br></p></div>");this.setContents(Xe),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return de(Qe,[{key:"addContainer",value:function(Ne){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof Ne=="string"){var Ge=Ne;Ne=document.createElement("div"),Ne.classList.add(Ge)}return this.container.insertBefore(Ne,He),Ne}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(Ne,He,Ge){var Xe=this,Ke=Ye(Ne,He,Ge),je=oe(Ke,4);return Ne=je[0],He=je[1],Ge=je[3],Je.call(this,function(){return Xe.editor.deleteText(Ne,He)},Ge,Ne,-1*He)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(Ne),this.container.classList.toggle("ql-disabled",!Ne)}},{key:"focus",value:function(){var Ne=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=Ne,this.scrollIntoView()}},{key:"format",value:function(Ne,He){var Ge=this,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ge.default.sources.API;return Je.call(this,function(){var Ke=Ge.getSelection(!0),je=new ce.default;if(Ke==null)return je;if(ye.default.query(Ne,ye.default.Scope.BLOCK))je=Ge.editor.formatLine(Ke.index,Ke.length,Ae({},Ne,He));else{if(Ke.length===0)return Ge.selection.format(Ne,He),je;je=Ge.editor.formatText(Ke.index,Ke.length,Ae({},Ne,He))}return Ge.setSelection(Ke,ge.default.sources.SILENT),je},Xe)}},{key:"formatLine",value:function(Ne,He,Ge,Xe,Ke){var je=this,Ze=void 0,nt=Ye(Ne,He,Ge,Xe,Ke),ot=oe(nt,4);return Ne=ot[0],He=ot[1],Ze=ot[2],Ke=ot[3],Je.call(this,function(){return je.editor.formatLine(Ne,He,Ze)},Ke,Ne,0)}},{key:"formatText",value:function(Ne,He,Ge,Xe,Ke){var je=this,Ze=void 0,nt=Ye(Ne,He,Ge,Xe,Ke),ot=oe(nt,4);return Ne=ot[0],He=ot[1],Ze=ot[2],Ke=ot[3],Je.call(this,function(){return je.editor.formatText(Ne,He,Ze)},Ke,Ne,0)}},{key:"getBounds",value:function(Ne){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ge=void 0;typeof Ne=="number"?Ge=this.selection.getBounds(Ne,He):Ge=this.selection.getBounds(Ne.index,Ne.length);var Xe=this.container.getBoundingClientRect();return{bottom:Ge.bottom-Xe.top,height:Ge.height,left:Ge.left-Xe.left,right:Ge.right-Xe.left,top:Ge.top-Xe.top,width:Ge.width}}},{key:"getContents",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-Ne,Ge=Ye(Ne,He),Xe=oe(Ge,2);return Ne=Xe[0],He=Xe[1],this.editor.getContents(Ne,He)}},{key:"getFormat",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof Ne=="number"?this.editor.getFormat(Ne,He):this.editor.getFormat(Ne.index,Ne.length)}},{key:"getIndex",value:function(Ne){return Ne.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(Ne){return this.scroll.leaf(Ne)}},{key:"getLine",value:function(Ne){return this.scroll.line(Ne)}},{key:"getLines",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof Ne!="number"?this.scroll.lines(Ne.index,Ne.length):this.scroll.lines(Ne,He)}},{key:"getModule",value:function(Ne){return this.theme.modules[Ne]}},{key:"getSelection",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return Ne&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-Ne,Ge=Ye(Ne,He),Xe=oe(Ge,2);return Ne=Xe[0],He=Xe[1],this.editor.getText(Ne,He)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(Ne,He,Ge){var Xe=this,Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Qe.sources.API;return Je.call(this,function(){return Xe.editor.insertEmbed(Ne,He,Ge)},Ke,Ne)}},{key:"insertText",value:function(Ne,He,Ge,Xe,Ke){var je=this,Ze=void 0,nt=Ye(Ne,0,Ge,Xe,Ke),ot=oe(nt,4);return Ne=ot[0],Ze=ot[2],Ke=ot[3],Je.call(this,function(){return je.editor.insertText(Ne,He,Ze)},Ke,Ne,He.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(Ne,He,Ge){this.clipboard.dangerouslyPasteHTML(Ne,He,Ge)}},{key:"removeFormat",value:function(Ne,He,Ge){var Xe=this,Ke=Ye(Ne,He,Ge),je=oe(Ke,4);return Ne=je[0],He=je[1],Ge=je[3],Je.call(this,function(){return Xe.editor.removeFormat(Ne,He)},Ge,Ne)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(Ne){var He=this,Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.default.sources.API;return Je.call(this,function(){Ne=new ce.default(Ne);var Xe=He.getLength(),Ke=He.editor.deleteText(0,Xe),je=He.editor.applyDelta(Ne),Ze=je.ops[je.ops.length-1];Ze!=null&&typeof Ze.insert=="string"&&Ze.insert[Ze.insert.length-1]===`
|
|
6530
|
-
`&&(He.editor.deleteText(He.getLength()-1,1),je.delete(1));var nt=Ke.compose(je);return nt},Ge)}},{key:"setSelection",value:function(Ne,He,Ge){if(Ne==null)this.selection.setRange(null,He||Qe.sources.API);else{var Xe=Ye(Ne,He,Ge),Ke=oe(Xe,4);Ne=Ke[0],He=Ke[1],Ge=Ke[3],this.selection.setRange(new we.Range(Ne,He),Ge),Ge!==ge.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(Ne){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.default.sources.API,Ge=new ce.default().insert(Ne);return this.setContents(Ge,He)}},{key:"update",value:function(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ge.default.sources.USER,He=this.scroll.update(Ne);return this.selection.update(Ne),He}},{key:"updateContents",value:function(Ne){var He=this,Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.default.sources.API;return Je.call(this,function(){return Ne=new ce.default(Ne),He.editor.applyDelta(Ne,Ge)},Ge,!0)}}]),Qe}();Be.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},Be.events=ge.default.events,Be.sources=ge.default.sources,Be.version="1.3.6",Be.imports={delta:ce.default,parchment:ye.default,"core/module":me.default,"core/theme":Fe.default};function Ve(Qe,We){if(We=(0,Ce.default)(!0,{container:Qe,modules:{clipboard:!0,keyboard:!0,history:!0}},We),!We.theme||We.theme===Be.DEFAULTS.theme)We.theme=Fe.default;else if(We.theme=Be.import("themes/"+We.theme),We.theme==null)throw new Error("Invalid theme "+We.theme+". Did you register it?");var Ne=(0,Ce.default)(!0,{},We.theme.DEFAULTS);[Ne,We].forEach(function(Xe){Xe.modules=Xe.modules||{},Object.keys(Xe.modules).forEach(function(Ke){Xe.modules[Ke]===!0&&(Xe.modules[Ke]={})})});var He=Object.keys(Ne.modules).concat(Object.keys(We.modules)),Ge=He.reduce(function(Xe,Ke){var je=Be.import("modules/"+Ke);return je==null?Me.error("Cannot load "+Ke+" module. Are you sure you registered it?"):Xe[Ke]=je.DEFAULTS||{},Xe},{});return We.modules!=null&&We.modules.toolbar&&We.modules.toolbar.constructor!==Object&&(We.modules.toolbar={container:We.modules.toolbar}),We=(0,Ce.default)(!0,{},Be.DEFAULTS,{modules:Ge},Ne,We),["bounds","container","scrollingContainer"].forEach(function(Xe){typeof We[Xe]=="string"&&(We[Xe]=document.querySelector(We[Xe]))}),We.modules=Object.keys(We.modules).reduce(function(Xe,Ke){return We.modules[Ke]&&(Xe[Ke]=We.modules[Ke]),Xe},{}),We}function Je(Qe,We,Ne,He){if(this.options.strict&&!this.isEnabled()&&We===ge.default.sources.USER)return new ce.default;var Ge=Ne==null?null:this.getSelection(),Xe=this.editor.delta,Ke=Qe();if(Ge!=null&&(Ne===!0&&(Ne=Ge.index),He==null?Ge=kt(Ge,Ke,We):He!==0&&(Ge=kt(Ge,Ne,He,We)),this.setSelection(Ge,ge.default.sources.SILENT)),Ke.length()>0){var je,Ze=[ge.default.events.TEXT_CHANGE,Ke,Xe,We];if((je=this.emitter).emit.apply(je,[ge.default.events.EDITOR_CHANGE].concat(Ze)),We!==ge.default.sources.SILENT){var nt;(nt=this.emitter).emit.apply(nt,Ze)}}return Ke}function Ye(Qe,We,Ne,He,Ge){var Xe={};return typeof Qe.index=="number"&&typeof Qe.length=="number"?typeof We!="number"?(Ge=He,He=Ne,Ne=We,We=Qe.length,Qe=Qe.index):(We=Qe.length,Qe=Qe.index):typeof We!="number"&&(Ge=He,He=Ne,Ne=We,We=0),(typeof Ne>"u"?"undefined":ne(Ne))==="object"?(Xe=Ne,Ge=He):typeof Ne=="string"&&(He!=null?Xe[Ne]=He:Ge=Ne),Ge=Ge||ge.default.sources.API,[Qe,We,Xe,Ge]}function kt(Qe,We,Ne,He){if(Qe==null)return null;var Ge=void 0,Xe=void 0;if(We instanceof ce.default){var Ke=[Qe.index,Qe.index+Qe.length].map(function(ot){return We.transformPosition(ot,He!==ge.default.sources.USER)}),je=oe(Ke,2);Ge=je[0],Xe=je[1]}else{var Ze=[Qe.index,Qe.index+Qe.length].map(function(ot){return ot<We||ot===We&&He===ge.default.sources.USER?ot:Ne>=0?ot+Ne:Math.max(We,ot+Ne)}),nt=oe(Ze,2);Ge=nt[0],Xe=nt[1]}return new we.Range(Ge,Xe-Ge)}te.expandConfig=Ve,te.overload=Ye,te.default=Be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(7),ue=pe(de),ce=re(0),he=pe(ce);function pe(ve){return ve&&ve.__esModule?ve:{default:ve}}function fe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function ge(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function be(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var me=function(ve){be(ye,ve);function ye(){return fe(this,ye),ge(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"formatAt",value:function(Se,_e,Ce,Le){if(ye.compare(this.statics.blotName,Ce)<0&&he.default.query(Ce,he.default.Scope.BLOT)){var Pe=this.isolate(Se,_e);Le&&Pe.wrap(Ce,Le)}else oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"formatAt",this).call(this,Se,_e,Ce,Le)}},{key:"optimize",value:function(Se){if(oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"optimize",this).call(this,Se),this.parent instanceof ye&&ye.compare(this.statics.blotName,this.parent.statics.blotName)>0){var _e=this.parent.isolate(this.offset(),this.length());this.moveChildren(_e),_e.wrap(this)}}}],[{key:"compare",value:function(Se,_e){var Ce=ye.order.indexOf(Se),Le=ye.order.indexOf(_e);return Ce>=0||Le>=0?Ce-Le:Se===_e?0:Se<_e?-1:1}}]),ye}(he.default.Inline);me.allowedChildren=[me,he.default.Embed,ue.default],me.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(0),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default.Text);te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function Ce(Le,Pe){for(var Ie=0;Ie<Pe.length;Ie++){var Fe=Pe[Ie];Fe.enumerable=Fe.enumerable||!1,Fe.configurable=!0,"value"in Fe&&(Fe.writable=!0),Object.defineProperty(Le,Fe.key,Fe)}}return function(Le,Pe,Ie){return Pe&&Ce(Le.prototype,Pe),Ie&&Ce(Le,Ie),Le}}(),oe=function Ce(Le,Pe,Ie){Le===null&&(Le=Function.prototype);var Fe=Object.getOwnPropertyDescriptor(Le,Pe);if(Fe===void 0){var qe=Object.getPrototypeOf(Le);return qe===null?void 0:Ce(qe,Pe,Ie)}else{if("value"in Fe)return Fe.value;var Ae=Fe.get;return Ae===void 0?void 0:Ae.call(Ie)}},de=re(55),ue=fe(de),ce=re(10),he=fe(ce),pe=re(34);function fe(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}function ge(Ce,Le){if(!(Ce instanceof Le))throw new TypeError("Cannot call a class as a function")}function be(Ce,Le){if(!Ce)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Ce}function me(Ce,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Ce.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Ce,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Ce,Le):Ce.__proto__=Le)}var ve=(0,he.default)("quill:events"),ye=[pe.SHADOW_SELECTIONCHANGE,"mousedown","mouseup","click"],we=[],Se="getRootNode"in document;ye.forEach(function(Ce){document.addEventListener(Ce,function(){for(var Le=arguments.length,Pe=Array(Le),Ie=0;Ie<Le;Ie++)Pe[Ie]=arguments[Ie];we.forEach(function(Fe){Fe.handleDOM.apply(Fe,Pe)})})});var _e=function(Ce){me(Le,Ce);function Le(){ge(this,Le);var Pe=be(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this));return Pe.listeners={},we.push(Pe),Pe.on("error",ve.error),Pe}return ne(Le,[{key:"emit",value:function(){ve.log.apply(ve,arguments),oe(Le.prototype.__proto__||Object.getPrototypeOf(Le.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(Ie){for(var Fe=arguments.length,qe=Array(Fe>1?Fe-1:0),Ae=1;Ae<Fe;Ae++)qe[Ae-1]=arguments[Ae];var De=Ie.composedPath?Ie.composedPath()[0]:Ie.target,Me=function(Ve,Je){if(!Se||Je.getRootNode()===document)return Ve.contains(Je);for(;!Ve.contains(Je);){var Ye=Je.getRootNode();if(!Ye||!Ye.host)return!1;Je=Ye.host}return!0};(this.listeners[Ie.type]||[]).forEach(function(Be){var Ve=Be.node,Je=Be.handler;(De===Ve||Me(Ve,De))&&Je.apply(void 0,[Ie].concat(qe))})}},{key:"listenDOM",value:function(Ie,Fe,qe){this.listeners[Ie]||(this.listeners[Ie]=[]),this.listeners[Ie].push({node:Fe,handler:qe})}}]),Le}(ue.default);_e.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},_e.sources={API:"api",SILENT:"silent",USER:"user"},te.default=_e},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});function ne(de,ue){if(!(de instanceof ue))throw new TypeError("Cannot call a class as a function")}var oe=function de(ue){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ne(this,de),this.quill=ue,this.options=ce};oe.DEFAULTS={},te.default=oe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=["error","warn","log","info"],oe="warn";function de(ce){if(ne.indexOf(ce)<=ne.indexOf(oe)){for(var he,pe=arguments.length,fe=Array(pe>1?pe-1:0),ge=1;ge<pe;ge++)fe[ge-1]=arguments[ge];(he=console)[ce].apply(he,fe)}}function ue(ce){return ne.reduce(function(he,pe){return he[pe]=de.bind(console,pe,ce),he},{})}de.level=ue.level=function(ce){oe=ce},te.default=ue},function(J,te,re){var ne=Array.prototype.slice,oe=re(53),de=re(54),ue=J.exports=function(fe,ge,be){return be||(be={}),fe===ge?!0:fe instanceof Date&&ge instanceof Date?fe.getTime()===ge.getTime():!fe||!ge||typeof fe!="object"&&typeof ge!="object"?be.strict?fe===ge:fe==ge:pe(fe,ge,be)};function ce(fe){return fe==null}function he(fe){return!(!fe||typeof fe!="object"||typeof fe.length!="number"||typeof fe.copy!="function"||typeof fe.slice!="function"||fe.length>0&&typeof fe[0]!="number")}function pe(fe,ge,be){var me,ve;if(ce(fe)||ce(ge)||fe.prototype!==ge.prototype)return!1;if(de(fe))return de(ge)?(fe=ne.call(fe),ge=ne.call(ge),ue(fe,ge,be)):!1;if(he(fe)){if(!he(ge)||fe.length!==ge.length)return!1;for(me=0;me<fe.length;me++)if(fe[me]!==ge[me])return!1;return!0}try{var ye=oe(fe),we=oe(ge)}catch{return!1}if(ye.length!=we.length)return!1;for(ye.sort(),we.sort(),me=ye.length-1;me>=0;me--)if(ye[me]!=we[me])return!1;for(me=ye.length-1;me>=0;me--)if(ve=ye[me],!ue(fe[ve],ge[ve],be))return!1;return typeof fe==typeof ge}},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(1),oe=function(){function de(ue,ce,he){he===void 0&&(he={}),this.attrName=ue,this.keyName=ce;var pe=ne.Scope.TYPE&ne.Scope.ATTRIBUTE;he.scope!=null?this.scope=he.scope&ne.Scope.LEVEL|pe:this.scope=ne.Scope.ATTRIBUTE,he.whitelist!=null&&(this.whitelist=he.whitelist)}return de.keys=function(ue){return[].map.call(ue.attributes,function(ce){return ce.name})},de.prototype.add=function(ue,ce){return this.canAdd(ue,ce)?(ue.setAttribute(this.keyName,ce),!0):!1},de.prototype.canAdd=function(ue,ce){var he=ne.query(ue,ne.Scope.BLOT&(this.scope|ne.Scope.TYPE));return he==null?!1:this.whitelist==null?!0:typeof ce=="string"?this.whitelist.indexOf(ce.replace(/["']/g,""))>-1:this.whitelist.indexOf(ce)>-1},de.prototype.remove=function(ue){ue.removeAttribute(this.keyName)},de.prototype.value=function(ue){var ce=ue.getAttribute(this.keyName);return this.canAdd(ue,ce)&&ce?ce:""},de}();te.default=oe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.Code=void 0;var ne=function(){function Ie(Fe,qe){var Ae=[],De=!0,Me=!1,Be=void 0;try{for(var Ve=Fe[Symbol.iterator](),Je;!(De=(Je=Ve.next()).done)&&(Ae.push(Je.value),!(qe&&Ae.length===qe));De=!0);}catch(Ye){Me=!0,Be=Ye}finally{try{!De&&Ve.return&&Ve.return()}finally{if(Me)throw Be}}return Ae}return function(Fe,qe){if(Array.isArray(Fe))return Fe;if(Symbol.iterator in Object(Fe))return Ie(Fe,qe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function Ie(Fe,qe){for(var Ae=0;Ae<qe.length;Ae++){var De=qe[Ae];De.enumerable=De.enumerable||!1,De.configurable=!0,"value"in De&&(De.writable=!0),Object.defineProperty(Fe,De.key,De)}}return function(Fe,qe,Ae){return qe&&Ie(Fe.prototype,qe),Ae&&Ie(Fe,Ae),Fe}}(),de=function Ie(Fe,qe,Ae){Fe===null&&(Fe=Function.prototype);var De=Object.getOwnPropertyDescriptor(Fe,qe);if(De===void 0){var Me=Object.getPrototypeOf(Fe);return Me===null?void 0:Ie(Me,qe,Ae)}else{if("value"in De)return De.value;var Be=De.get;return Be===void 0?void 0:Be.call(Ae)}},ue=re(2),ce=we(ue),he=re(0),pe=we(he),fe=re(4),ge=we(fe),be=re(6),me=we(be),ve=re(7),ye=we(ve);function we(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}}function Se(Ie,Fe){if(!(Ie instanceof Fe))throw new TypeError("Cannot call a class as a function")}function _e(Ie,Fe){if(!Ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Fe&&(typeof Fe=="object"||typeof Fe=="function")?Fe:Ie}function Ce(Ie,Fe){if(typeof Fe!="function"&&Fe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Fe);Ie.prototype=Object.create(Fe&&Fe.prototype,{constructor:{value:Ie,enumerable:!1,writable:!0,configurable:!0}}),Fe&&(Object.setPrototypeOf?Object.setPrototypeOf(Ie,Fe):Ie.__proto__=Fe)}var Le=function(Ie){Ce(Fe,Ie);function Fe(){return Se(this,Fe),_e(this,(Fe.__proto__||Object.getPrototypeOf(Fe)).apply(this,arguments))}return Fe}(me.default);Le.blotName="code",Le.tagName="CODE";var Pe=function(Ie){Ce(Fe,Ie);function Fe(){return Se(this,Fe),_e(this,(Fe.__proto__||Object.getPrototypeOf(Fe)).apply(this,arguments))}return oe(Fe,[{key:"delta",value:function(){var Ae=this,De=this.domNode.textContent;return De.endsWith(`
|
|
6567
|
+
`),kt=Ye.shift();kt.length>0&&(Be<this.length()-1||this.children.tail==null?oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"insertAt",this).call(this,Math.min(Be,this.length()-1),kt):this.children.tail.insertAt(this.children.tail.length(),kt),this.cache={});var Qe=this;Ye.reduce(function(We,Fe){return Qe=Qe.split(We,!0),Qe.insertAt(0,Fe),Fe.length},Be+kt.length)}}},{key:"insertBefore",value:function(Be,Ve){var Je=this.children.head;oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"insertBefore",this).call(this,Be,Ve),Je instanceof be.default&&Je.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"length",this).call(this)+Pe),this.cache.length}},{key:"moveChildren",value:function(Be,Ve){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"moveChildren",this).call(this,Be,Ve),this.cache={}}},{key:"optimize",value:function(Be){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"optimize",this).call(this,Be),this.cache={}}},{key:"path",value:function(Be){return oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"path",this).call(this,Be,!0)}},{key:"removeChild",value:function(Be){oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"removeChild",this).call(this,Be),this.cache={}}},{key:"split",value:function(Be){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ve&&(Be===0||Be>=this.length()-Pe)){var Je=this.clone();return Be===0?(this.parent.insertBefore(Je,this),this):(this.parent.insertBefore(Je,this.next),Je)}else{var Ye=oe(De.prototype.__proto__||Object.getPrototypeOf(De.prototype),"split",this).call(this,Be,Ve);return this.cache={},Ye}}}]),De}(fe.default.Block);Ne.blotName="block",Ne.tagName="P",Ne.defaultChild="break",Ne.allowedChildren=[ve.default,fe.default.Embed,we.default];function qe(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ae==null||(typeof Ae.formats=="function"&&(De=(0,ue.default)(De,Ae.formats())),Ae.parent==null||Ae.parent.blotName=="scroll"||Ae.parent.statics.scope!==Ae.statics.scope)?De:qe(Ae.parent,De)}te.bubbleFormats=qe,te.BlockEmbed=Ie,te.default=Ne},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.overload=te.expandConfig=void 0;var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Qe){return typeof Qe}:function(Qe){return Qe&&typeof Symbol=="function"&&Qe.constructor===Symbol&&Qe!==Symbol.prototype?"symbol":typeof Qe},oe=function(){function Qe(We,Fe){var He=[],Ge=!0,Xe=!1,Ke=void 0;try{for(var je=We[Symbol.iterator](),Ze;!(Ge=(Ze=je.next()).done)&&(He.push(Ze.value),!(Fe&&He.length===Fe));Ge=!0);}catch(nt){Xe=!0,Ke=nt}finally{try{!Ge&&je.return&&je.return()}finally{if(Xe)throw Ke}}return He}return function(We,Fe){if(Array.isArray(We))return We;if(Symbol.iterator in Object(We))return Qe(We,Fe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),de=function(){function Qe(We,Fe){for(var He=0;He<Fe.length;He++){var Ge=Fe[He];Ge.enumerable=Ge.enumerable||!1,Ge.configurable=!0,"value"in Ge&&(Ge.writable=!0),Object.defineProperty(We,Ge.key,Ge)}}return function(We,Fe,He){return Fe&&Qe(We.prototype,Fe),He&&Qe(We,He),We}}();re(51);var ue=re(2),ce=qe(ue),he=re(14),pe=qe(he),fe=re(8),ge=qe(fe),be=re(9),me=qe(be),ve=re(0),ye=qe(ve),we=re(15),Se=qe(we),_e=re(3),Ce=qe(_e),Le=re(10),Pe=qe(Le),Ie=re(35),Ne=qe(Ie);function qe(Qe){return Qe&&Qe.__esModule?Qe:{default:Qe}}function Ae(Qe,We,Fe){return We in Qe?Object.defineProperty(Qe,We,{value:Fe,enumerable:!0,configurable:!0,writable:!0}):Qe[We]=Fe,Qe}function De(Qe,We){if(!(Qe instanceof We))throw new TypeError("Cannot call a class as a function")}var Me=(0,Pe.default)("quill"),Be=function(){de(Qe,null,[{key:"debug",value:function(Fe){Fe===!0&&(Fe="log"),Pe.default.level(Fe)}},{key:"find",value:function(Fe){return Fe.__quill||ye.default.find(Fe)}},{key:"import",value:function(Fe){return this.imports[Fe]==null&&Me.error("Cannot import "+Fe+". Are you sure it was registered?"),this.imports[Fe]}},{key:"register",value:function(Fe,He){var Ge=this,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof Fe!="string"){var Ke=Fe.attrName||Fe.blotName;typeof Ke=="string"?this.register("formats/"+Ke,Fe,He):Object.keys(Fe).forEach(function(je){Ge.register(je,Fe[je],He)})}else this.imports[Fe]!=null&&!Xe&&Me.warn("Overwriting "+Fe+" with",He),this.imports[Fe]=He,(Fe.startsWith("blots/")||Fe.startsWith("formats/"))&&He.blotName!=="abstract"?ye.default.register(He):Fe.startsWith("modules")&&typeof He.register=="function"&&He.register()}}]);function Qe(We){var Fe=this,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(De(this,Qe),this.options=Ve(We,He),this.container=this.options.container,this.container==null)return Me.error("Invalid Quill container",We);this.options.debug&&Qe.debug(this.options.debug);var Ge=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new ge.default,this.scroll=ye.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new pe.default(this.scroll),this.selection=new Se.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(ge.default.events.EDITOR_CHANGE,function(Ke){Ke===ge.default.events.TEXT_CHANGE&&Fe.root.classList.toggle("ql-blank",Fe.editor.isBlank())}),this.emitter.on(ge.default.events.SCROLL_UPDATE,function(Ke,je){var Ze=Fe.selection.lastRange,nt=Ze&&Ze.length===0?Ze.index:void 0;Je.call(Fe,function(){return Fe.editor.update(null,je,nt)},Ke)});var Xe=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+Ge+"<p><br></p></div>");this.setContents(Xe),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return de(Qe,[{key:"addContainer",value:function(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof Fe=="string"){var Ge=Fe;Fe=document.createElement("div"),Fe.classList.add(Ge)}return this.container.insertBefore(Fe,He),Fe}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(Fe,He,Ge){var Xe=this,Ke=Ye(Fe,He,Ge),je=oe(Ke,4);return Fe=je[0],He=je[1],Ge=je[3],Je.call(this,function(){return Xe.editor.deleteText(Fe,He)},Ge,Fe,-1*He)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(Fe),this.container.classList.toggle("ql-disabled",!Fe)}},{key:"focus",value:function(){var Fe=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=Fe,this.scrollIntoView()}},{key:"format",value:function(Fe,He){var Ge=this,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ge.default.sources.API;return Je.call(this,function(){var Ke=Ge.getSelection(!0),je=new ce.default;if(Ke==null)return je;if(ye.default.query(Fe,ye.default.Scope.BLOCK))je=Ge.editor.formatLine(Ke.index,Ke.length,Ae({},Fe,He));else{if(Ke.length===0)return Ge.selection.format(Fe,He),je;je=Ge.editor.formatText(Ke.index,Ke.length,Ae({},Fe,He))}return Ge.setSelection(Ke,ge.default.sources.SILENT),je},Xe)}},{key:"formatLine",value:function(Fe,He,Ge,Xe,Ke){var je=this,Ze=void 0,nt=Ye(Fe,He,Ge,Xe,Ke),ot=oe(nt,4);return Fe=ot[0],He=ot[1],Ze=ot[2],Ke=ot[3],Je.call(this,function(){return je.editor.formatLine(Fe,He,Ze)},Ke,Fe,0)}},{key:"formatText",value:function(Fe,He,Ge,Xe,Ke){var je=this,Ze=void 0,nt=Ye(Fe,He,Ge,Xe,Ke),ot=oe(nt,4);return Fe=ot[0],He=ot[1],Ze=ot[2],Ke=ot[3],Je.call(this,function(){return je.editor.formatText(Fe,He,Ze)},Ke,Fe,0)}},{key:"getBounds",value:function(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ge=void 0;typeof Fe=="number"?Ge=this.selection.getBounds(Fe,He):Ge=this.selection.getBounds(Fe.index,Fe.length);var Xe=this.container.getBoundingClientRect();return{bottom:Ge.bottom-Xe.top,height:Ge.height,left:Ge.left-Xe.left,right:Ge.right-Xe.left,top:Ge.top-Xe.top,width:Ge.width}}},{key:"getContents",value:function(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-Fe,Ge=Ye(Fe,He),Xe=oe(Ge,2);return Fe=Xe[0],He=Xe[1],this.editor.getContents(Fe,He)}},{key:"getFormat",value:function(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof Fe=="number"?this.editor.getFormat(Fe,He):this.editor.getFormat(Fe.index,Fe.length)}},{key:"getIndex",value:function(Fe){return Fe.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(Fe){return this.scroll.leaf(Fe)}},{key:"getLine",value:function(Fe){return this.scroll.line(Fe)}},{key:"getLines",value:function(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof Fe!="number"?this.scroll.lines(Fe.index,Fe.length):this.scroll.lines(Fe,He)}},{key:"getModule",value:function(Fe){return this.theme.modules[Fe]}},{key:"getSelection",value:function(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return Fe&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-Fe,Ge=Ye(Fe,He),Xe=oe(Ge,2);return Fe=Xe[0],He=Xe[1],this.editor.getText(Fe,He)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(Fe,He,Ge){var Xe=this,Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Qe.sources.API;return Je.call(this,function(){return Xe.editor.insertEmbed(Fe,He,Ge)},Ke,Fe)}},{key:"insertText",value:function(Fe,He,Ge,Xe,Ke){var je=this,Ze=void 0,nt=Ye(Fe,0,Ge,Xe,Ke),ot=oe(nt,4);return Fe=ot[0],Ze=ot[2],Ke=ot[3],Je.call(this,function(){return je.editor.insertText(Fe,He,Ze)},Ke,Fe,He.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(Fe,He,Ge){this.clipboard.dangerouslyPasteHTML(Fe,He,Ge)}},{key:"removeFormat",value:function(Fe,He,Ge){var Xe=this,Ke=Ye(Fe,He,Ge),je=oe(Ke,4);return Fe=je[0],He=je[1],Ge=je[3],Je.call(this,function(){return Xe.editor.removeFormat(Fe,He)},Ge,Fe)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(Fe){var He=this,Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.default.sources.API;return Je.call(this,function(){Fe=new ce.default(Fe);var Xe=He.getLength(),Ke=He.editor.deleteText(0,Xe),je=He.editor.applyDelta(Fe),Ze=je.ops[je.ops.length-1];Ze!=null&&typeof Ze.insert=="string"&&Ze.insert[Ze.insert.length-1]===`
|
|
6568
|
+
`&&(He.editor.deleteText(He.getLength()-1,1),je.delete(1));var nt=Ke.compose(je);return nt},Ge)}},{key:"setSelection",value:function(Fe,He,Ge){if(Fe==null)this.selection.setRange(null,He||Qe.sources.API);else{var Xe=Ye(Fe,He,Ge),Ke=oe(Xe,4);Fe=Ke[0],He=Ke[1],Ge=Ke[3],this.selection.setRange(new we.Range(Fe,He),Ge),Ge!==ge.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.default.sources.API,Ge=new ce.default().insert(Fe);return this.setContents(Ge,He)}},{key:"update",value:function(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ge.default.sources.USER,He=this.scroll.update(Fe);return this.selection.update(Fe),He}},{key:"updateContents",value:function(Fe){var He=this,Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.default.sources.API;return Je.call(this,function(){return Fe=new ce.default(Fe),He.editor.applyDelta(Fe,Ge)},Ge,!0)}}]),Qe}();Be.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},Be.events=ge.default.events,Be.sources=ge.default.sources,Be.version="1.3.6",Be.imports={delta:ce.default,parchment:ye.default,"core/module":me.default,"core/theme":Ne.default};function Ve(Qe,We){if(We=(0,Ce.default)(!0,{container:Qe,modules:{clipboard:!0,keyboard:!0,history:!0}},We),!We.theme||We.theme===Be.DEFAULTS.theme)We.theme=Ne.default;else if(We.theme=Be.import("themes/"+We.theme),We.theme==null)throw new Error("Invalid theme "+We.theme+". Did you register it?");var Fe=(0,Ce.default)(!0,{},We.theme.DEFAULTS);[Fe,We].forEach(function(Xe){Xe.modules=Xe.modules||{},Object.keys(Xe.modules).forEach(function(Ke){Xe.modules[Ke]===!0&&(Xe.modules[Ke]={})})});var He=Object.keys(Fe.modules).concat(Object.keys(We.modules)),Ge=He.reduce(function(Xe,Ke){var je=Be.import("modules/"+Ke);return je==null?Me.error("Cannot load "+Ke+" module. Are you sure you registered it?"):Xe[Ke]=je.DEFAULTS||{},Xe},{});return We.modules!=null&&We.modules.toolbar&&We.modules.toolbar.constructor!==Object&&(We.modules.toolbar={container:We.modules.toolbar}),We=(0,Ce.default)(!0,{},Be.DEFAULTS,{modules:Ge},Fe,We),["bounds","container","scrollingContainer"].forEach(function(Xe){typeof We[Xe]=="string"&&(We[Xe]=document.querySelector(We[Xe]))}),We.modules=Object.keys(We.modules).reduce(function(Xe,Ke){return We.modules[Ke]&&(Xe[Ke]=We.modules[Ke]),Xe},{}),We}function Je(Qe,We,Fe,He){if(this.options.strict&&!this.isEnabled()&&We===ge.default.sources.USER)return new ce.default;var Ge=Fe==null?null:this.getSelection(),Xe=this.editor.delta,Ke=Qe();if(Ge!=null&&(Fe===!0&&(Fe=Ge.index),He==null?Ge=kt(Ge,Ke,We):He!==0&&(Ge=kt(Ge,Fe,He,We)),this.setSelection(Ge,ge.default.sources.SILENT)),Ke.length()>0){var je,Ze=[ge.default.events.TEXT_CHANGE,Ke,Xe,We];if((je=this.emitter).emit.apply(je,[ge.default.events.EDITOR_CHANGE].concat(Ze)),We!==ge.default.sources.SILENT){var nt;(nt=this.emitter).emit.apply(nt,Ze)}}return Ke}function Ye(Qe,We,Fe,He,Ge){var Xe={};return typeof Qe.index=="number"&&typeof Qe.length=="number"?typeof We!="number"?(Ge=He,He=Fe,Fe=We,We=Qe.length,Qe=Qe.index):(We=Qe.length,Qe=Qe.index):typeof We!="number"&&(Ge=He,He=Fe,Fe=We,We=0),(typeof Fe>"u"?"undefined":ne(Fe))==="object"?(Xe=Fe,Ge=He):typeof Fe=="string"&&(He!=null?Xe[Fe]=He:Ge=Fe),Ge=Ge||ge.default.sources.API,[Qe,We,Xe,Ge]}function kt(Qe,We,Fe,He){if(Qe==null)return null;var Ge=void 0,Xe=void 0;if(We instanceof ce.default){var Ke=[Qe.index,Qe.index+Qe.length].map(function(ot){return We.transformPosition(ot,He!==ge.default.sources.USER)}),je=oe(Ke,2);Ge=je[0],Xe=je[1]}else{var Ze=[Qe.index,Qe.index+Qe.length].map(function(ot){return ot<We||ot===We&&He===ge.default.sources.USER?ot:Fe>=0?ot+Fe:Math.max(We,ot+Fe)}),nt=oe(Ze,2);Ge=nt[0],Xe=nt[1]}return new we.Range(Ge,Xe-Ge)}te.expandConfig=Ve,te.overload=Ye,te.default=Be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(7),ue=pe(de),ce=re(0),he=pe(ce);function pe(ve){return ve&&ve.__esModule?ve:{default:ve}}function fe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function ge(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function be(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var me=function(ve){be(ye,ve);function ye(){return fe(this,ye),ge(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"formatAt",value:function(Se,_e,Ce,Le){if(ye.compare(this.statics.blotName,Ce)<0&&he.default.query(Ce,he.default.Scope.BLOT)){var Pe=this.isolate(Se,_e);Le&&Pe.wrap(Ce,Le)}else oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"formatAt",this).call(this,Se,_e,Ce,Le)}},{key:"optimize",value:function(Se){if(oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"optimize",this).call(this,Se),this.parent instanceof ye&&ye.compare(this.statics.blotName,this.parent.statics.blotName)>0){var _e=this.parent.isolate(this.offset(),this.length());this.moveChildren(_e),_e.wrap(this)}}}],[{key:"compare",value:function(Se,_e){var Ce=ye.order.indexOf(Se),Le=ye.order.indexOf(_e);return Ce>=0||Le>=0?Ce-Le:Se===_e?0:Se<_e?-1:1}}]),ye}(he.default.Inline);me.allowedChildren=[me,he.default.Embed,ue.default],me.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(0),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default.Text);te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function Ce(Le,Pe){for(var Ie=0;Ie<Pe.length;Ie++){var Ne=Pe[Ie];Ne.enumerable=Ne.enumerable||!1,Ne.configurable=!0,"value"in Ne&&(Ne.writable=!0),Object.defineProperty(Le,Ne.key,Ne)}}return function(Le,Pe,Ie){return Pe&&Ce(Le.prototype,Pe),Ie&&Ce(Le,Ie),Le}}(),oe=function Ce(Le,Pe,Ie){Le===null&&(Le=Function.prototype);var Ne=Object.getOwnPropertyDescriptor(Le,Pe);if(Ne===void 0){var qe=Object.getPrototypeOf(Le);return qe===null?void 0:Ce(qe,Pe,Ie)}else{if("value"in Ne)return Ne.value;var Ae=Ne.get;return Ae===void 0?void 0:Ae.call(Ie)}},de=re(55),ue=fe(de),ce=re(10),he=fe(ce),pe=re(34);function fe(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}function ge(Ce,Le){if(!(Ce instanceof Le))throw new TypeError("Cannot call a class as a function")}function be(Ce,Le){if(!Ce)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le&&(typeof Le=="object"||typeof Le=="function")?Le:Ce}function me(Ce,Le){if(typeof Le!="function"&&Le!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Le);Ce.prototype=Object.create(Le&&Le.prototype,{constructor:{value:Ce,enumerable:!1,writable:!0,configurable:!0}}),Le&&(Object.setPrototypeOf?Object.setPrototypeOf(Ce,Le):Ce.__proto__=Le)}var ve=(0,he.default)("quill:events"),ye=[pe.SHADOW_SELECTIONCHANGE,"mousedown","mouseup","click"],we=[],Se="getRootNode"in document;ye.forEach(function(Ce){document.addEventListener(Ce,function(){for(var Le=arguments.length,Pe=Array(Le),Ie=0;Ie<Le;Ie++)Pe[Ie]=arguments[Ie];we.forEach(function(Ne){Ne.handleDOM.apply(Ne,Pe)})})});var _e=function(Ce){me(Le,Ce);function Le(){ge(this,Le);var Pe=be(this,(Le.__proto__||Object.getPrototypeOf(Le)).call(this));return Pe.listeners={},we.push(Pe),Pe.on("error",ve.error),Pe}return ne(Le,[{key:"emit",value:function(){ve.log.apply(ve,arguments),oe(Le.prototype.__proto__||Object.getPrototypeOf(Le.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(Ie){for(var Ne=arguments.length,qe=Array(Ne>1?Ne-1:0),Ae=1;Ae<Ne;Ae++)qe[Ae-1]=arguments[Ae];var De=Ie.composedPath?Ie.composedPath()[0]:Ie.target,Me=function(Ve,Je){if(!Se||Je.getRootNode()===document)return Ve.contains(Je);for(;!Ve.contains(Je);){var Ye=Je.getRootNode();if(!Ye||!Ye.host)return!1;Je=Ye.host}return!0};(this.listeners[Ie.type]||[]).forEach(function(Be){var Ve=Be.node,Je=Be.handler;(De===Ve||Me(Ve,De))&&Je.apply(void 0,[Ie].concat(qe))})}},{key:"listenDOM",value:function(Ie,Ne,qe){this.listeners[Ie]||(this.listeners[Ie]=[]),this.listeners[Ie].push({node:Ne,handler:qe})}}]),Le}(ue.default);_e.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},_e.sources={API:"api",SILENT:"silent",USER:"user"},te.default=_e},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});function ne(de,ue){if(!(de instanceof ue))throw new TypeError("Cannot call a class as a function")}var oe=function de(ue){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ne(this,de),this.quill=ue,this.options=ce};oe.DEFAULTS={},te.default=oe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=["error","warn","log","info"],oe="warn";function de(ce){if(ne.indexOf(ce)<=ne.indexOf(oe)){for(var he,pe=arguments.length,fe=Array(pe>1?pe-1:0),ge=1;ge<pe;ge++)fe[ge-1]=arguments[ge];(he=console)[ce].apply(he,fe)}}function ue(ce){return ne.reduce(function(he,pe){return he[pe]=de.bind(console,pe,ce),he},{})}de.level=ue.level=function(ce){oe=ce},te.default=ue},function(J,te,re){var ne=Array.prototype.slice,oe=re(53),de=re(54),ue=J.exports=function(fe,ge,be){return be||(be={}),fe===ge?!0:fe instanceof Date&&ge instanceof Date?fe.getTime()===ge.getTime():!fe||!ge||typeof fe!="object"&&typeof ge!="object"?be.strict?fe===ge:fe==ge:pe(fe,ge,be)};function ce(fe){return fe==null}function he(fe){return!(!fe||typeof fe!="object"||typeof fe.length!="number"||typeof fe.copy!="function"||typeof fe.slice!="function"||fe.length>0&&typeof fe[0]!="number")}function pe(fe,ge,be){var me,ve;if(ce(fe)||ce(ge)||fe.prototype!==ge.prototype)return!1;if(de(fe))return de(ge)?(fe=ne.call(fe),ge=ne.call(ge),ue(fe,ge,be)):!1;if(he(fe)){if(!he(ge)||fe.length!==ge.length)return!1;for(me=0;me<fe.length;me++)if(fe[me]!==ge[me])return!1;return!0}try{var ye=oe(fe),we=oe(ge)}catch{return!1}if(ye.length!=we.length)return!1;for(ye.sort(),we.sort(),me=ye.length-1;me>=0;me--)if(ye[me]!=we[me])return!1;for(me=ye.length-1;me>=0;me--)if(ve=ye[me],!ue(fe[ve],ge[ve],be))return!1;return typeof fe==typeof ge}},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(1),oe=function(){function de(ue,ce,he){he===void 0&&(he={}),this.attrName=ue,this.keyName=ce;var pe=ne.Scope.TYPE&ne.Scope.ATTRIBUTE;he.scope!=null?this.scope=he.scope&ne.Scope.LEVEL|pe:this.scope=ne.Scope.ATTRIBUTE,he.whitelist!=null&&(this.whitelist=he.whitelist)}return de.keys=function(ue){return[].map.call(ue.attributes,function(ce){return ce.name})},de.prototype.add=function(ue,ce){return this.canAdd(ue,ce)?(ue.setAttribute(this.keyName,ce),!0):!1},de.prototype.canAdd=function(ue,ce){var he=ne.query(ue,ne.Scope.BLOT&(this.scope|ne.Scope.TYPE));return he==null?!1:this.whitelist==null?!0:typeof ce=="string"?this.whitelist.indexOf(ce.replace(/["']/g,""))>-1:this.whitelist.indexOf(ce)>-1},de.prototype.remove=function(ue){ue.removeAttribute(this.keyName)},de.prototype.value=function(ue){var ce=ue.getAttribute(this.keyName);return this.canAdd(ue,ce)&&ce?ce:""},de}();te.default=oe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.Code=void 0;var ne=function(){function Ie(Ne,qe){var Ae=[],De=!0,Me=!1,Be=void 0;try{for(var Ve=Ne[Symbol.iterator](),Je;!(De=(Je=Ve.next()).done)&&(Ae.push(Je.value),!(qe&&Ae.length===qe));De=!0);}catch(Ye){Me=!0,Be=Ye}finally{try{!De&&Ve.return&&Ve.return()}finally{if(Me)throw Be}}return Ae}return function(Ne,qe){if(Array.isArray(Ne))return Ne;if(Symbol.iterator in Object(Ne))return Ie(Ne,qe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function Ie(Ne,qe){for(var Ae=0;Ae<qe.length;Ae++){var De=qe[Ae];De.enumerable=De.enumerable||!1,De.configurable=!0,"value"in De&&(De.writable=!0),Object.defineProperty(Ne,De.key,De)}}return function(Ne,qe,Ae){return qe&&Ie(Ne.prototype,qe),Ae&&Ie(Ne,Ae),Ne}}(),de=function Ie(Ne,qe,Ae){Ne===null&&(Ne=Function.prototype);var De=Object.getOwnPropertyDescriptor(Ne,qe);if(De===void 0){var Me=Object.getPrototypeOf(Ne);return Me===null?void 0:Ie(Me,qe,Ae)}else{if("value"in De)return De.value;var Be=De.get;return Be===void 0?void 0:Be.call(Ae)}},ue=re(2),ce=we(ue),he=re(0),pe=we(he),fe=re(4),ge=we(fe),be=re(6),me=we(be),ve=re(7),ye=we(ve);function we(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}}function Se(Ie,Ne){if(!(Ie instanceof Ne))throw new TypeError("Cannot call a class as a function")}function _e(Ie,Ne){if(!Ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ne&&(typeof Ne=="object"||typeof Ne=="function")?Ne:Ie}function Ce(Ie,Ne){if(typeof Ne!="function"&&Ne!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ne);Ie.prototype=Object.create(Ne&&Ne.prototype,{constructor:{value:Ie,enumerable:!1,writable:!0,configurable:!0}}),Ne&&(Object.setPrototypeOf?Object.setPrototypeOf(Ie,Ne):Ie.__proto__=Ne)}var Le=function(Ie){Ce(Ne,Ie);function Ne(){return Se(this,Ne),_e(this,(Ne.__proto__||Object.getPrototypeOf(Ne)).apply(this,arguments))}return Ne}(me.default);Le.blotName="code",Le.tagName="CODE";var Pe=function(Ie){Ce(Ne,Ie);function Ne(){return Se(this,Ne),_e(this,(Ne.__proto__||Object.getPrototypeOf(Ne)).apply(this,arguments))}return oe(Ne,[{key:"delta",value:function(){var Ae=this,De=this.domNode.textContent;return De.endsWith(`
|
|
6531
6569
|
`)&&(De=De.slice(0,-1)),De.split(`
|
|
6532
6570
|
`).reduce(function(Me,Be){return Me.insert(Be).insert(`
|
|
6533
|
-
`,Ae.formats())},new ce.default)}},{key:"format",value:function(Ae,De){if(!(Ae===this.statics.blotName&&De)){var Me=this.descendant(ye.default,this.length()-1),Be=ne(Me,1),Ve=Be[0];Ve!=null&&Ve.deleteAt(Ve.length()-1,1),de(
|
|
6571
|
+
`,Ae.formats())},new ce.default)}},{key:"format",value:function(Ae,De){if(!(Ae===this.statics.blotName&&De)){var Me=this.descendant(ye.default,this.length()-1),Be=ne(Me,1),Ve=Be[0];Ve!=null&&Ve.deleteAt(Ve.length()-1,1),de(Ne.prototype.__proto__||Object.getPrototypeOf(Ne.prototype),"format",this).call(this,Ae,De)}}},{key:"formatAt",value:function(Ae,De,Me,Be){if(De!==0&&!(pe.default.query(Me,pe.default.Scope.BLOCK)==null||Me===this.statics.blotName&&Be===this.statics.formats(this.domNode))){var Ve=this.newlineIndex(Ae);if(!(Ve<0||Ve>=Ae+De)){var Je=this.newlineIndex(Ae,!0)+1,Ye=Ve-Je+1,kt=this.isolate(Je,Ye),Qe=kt.next;kt.format(Me,Be),Qe instanceof Ne&&Qe.formatAt(0,Ae-Je+De-Ye,Me,Be)}}}},{key:"insertAt",value:function(Ae,De,Me){if(Me==null){var Be=this.descendant(ye.default,Ae),Ve=ne(Be,2),Je=Ve[0],Ye=Ve[1];Je.insertAt(Ye,De)}}},{key:"length",value:function(){var Ae=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
6534
6572
|
`)?Ae:Ae+1}},{key:"newlineIndex",value:function(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(De)return this.domNode.textContent.slice(0,Ae).lastIndexOf(`
|
|
6535
6573
|
`);var Me=this.domNode.textContent.slice(Ae).indexOf(`
|
|
6536
6574
|
`);return Me>-1?Ae+Me:-1}},{key:"optimize",value:function(Ae){this.domNode.textContent.endsWith(`
|
|
6537
6575
|
`)||this.appendChild(pe.default.create("text",`
|
|
6538
|
-
`)),de(
|
|
6576
|
+
`)),de(Ne.prototype.__proto__||Object.getPrototypeOf(Ne.prototype),"optimize",this).call(this,Ae);var De=this.next;De!=null&&De.prev===this&&De.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===De.statics.formats(De.domNode)&&(De.optimize(Ae),De.moveChildren(this),De.remove())}},{key:"replace",value:function(Ae){de(Ne.prototype.__proto__||Object.getPrototypeOf(Ne.prototype),"replace",this).call(this,Ae),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(De){var Me=pe.default.find(De);Me==null?De.parentNode.removeChild(De):Me instanceof pe.default.Embed?Me.remove():Me.unwrap()})}}],[{key:"create",value:function(Ae){var De=de(Ne.__proto__||Object.getPrototypeOf(Ne),"create",this).call(this,Ae);return De.setAttribute("spellcheck",!1),De}},{key:"formats",value:function(){return!0}}]),Ne}(ge.default);Pe.blotName="code-block",Pe.tagName="PRE",Pe.TAB=" ",te.Code=Le,te.default=Pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Qe){return typeof Qe}:function(Qe){return Qe&&typeof Symbol=="function"&&Qe.constructor===Symbol&&Qe!==Symbol.prototype?"symbol":typeof Qe},oe=function(){function Qe(We,Fe){var He=[],Ge=!0,Xe=!1,Ke=void 0;try{for(var je=We[Symbol.iterator](),Ze;!(Ge=(Ze=je.next()).done)&&(He.push(Ze.value),!(Fe&&He.length===Fe));Ge=!0);}catch(nt){Xe=!0,Ke=nt}finally{try{!Ge&&je.return&&je.return()}finally{if(Xe)throw Ke}}return He}return function(We,Fe){if(Array.isArray(We))return We;if(Symbol.iterator in Object(We))return Qe(We,Fe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),de=function(){function Qe(We,Fe){for(var He=0;He<Fe.length;He++){var Ge=Fe[He];Ge.enumerable=Ge.enumerable||!1,Ge.configurable=!0,"value"in Ge&&(Ge.writable=!0),Object.defineProperty(We,Ge.key,Ge)}}return function(We,Fe,He){return Fe&&Qe(We.prototype,Fe),He&&Qe(We,He),We}}(),ue=re(2),ce=De(ue),he=re(20),pe=De(he),fe=re(0),ge=De(fe),be=re(13),me=De(be),ve=re(24),ye=De(ve),we=re(4),Se=De(we),_e=re(16),Ce=De(_e),Le=re(21),Pe=De(Le),Ie=re(11),Ne=De(Ie),qe=re(3),Ae=De(qe);function De(Qe){return Qe&&Qe.__esModule?Qe:{default:Qe}}function Me(Qe,We,Fe){return We in Qe?Object.defineProperty(Qe,We,{value:Fe,enumerable:!0,configurable:!0,writable:!0}):Qe[We]=Fe,Qe}function Be(Qe,We){if(!(Qe instanceof We))throw new TypeError("Cannot call a class as a function")}var Ve=/^[ -~]*$/,Je=function(){function Qe(We){Be(this,Qe),this.scroll=We,this.delta=this.getDelta()}return de(Qe,[{key:"applyDelta",value:function(Fe){var He=this,Ge=!1;this.scroll.update();var Xe=this.scroll.length();return this.scroll.batchStart(),Fe=kt(Fe),Fe.reduce(function(Ke,je){var Ze=je.retain||je.delete||je.insert.length||1,nt=je.attributes||{};if(je.insert!=null){if(typeof je.insert=="string"){var ot=je.insert;ot.endsWith(`
|
|
6539
6577
|
`)&&Ge&&(Ge=!1,ot=ot.slice(0,-1)),Ke>=Xe&&!ot.endsWith(`
|
|
6540
|
-
`)&&(Ge=!0),He.scroll.insertAt(Ke,ot);var Ct=He.scroll.line(Ke),Lt=oe(Ct,2),Bt=Lt[0],jt=Lt[1],Kt=(0,Ae.default)({},(0,we.bubbleFormats)(Bt));if(Bt instanceof Se.default){var ei=Bt.descendant(ge.default.Leaf,jt),mi=oe(ei,1),di=mi[0];Kt=(0,Ae.default)(Kt,(0,we.bubbleFormats)(di))}nt=pe.default.attributes.diff(Kt,nt)||{}}else if(ne(je.insert)==="object"){var xt=Object.keys(je.insert)[0];if(xt==null)return Ke;He.scroll.insertAt(Ke,xt,je.insert[xt])}Xe+=Ze}return Object.keys(nt).forEach(function(St){He.scroll.formatAt(Ke,Ze,St,nt[St])}),Ke+Ze},0),
|
|
6578
|
+
`)&&(Ge=!0),He.scroll.insertAt(Ke,ot);var Ct=He.scroll.line(Ke),Lt=oe(Ct,2),Bt=Lt[0],jt=Lt[1],Kt=(0,Ae.default)({},(0,we.bubbleFormats)(Bt));if(Bt instanceof Se.default){var ei=Bt.descendant(ge.default.Leaf,jt),mi=oe(ei,1),di=mi[0];Kt=(0,Ae.default)(Kt,(0,we.bubbleFormats)(di))}nt=pe.default.attributes.diff(Kt,nt)||{}}else if(ne(je.insert)==="object"){var xt=Object.keys(je.insert)[0];if(xt==null)return Ke;He.scroll.insertAt(Ke,xt,je.insert[xt])}Xe+=Ze}return Object.keys(nt).forEach(function(St){He.scroll.formatAt(Ke,Ze,St,nt[St])}),Ke+Ze},0),Fe.reduce(function(Ke,je){return typeof je.delete=="number"?(He.scroll.deleteAt(Ke,je.delete),Ke):Ke+(je.retain||je.insert.length||1)},0),this.scroll.batchEnd(),this.update(Fe)}},{key:"deleteText",value:function(Fe,He){return this.scroll.deleteAt(Fe,He),this.update(new ce.default().retain(Fe).delete(He))}},{key:"formatLine",value:function(Fe,He){var Ge=this,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Xe).forEach(function(Ke){if(!(Ge.scroll.whitelist!=null&&!Ge.scroll.whitelist[Ke])){var je=Ge.scroll.lines(Fe,Math.max(He,1)),Ze=He;je.forEach(function(nt){var ot=nt.length();if(!(nt instanceof me.default))nt.format(Ke,Xe[Ke]);else{var Ct=Fe-nt.offset(Ge.scroll),Lt=nt.newlineIndex(Ct+Ze)-Ct+1;nt.formatAt(Ct,Lt,Ke,Xe[Ke])}Ze-=ot})}}),this.scroll.optimize(),this.update(new ce.default().retain(Fe).retain(He,(0,Pe.default)(Xe)))}},{key:"formatText",value:function(Fe,He){var Ge=this,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Xe).forEach(function(Ke){Ge.scroll.formatAt(Fe,He,Ke,Xe[Ke])}),this.update(new ce.default().retain(Fe).retain(He,(0,Pe.default)(Xe)))}},{key:"getContents",value:function(Fe,He){return this.delta.slice(Fe,Fe+He)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(Fe,He){return Fe.concat(He.delta())},new ce.default)}},{key:"getFormat",value:function(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ge=[],Xe=[];He===0?this.scroll.path(Fe).forEach(function(je){var Ze=oe(je,1),nt=Ze[0];nt instanceof Se.default?Ge.push(nt):nt instanceof ge.default.Leaf&&Xe.push(nt)}):(Ge=this.scroll.lines(Fe,He),Xe=this.scroll.descendants(ge.default.Leaf,Fe,He));var Ke=[Ge,Xe].map(function(je){if(je.length===0)return{};for(var Ze=(0,we.bubbleFormats)(je.shift());Object.keys(Ze).length>0;){var nt=je.shift();if(nt==null)return Ze;Ze=Ye((0,we.bubbleFormats)(nt),Ze)}return Ze});return Ae.default.apply(Ae.default,Ke)}},{key:"getText",value:function(Fe,He){return this.getContents(Fe,He).filter(function(Ge){return typeof Ge.insert=="string"}).map(function(Ge){return Ge.insert}).join("")}},{key:"insertEmbed",value:function(Fe,He,Ge){return this.scroll.insertAt(Fe,He,Ge),this.update(new ce.default().retain(Fe).insert(Me({},He,Ge)))}},{key:"insertText",value:function(Fe,He){var Ge=this,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return He=He.replace(/\r\n/g,`
|
|
6541
6579
|
`).replace(/\r/g,`
|
|
6542
|
-
`),this.scroll.insertAt(
|
|
6543
|
-
`));var Ct=this.getContents(
|
|
6580
|
+
`),this.scroll.insertAt(Fe,He),Object.keys(Xe).forEach(function(Ke){Ge.scroll.formatAt(Fe,He.length,Ke,Xe[Ke])}),this.update(new ce.default().retain(Fe).insert(He,(0,Pe.default)(Xe)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var Fe=this.scroll.children.head;return Fe.statics.blotName!==Se.default.blotName||Fe.children.length>1?!1:Fe.children.head instanceof Ce.default}},{key:"removeFormat",value:function(Fe,He){var Ge=this.getText(Fe,He),Xe=this.scroll.line(Fe+He),Ke=oe(Xe,2),je=Ke[0],Ze=Ke[1],nt=0,ot=new ce.default;je!=null&&(je instanceof me.default?nt=je.newlineIndex(Ze)-Ze+1:nt=je.length()-Ze,ot=je.delta().slice(Ze,Ze+nt-1).insert(`
|
|
6581
|
+
`));var Ct=this.getContents(Fe,He+nt),Lt=Ct.diff(new ce.default().insert(Ge).concat(ot)),Bt=new ce.default().retain(Fe).concat(Lt);return this.applyDelta(Bt)}},{key:"update",value:function(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Xe=this.delta;if(He.length===1&&He[0].type==="characterData"&&He[0].target.data.match(Ve)&&ge.default.find(He[0].target)){var Ke=ge.default.find(He[0].target),je=(0,we.bubbleFormats)(Ke),Ze=Ke.offset(this.scroll),nt=He[0].oldValue.replace(ye.default.CONTENTS,""),ot=new ce.default().insert(nt),Ct=new ce.default().insert(Ke.value()),Lt=new ce.default().retain(Ze).concat(ot.diff(Ct,Ge));Fe=Lt.reduce(function(Bt,jt){return jt.insert?Bt.insert(jt.insert,je):Bt.push(jt)},new ce.default),this.delta=Xe.compose(Fe)}else this.delta=this.getDelta(),(!Fe||!(0,Ne.default)(Xe.compose(Fe),this.delta))&&(Fe=Xe.diff(this.delta,Ge));return Fe}}]),Qe}();function Ye(Qe,We){return Object.keys(We).reduce(function(Fe,He){return Qe[He]==null||(We[He]===Qe[He]?Fe[He]=We[He]:Array.isArray(We[He])?We[He].indexOf(Qe[He])<0&&(Fe[He]=We[He].concat([Qe[He]])):Fe[He]=[We[He],Qe[He]]),Fe},{})}function kt(Qe){return Qe.reduce(function(We,Fe){if(Fe.insert===1){var He=(0,Pe.default)(Fe.attributes);return delete He.image,We.insert({image:Fe.attributes.image},He)}if(Fe.attributes!=null&&(Fe.attributes.list===!0||Fe.attributes.bullet===!0)&&(Fe=(0,Pe.default)(Fe),Fe.attributes.list?Fe.attributes.list="ordered":(Fe.attributes.list="bullet",delete Fe.attributes.bullet)),typeof Fe.insert=="string"){var Ge=Fe.insert.replace(/\r\n/g,`
|
|
6544
6582
|
`).replace(/\r/g,`
|
|
6545
|
-
`);return We.insert(Ge,Ne.attributes)}return We.push(Ne)},new ce.default)}te.default=Je},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.Range=void 0;var ne=function(){function Fe(qe,Ae){var De=[],Me=!0,Be=!1,Ve=void 0;try{for(var Je=qe[Symbol.iterator](),Ye;!(Me=(Ye=Je.next()).done)&&(De.push(Ye.value),!(Ae&&De.length===Ae));Me=!0);}catch(kt){Be=!0,Ve=kt}finally{try{!Me&&Je.return&&Je.return()}finally{if(Be)throw Ve}}return De}return function(qe,Ae){if(Array.isArray(qe))return qe;if(Symbol.iterator in Object(qe))return Fe(qe,Ae);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function Fe(qe,Ae){for(var De=0;De<Ae.length;De++){var Me=Ae[De];Me.enumerable=Me.enumerable||!1,Me.configurable=!0,"value"in Me&&(Me.writable=!0),Object.defineProperty(qe,Me.key,Me)}}return function(qe,Ae,De){return Ae&&Fe(qe.prototype,Ae),De&&Fe(qe,De),qe}}(),de=re(0),ue=we(de),ce=re(21),he=we(ce),pe=re(11),fe=we(pe),ge=re(8),be=we(ge),me=re(10),ve=we(me),ye=re(34);function we(Fe){return Fe&&Fe.__esModule?Fe:{default:Fe}}function Se(Fe){if(Array.isArray(Fe)){for(var qe=0,Ae=Array(Fe.length);qe<Fe.length;qe++)Ae[qe]=Fe[qe];return Ae}else return Array.from(Fe)}function _e(Fe,qe){if(!(Fe instanceof qe))throw new TypeError("Cannot call a class as a function")}var Ce=(0,ve.default)("quill:selection"),Le=function Fe(qe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_e(this,Fe),this.index=qe,this.length=Ae},Pe=function(){function Fe(qe,Ae){var De=this;_e(this,Fe),this.emitter=Ae,this.scroll=qe,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.rootDocument=this.root.getRootNode?this.root.getRootNode():document,this.cursor=ue.default.create("cursor",this),this.lastRange=this.savedRange=new Le(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM(ye.SHADOW_SELECTIONCHANGE,document,function(){De.mouseDown||setTimeout(De.update.bind(De,be.default.sources.USER),1)}),this.emitter.on(be.default.events.EDITOR_CHANGE,function(Me,Be){Me===be.default.events.TEXT_CHANGE&&Be.length()>0&&De.update(be.default.sources.SILENT)}),this.emitter.on(be.default.events.SCROLL_BEFORE_UPDATE,function(){if(De.hasFocus()){var Me=De.getNativeRange();Me!=null&&Me.start.node!==De.cursor.textNode&&De.emitter.once(be.default.events.SCROLL_UPDATE,function(){try{De.setNativeRange(Me.start.node,Me.start.offset,Me.end.node,Me.end.offset)}catch{}})}}),this.emitter.on(be.default.events.SCROLL_OPTIMIZE,function(Me,Be){if(Be.range){var Ve=Be.range,Je=Ve.startNode,Ye=Ve.startOffset,kt=Ve.endNode,Qe=Ve.endOffset;De.setNativeRange(Je,Ye,kt,Qe)}}),this.update(be.default.sources.SILENT)}return oe(Fe,[{key:"handleComposition",value:function(){var Ae=this;this.root.addEventListener("compositionstart",function(){Ae.composing=!0}),this.root.addEventListener("compositionend",function(){if(Ae.composing=!1,Ae.cursor.parent){var De=Ae.cursor.restore();if(!De)return;setTimeout(function(){Ae.setNativeRange(De.startNode,De.startOffset,De.endNode,De.endOffset)},1)}})}},{key:"handleDragging",value:function(){var Ae=this;this.emitter.listenDOM("mousedown",document.body,function(){Ae.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){Ae.mouseDown=!1,Ae.update(be.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(Ae,De){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[Ae])){this.scroll.update();var Me=this.getNativeRange();if(!(Me==null||!Me.native.collapsed||ue.default.query(Ae,ue.default.Scope.BLOCK))){if(Me.start.node!==this.cursor.textNode){var Be=ue.default.find(Me.start.node,!1);if(Be==null)return;if(Be instanceof ue.default.Leaf){var Ve=Be.split(Me.start.offset);Be.parent.insertBefore(this.cursor,Ve)}else Be.insertBefore(this.cursor,Me.start.node);this.cursor.attach()}this.cursor.format(Ae,De),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Me=this.scroll.length();Ae=Math.min(Ae,Me-1),De=Math.min(Ae+De,Me-1)-Ae;var Be=void 0,Ve=this.scroll.leaf(Ae),Je=ne(Ve,2),Ye=Je[0],kt=Je[1];if(Ye==null)return null;var Qe=Ye.position(kt,!0),We=ne(Qe,2);Be=We[0],kt=We[1];var Ne=document.createRange();if(De>0){Ne.setStart(Be,kt);var He=this.scroll.leaf(Ae+De),Ge=ne(He,2);if(Ye=Ge[0],kt=Ge[1],Ye==null)return null;var Xe=Ye.position(kt,!0),Ke=ne(Xe,2);return Be=Ke[0],kt=Ke[1],Ne.setEnd(Be,kt),Ne.getBoundingClientRect()}else{var je="left",Ze=void 0;return Be instanceof Text?(kt<Be.data.length?(Ne.setStart(Be,kt),Ne.setEnd(Be,kt+1)):(Ne.setStart(Be,kt-1),Ne.setEnd(Be,kt),je="right"),Ze=Ne.getBoundingClientRect()):(Ze=Ye.domNode.getBoundingClientRect(),kt>0&&(je="right")),{bottom:Ze.top+Ze.height,height:Ze.height,left:Ze[je],right:Ze[je],top:Ze.top,width:0}}}},{key:"getNativeRange",value:function(){var Ae=(0,ye.getRange)(this.rootDocument);if(Ae==null)return null;var De=this.normalizeNative(Ae);return Ce.info("getNativeRange",De),De}},{key:"getRange",value:function(){var Ae=this.getNativeRange();if(Ae==null)return[null,null];var De=this.normalizedToRange(Ae);return[De,Ae]}},{key:"hasFocus",value:function(){return this.rootDocument.activeElement===this.root}},{key:"normalizedToRange",value:function(Ae){var De=this,Me=[[Ae.start.node,Ae.start.offset]];Ae.native.collapsed||Me.push([Ae.end.node,Ae.end.offset]);var Be=Me.map(function(Ye){var kt=ne(Ye,2),Qe=kt[0],We=kt[1],Ne=ue.default.find(Qe,!0),He=Ne.offset(De.scroll);return We===0?He:Ne instanceof ue.default.Container?He+Ne.length():He+Ne.index(Qe,We)}),Ve=Math.min(Math.max.apply(Math,Se(Be)),this.scroll.length()-1),Je=Math.min.apply(Math,[Ve].concat(Se(Be)));return new Le(Je,Ve-Je)}},{key:"normalizeNative",value:function(Ae){if(!Ie(this.root,Ae.startContainer)||!Ae.collapsed&&!Ie(this.root,Ae.endContainer))return null;var De={start:{node:Ae.startContainer,offset:Ae.startOffset},end:{node:Ae.endContainer,offset:Ae.endOffset},native:Ae};return[De.start,De.end].forEach(function(Me){for(var Be=Me.node,Ve=Me.offset;!(Be instanceof Text)&&Be.childNodes.length>0;)if(Be.childNodes.length>Ve)Be=Be.childNodes[Ve],Ve=0;else if(Be.childNodes.length===Ve)Be=Be.lastChild,Ve=Be instanceof Text?Be.data.length:Be.childNodes.length+1;else break;Me.node=Be,Me.offset=Ve}),De}},{key:"rangeToNative",value:function(Ae){var De=this,Me=Ae.collapsed?[Ae.index]:[Ae.index,Ae.index+Ae.length],Be=[],Ve=this.scroll.length();return Me.forEach(function(Je,Ye){Je=Math.min(Ve-1,Je);var kt=void 0,Qe=De.scroll.leaf(Je),We=ne(Qe,2),Ne=We[0],He=We[1],Ge=Ne.position(He,Ye!==0),Xe=ne(Ge,2);kt=Xe[0],He=Xe[1],Be.push(kt,He)}),Be.length<2&&(Be=Be.concat(Be)),Be}},{key:"scrollIntoView",value:function(Ae){var De=this.lastRange;if(De!=null){var Me=this.getBounds(De.index,De.length);if(Me!=null){var Be=this.scroll.length()-1,Ve=this.scroll.line(Math.min(De.index,Be)),Je=ne(Ve,1),Ye=Je[0],kt=Ye;if(De.length>0){var Qe=this.scroll.line(Math.min(De.index+De.length,Be)),We=ne(Qe,1);kt=We[0]}if(!(Ye==null||kt==null)){var Ne=Ae.getBoundingClientRect();Me.top<Ne.top?Ae.scrollTop-=Ne.top-Me.top:Me.bottom>Ne.bottom&&(Ae.scrollTop+=Me.bottom-Ne.bottom)}}}}},{key:"setNativeRange",value:function(Ae,De){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ae,Be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:De,Ve=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Ce.info("setNativeRange",Ae,De,Me,Be),!(Ae!=null&&(this.root.parentNode==null||Ae.parentNode==null||Me.parentNode==null))){var Je=typeof this.rootDocument.getSelection=="function"?this.rootDocument.getSelection():document.getSelection();if(Je!=null)if(Ae!=null){this.hasFocus()||this.root.focus();var Ye=(this.getNativeRange()||{}).native;if(Ye==null||Ve||Ae!==Ye.startContainer||De!==Ye.startOffset||Me!==Ye.endContainer||Be!==Ye.endOffset){Ae.tagName=="BR"&&(De=[].indexOf.call(Ae.parentNode.childNodes,Ae),Ae=Ae.parentNode),Me.tagName=="BR"&&(Be=[].indexOf.call(Me.parentNode.childNodes,Me),Me=Me.parentNode);var kt=document.createRange();kt.setStart(Ae,De),kt.setEnd(Me,Be),Je.removeAllRanges(),Je.addRange(kt)}}else Je.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:be.default.sources.API;if(typeof De=="string"&&(Me=De,De=!1),Ce.info("setRange",Ae),Ae!=null){var Be=this.rangeToNative(Ae);this.setNativeRange.apply(this,Se(Be).concat([De]))}else this.setNativeRange(null);this.update(Me)}},{key:"update",value:function(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:be.default.sources.USER,De=this.lastRange,Me=this.getRange(),Be=ne(Me,2),Ve=Be[0],Je=Be[1];if(this.lastRange=Ve,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,fe.default)(De,this.lastRange)){var Ye;!this.composing&&Je!=null&&Je.native.collapsed&&Je.start.node!==this.cursor.textNode&&this.cursor.restore();var kt=[be.default.events.SELECTION_CHANGE,(0,he.default)(this.lastRange),(0,he.default)(De),Ae];if((Ye=this.emitter).emit.apply(Ye,[be.default.events.EDITOR_CHANGE].concat(kt)),Ae!==be.default.sources.SILENT){var Qe;(Qe=this.emitter).emit.apply(Qe,kt)}}}}]),Fe}();function Ie(Fe,qe){try{qe.parentNode}catch{return!1}return qe instanceof Text&&(qe=qe.parentNode),Fe.contains(qe)}te.Range=Le,te.default=Pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(0),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return ne(me,[{key:"insertInto",value:function(ye,we){ye.children.length===0?oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"insertInto",this).call(this,ye,we):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),me}(ue.default.Embed);ge.blotName="break",ge.tagName="BR",te.default=ge},function(J,te,re){var ne=this&&this.__extends||function(){var pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ge){fe.__proto__=ge}||function(fe,ge){for(var be in ge)ge.hasOwnProperty(be)&&(fe[be]=ge[be])};return function(fe,ge){pe(fe,ge);function be(){this.constructor=fe}fe.prototype=ge===null?Object.create(ge):(be.prototype=ge.prototype,new be)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(45),de=re(30),ue=re(1),ce=function(pe){ne(fe,pe);function fe(ge){var be=pe.call(this,ge)||this;return be.build(),be}return fe.prototype.appendChild=function(ge){this.insertBefore(ge)},fe.prototype.attach=function(){pe.prototype.attach.call(this),this.children.forEach(function(ge){ge.attach()})},fe.prototype.build=function(){var ge=this;this.children=new oe.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(be){try{var me=he(be);ge.insertBefore(me,ge.children.head||void 0)}catch(ve){if(ve instanceof ue.ParchmentError)return;throw ve}})},fe.prototype.deleteAt=function(ge,be){if(ge===0&&be===this.length())return this.remove();this.children.forEachAt(ge,be,function(me,ve,ye){me.deleteAt(ve,ye)})},fe.prototype.descendant=function(ge,be){var me=this.children.find(be),ve=me[0],ye=me[1];return ge.blotName==null&&ge(ve)||ge.blotName!=null&&ve instanceof ge?[ve,ye]:ve instanceof fe?ve.descendant(ge,ye):[null,-1]},fe.prototype.descendants=function(ge,be,me){be===void 0&&(be=0),me===void 0&&(me=Number.MAX_VALUE);var ve=[],ye=me;return this.children.forEachAt(be,me,function(we,Se,_e){(ge.blotName==null&&ge(we)||ge.blotName!=null&&we instanceof ge)&&ve.push(we),we instanceof fe&&(ve=ve.concat(we.descendants(ge,Se,ye))),ye-=_e}),ve},fe.prototype.detach=function(){this.children.forEach(function(ge){ge.detach()}),pe.prototype.detach.call(this)},fe.prototype.formatAt=function(ge,be,me,ve){this.children.forEachAt(ge,be,function(ye,we,Se){ye.formatAt(we,Se,me,ve)})},fe.prototype.insertAt=function(ge,be,me){var ve=this.children.find(ge),ye=ve[0],we=ve[1];if(ye)ye.insertAt(we,be,me);else{var Se=me==null?ue.create("text",be):ue.create(be,me);this.appendChild(Se)}},fe.prototype.insertBefore=function(ge,be){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(me){return ge instanceof me}))throw new ue.ParchmentError("Cannot insert "+ge.statics.blotName+" into "+this.statics.blotName);ge.insertInto(this,be)},fe.prototype.length=function(){return this.children.reduce(function(ge,be){return ge+be.length()},0)},fe.prototype.moveChildren=function(ge,be){this.children.forEach(function(me){ge.insertBefore(me,be)})},fe.prototype.optimize=function(ge){if(pe.prototype.optimize.call(this,ge),this.children.length===0)if(this.statics.defaultChild!=null){var be=ue.create(this.statics.defaultChild);this.appendChild(be),be.optimize(ge)}else this.remove()},fe.prototype.path=function(ge,be){be===void 0&&(be=!1);var me=this.children.find(ge,be),ve=me[0],ye=me[1],we=[[this,ge]];return ve instanceof fe?we.concat(ve.path(ye,be)):(ve!=null&&we.push([ve,ye]),we)},fe.prototype.removeChild=function(ge){this.children.remove(ge)},fe.prototype.replace=function(ge){ge instanceof fe&&ge.moveChildren(this),pe.prototype.replace.call(this,ge)},fe.prototype.split=function(ge,be){if(be===void 0&&(be=!1),!be){if(ge===0)return this;if(ge===this.length())return this.next}var me=this.clone();return this.parent.insertBefore(me,this.next),this.children.forEachAt(ge,this.length(),function(ve,ye,we){ve=ve.split(ye,be),me.appendChild(ve)}),me},fe.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},fe.prototype.update=function(ge,be){var me=this,ve=[],ye=[];ge.forEach(function(we){we.target===me.domNode&&we.type==="childList"&&(ve.push.apply(ve,we.addedNodes),ye.push.apply(ye,we.removedNodes))}),ye.forEach(function(we){if(!(we.parentNode!=null&&we.tagName!=="IFRAME"&&document.body.compareDocumentPosition(we)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var Se=ue.find(we);Se!=null&&(Se.domNode.parentNode==null||Se.domNode.parentNode===me.domNode)&&Se.detach()}}),ve.filter(function(we){return we.parentNode==me.domNode}).sort(function(we,Se){return we===Se?0:we.compareDocumentPosition(Se)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(we){var Se=null;we.nextSibling!=null&&(Se=ue.find(we.nextSibling));var _e=he(we);(_e.next!=Se||_e.next==null)&&(_e.parent!=null&&_e.parent.removeChild(me),me.insertBefore(_e,Se||void 0))})},fe}(de.default);function he(pe){var fe=ue.find(pe);if(fe==null)try{fe=ue.create(pe)}catch{fe=ue.create(ue.Scope.INLINE),[].slice.call(pe.childNodes).forEach(function(be){fe.domNode.appendChild(be)}),pe.parentNode&&pe.parentNode.replaceChild(fe.domNode,pe),fe.attach()}return fe}te.default=ce},function(J,te,re){var ne=this&&this.__extends||function(){var pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ge){fe.__proto__=ge}||function(fe,ge){for(var be in ge)ge.hasOwnProperty(be)&&(fe[be]=ge[be])};return function(fe,ge){pe(fe,ge);function be(){this.constructor=fe}fe.prototype=ge===null?Object.create(ge):(be.prototype=ge.prototype,new be)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(12),de=re(31),ue=re(17),ce=re(1),he=function(pe){ne(fe,pe);function fe(ge){var be=pe.call(this,ge)||this;return be.attributes=new de.default(be.domNode),be}return fe.formats=function(ge){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return ge.tagName.toLowerCase()},fe.prototype.format=function(ge,be){var me=ce.query(ge);me instanceof oe.default?this.attributes.attribute(me,be):be&&me!=null&&(ge!==this.statics.blotName||this.formats()[ge]!==be)&&this.replaceWith(ge,be)},fe.prototype.formats=function(){var ge=this.attributes.values(),be=this.statics.formats(this.domNode);return be!=null&&(ge[this.statics.blotName]=be),ge},fe.prototype.replaceWith=function(ge,be){var me=pe.prototype.replaceWith.call(this,ge,be);return this.attributes.copy(me),me},fe.prototype.update=function(ge,be){var me=this;pe.prototype.update.call(this,ge,be),ge.some(function(ve){return ve.target===me.domNode&&ve.type==="attributes"})&&this.attributes.build()},fe.prototype.wrap=function(ge,be){var me=pe.prototype.wrap.call(this,ge,be);return me instanceof fe&&me.statics.scope===this.statics.scope&&this.attributes.move(me),me},fe}(ue.default);te.default=he},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(30),de=re(1),ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.value=function(pe){return!0},he.prototype.index=function(pe,fe){return this.domNode===pe||this.domNode.compareDocumentPosition(pe)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(fe,1):-1},he.prototype.position=function(pe,fe){var ge=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return pe>0&&(ge+=1),[this.parent.domNode,ge]},he.prototype.value=function(){var pe;return pe={},pe[this.statics.blotName]=this.statics.value(this.domNode)||!0,pe},he.scope=de.Scope.INLINE_BLOT,he}(oe.default);te.default=ue},function(J,te,re){var ne=re(11),oe=re(3),de={attributes:{compose:function(ce,he,pe){typeof ce!="object"&&(ce={}),typeof he!="object"&&(he={});var fe=oe(!0,{},he);pe||(fe=Object.keys(fe).reduce(function(be,me){return fe[me]!=null&&(be[me]=fe[me]),be},{}));for(var ge in ce)ce[ge]!==void 0&&he[ge]===void 0&&(fe[ge]=ce[ge]);return Object.keys(fe).length>0?fe:void 0},diff:function(ce,he){typeof ce!="object"&&(ce={}),typeof he!="object"&&(he={});var pe=Object.keys(ce).concat(Object.keys(he)).reduce(function(fe,ge){return ne(ce[ge],he[ge])||(fe[ge]=he[ge]===void 0?null:he[ge]),fe},{});return Object.keys(pe).length>0?pe:void 0},transform:function(ce,he,pe){if(typeof ce!="object")return he;if(typeof he=="object"){if(!pe)return he;var fe=Object.keys(he).reduce(function(ge,be){return ce[be]===void 0&&(ge[be]=he[be]),ge},{});return Object.keys(fe).length>0?fe:void 0}}},iterator:function(ce){return new ue(ce)},length:function(ce){return typeof ce.delete=="number"?ce.delete:typeof ce.retain=="number"?ce.retain:typeof ce.insert=="string"?ce.insert.length:1}};function ue(ce){this.ops=ce,this.index=0,this.offset=0}ue.prototype.hasNext=function(){return this.peekLength()<1/0},ue.prototype.next=function(ce){ce||(ce=1/0);var he=this.ops[this.index];if(he){var pe=this.offset,fe=de.length(he);if(ce>=fe-pe?(ce=fe-pe,this.index+=1,this.offset=0):this.offset+=ce,typeof he.delete=="number")return{delete:ce};var ge={};return he.attributes&&(ge.attributes=he.attributes),typeof he.retain=="number"?ge.retain=ce:typeof he.insert=="string"?ge.insert=he.insert.substr(pe,ce):ge.insert=he.insert,ge}else return{retain:1/0}},ue.prototype.peek=function(){return this.ops[this.index]},ue.prototype.peekLength=function(){return this.ops[this.index]?de.length(this.ops[this.index])-this.offset:1/0},ue.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},ue.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var ce=this.offset,he=this.index,pe=this.next(),fe=this.ops.slice(this.index);return this.offset=ce,this.index=he,[pe].concat(fe)}else return[]},J.exports=de},function(J,te){var re=function(){function ne(me,ve){return ve!=null&&me instanceof ve}var oe;try{oe=Map}catch{oe=function(){}}var de;try{de=Set}catch{de=function(){}}var ue;try{ue=Promise}catch{ue=function(){}}function ce(me,ve,ye,we,Se){typeof ve=="object"&&(ye=ve.depth,we=ve.prototype,Se=ve.includeNonEnumerable,ve=ve.circular);var _e=[],Ce=[],Le=typeof Buffer<"u";typeof ve>"u"&&(ve=!0),typeof ye>"u"&&(ye=1/0);function Pe(Ie,Fe){if(Ie===null)return null;if(Fe===0)return Ie;var qe,Ae;if(typeof Ie!="object")return Ie;if(ne(Ie,oe))qe=new oe;else if(ne(Ie,de))qe=new de;else if(ne(Ie,ue))qe=new ue(function(We,Ne){Ie.then(function(He){We(Pe(He,Fe-1))},function(He){Ne(Pe(He,Fe-1))})});else if(ce.__isArray(Ie))qe=[];else if(ce.__isRegExp(Ie))qe=new RegExp(Ie.source,be(Ie)),Ie.lastIndex&&(qe.lastIndex=Ie.lastIndex);else if(ce.__isDate(Ie))qe=new Date(Ie.getTime());else{if(Le&&Buffer.isBuffer(Ie))return Buffer.allocUnsafe?qe=Buffer.allocUnsafe(Ie.length):qe=new Buffer(Ie.length),Ie.copy(qe),qe;ne(Ie,Error)?qe=Object.create(Ie):typeof we>"u"?(Ae=Object.getPrototypeOf(Ie),qe=Object.create(Ae)):(qe=Object.create(we),Ae=we)}if(ve){var De=_e.indexOf(Ie);if(De!=-1)return Ce[De];_e.push(Ie),Ce.push(qe)}ne(Ie,oe)&&Ie.forEach(function(We,Ne){var He=Pe(Ne,Fe-1),Ge=Pe(We,Fe-1);qe.set(He,Ge)}),ne(Ie,de)&&Ie.forEach(function(We){var Ne=Pe(We,Fe-1);qe.add(Ne)});for(var Me in Ie){var Be;Ae&&(Be=Object.getOwnPropertyDescriptor(Ae,Me)),!(Be&&Be.set==null)&&(qe[Me]=Pe(Ie[Me],Fe-1))}if(Object.getOwnPropertySymbols)for(var Ve=Object.getOwnPropertySymbols(Ie),Me=0;Me<Ve.length;Me++){var Je=Ve[Me],Ye=Object.getOwnPropertyDescriptor(Ie,Je);Ye&&!Ye.enumerable&&!Se||(qe[Je]=Pe(Ie[Je],Fe-1),Ye.enumerable||Object.defineProperty(qe,Je,{enumerable:!1}))}if(Se)for(var kt=Object.getOwnPropertyNames(Ie),Me=0;Me<kt.length;Me++){var Qe=kt[Me],Ye=Object.getOwnPropertyDescriptor(Ie,Qe);Ye&&Ye.enumerable||(qe[Qe]=Pe(Ie[Qe],Fe-1),Object.defineProperty(qe,Qe,{enumerable:!1}))}return qe}return Pe(me,ye)}ce.clonePrototype=function(ve){if(ve===null)return null;var ye=function(){};return ye.prototype=ve,new ye};function he(me){return Object.prototype.toString.call(me)}ce.__objToStr=he;function pe(me){return typeof me=="object"&&he(me)==="[object Date]"}ce.__isDate=pe;function fe(me){return typeof me=="object"&&he(me)==="[object Array]"}ce.__isArray=fe;function ge(me){return typeof me=="object"&&he(me)==="[object RegExp]"}ce.__isRegExp=ge;function be(me){var ve="";return me.global&&(ve+="g"),me.ignoreCase&&(ve+="i"),me.multiline&&(ve+="m"),ve}return ce.__getRegExpFlags=be,ce}();typeof J=="object"&&J.exports&&(J.exports=re)},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function qe(Ae,De){var Me=[],Be=!0,Ve=!1,Je=void 0;try{for(var Ye=Ae[Symbol.iterator](),kt;!(Be=(kt=Ye.next()).done)&&(Me.push(kt.value),!(De&&Me.length===De));Be=!0);}catch(Qe){Ve=!0,Je=Qe}finally{try{!Be&&Ye.return&&Ye.return()}finally{if(Ve)throw Je}}return Me}return function(Ae,De){if(Array.isArray(Ae))return Ae;if(Symbol.iterator in Object(Ae))return qe(Ae,De);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function qe(Ae,De){for(var Me=0;Me<De.length;Me++){var Be=De[Me];Be.enumerable=Be.enumerable||!1,Be.configurable=!0,"value"in Be&&(Be.writable=!0),Object.defineProperty(Ae,Be.key,Be)}}return function(Ae,De,Me){return De&&qe(Ae.prototype,De),Me&&qe(Ae,Me),Ae}}(),de=function qe(Ae,De,Me){Ae===null&&(Ae=Function.prototype);var Be=Object.getOwnPropertyDescriptor(Ae,De);if(Be===void 0){var Ve=Object.getPrototypeOf(Ae);return Ve===null?void 0:qe(Ve,De,Me)}else{if("value"in Be)return Be.value;var Je=Be.get;return Je===void 0?void 0:Je.call(Me)}},ue=re(0),ce=_e(ue),he=re(8),pe=_e(he),fe=re(4),ge=_e(fe),be=re(16),me=_e(be),ve=re(13),ye=_e(ve),we=re(25),Se=_e(we);function _e(qe){return qe&&qe.__esModule?qe:{default:qe}}function Ce(qe,Ae){if(!(qe instanceof Ae))throw new TypeError("Cannot call a class as a function")}function Le(qe,Ae){if(!qe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ae&&(typeof Ae=="object"||typeof Ae=="function")?Ae:qe}function Pe(qe,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ae);qe.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:qe,enumerable:!1,writable:!0,configurable:!0}}),Ae&&(Object.setPrototypeOf?Object.setPrototypeOf(qe,Ae):qe.__proto__=Ae)}function Ie(qe){return qe instanceof ge.default||qe instanceof fe.BlockEmbed}var Fe=function(qe){Pe(Ae,qe);function Ae(De,Me){Ce(this,Ae);var Be=Le(this,(Ae.__proto__||Object.getPrototypeOf(Ae)).call(this,De));return Be.emitter=Me.emitter,Array.isArray(Me.whitelist)&&(Be.whitelist=Me.whitelist.reduce(function(Ve,Je){return Ve[Je]=!0,Ve},{})),Be.domNode.addEventListener("DOMNodeInserted",function(){}),Be.optimize(),Be.enable(),Be}return oe(Ae,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(Me,Be){var Ve=this.line(Me),Je=ne(Ve,2),Ye=Je[0],kt=Je[1],Qe=this.line(Me+Be),We=ne(Qe,1),Ne=We[0];if(de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"deleteAt",this).call(this,Me,Be),Ne!=null&&Ye!==Ne&&kt>0){if(Ye instanceof fe.BlockEmbed||Ne instanceof fe.BlockEmbed){this.optimize();return}if(Ye instanceof ye.default){var He=Ye.newlineIndex(Ye.length(),!0);if(He>-1&&(Ye=Ye.split(He+1),Ye===Ne)){this.optimize();return}}else if(Ne instanceof ye.default){var Ge=Ne.newlineIndex(0);Ge>-1&&Ne.split(Ge+1)}var Xe=Ne.children.head instanceof me.default?null:Ne.children.head;Ye.moveChildren(Ne,Xe),Ye.remove()}this.optimize()}},{key:"enable",value:function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",Me)}},{key:"formatAt",value:function(Me,Be,Ve,Je){this.whitelist!=null&&!this.whitelist[Ve]||(de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"formatAt",this).call(this,Me,Be,Ve,Je),this.optimize())}},{key:"insertAt",value:function(Me,Be,Ve){if(!(Ve!=null&&this.whitelist!=null&&!this.whitelist[Be])){if(Me>=this.length())if(Ve==null||ce.default.query(Be,ce.default.Scope.BLOCK)==null){var Je=ce.default.create(this.statics.defaultChild);this.appendChild(Je),Ve==null&&Be.endsWith(`
|
|
6546
|
-
`)&&(Be=Be.slice(0,-1)),Je.insertAt(0,Be,Ve)}else{var Ye=ce.default.create(Be,Ve);this.appendChild(Ye)}else de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"insertAt",this).call(this,Me,Be,Ve);this.optimize()}}},{key:"insertBefore",value:function(Me,Be){if(Me.statics.scope===ce.default.Scope.INLINE_BLOT){var Ve=ce.default.create(this.statics.defaultChild);Ve.appendChild(Me),Me=Ve}de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"insertBefore",this).call(this,Me,Be)}},{key:"leaf",value:function(Me){return this.path(Me).pop()||[null,-1]}},{key:"line",value:function(Me){return Me===this.length()?this.line(Me-1):this.descendant(Ie,Me)}},{key:"lines",value:function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,Ve=function Je(Ye,kt,Qe){var We=[],
|
|
6583
|
+
`);return We.insert(Ge,Fe.attributes)}return We.push(Fe)},new ce.default)}te.default=Je},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.Range=void 0;var ne=function(){function Ne(qe,Ae){var De=[],Me=!0,Be=!1,Ve=void 0;try{for(var Je=qe[Symbol.iterator](),Ye;!(Me=(Ye=Je.next()).done)&&(De.push(Ye.value),!(Ae&&De.length===Ae));Me=!0);}catch(kt){Be=!0,Ve=kt}finally{try{!Me&&Je.return&&Je.return()}finally{if(Be)throw Ve}}return De}return function(qe,Ae){if(Array.isArray(qe))return qe;if(Symbol.iterator in Object(qe))return Ne(qe,Ae);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function Ne(qe,Ae){for(var De=0;De<Ae.length;De++){var Me=Ae[De];Me.enumerable=Me.enumerable||!1,Me.configurable=!0,"value"in Me&&(Me.writable=!0),Object.defineProperty(qe,Me.key,Me)}}return function(qe,Ae,De){return Ae&&Ne(qe.prototype,Ae),De&&Ne(qe,De),qe}}(),de=re(0),ue=we(de),ce=re(21),he=we(ce),pe=re(11),fe=we(pe),ge=re(8),be=we(ge),me=re(10),ve=we(me),ye=re(34);function we(Ne){return Ne&&Ne.__esModule?Ne:{default:Ne}}function Se(Ne){if(Array.isArray(Ne)){for(var qe=0,Ae=Array(Ne.length);qe<Ne.length;qe++)Ae[qe]=Ne[qe];return Ae}else return Array.from(Ne)}function _e(Ne,qe){if(!(Ne instanceof qe))throw new TypeError("Cannot call a class as a function")}var Ce=(0,ve.default)("quill:selection"),Le=function Ne(qe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_e(this,Ne),this.index=qe,this.length=Ae},Pe=function(){function Ne(qe,Ae){var De=this;_e(this,Ne),this.emitter=Ae,this.scroll=qe,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.rootDocument=this.root.getRootNode?this.root.getRootNode():document,this.cursor=ue.default.create("cursor",this),this.lastRange=this.savedRange=new Le(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM(ye.SHADOW_SELECTIONCHANGE,document,function(){De.mouseDown||setTimeout(De.update.bind(De,be.default.sources.USER),1)}),this.emitter.on(be.default.events.EDITOR_CHANGE,function(Me,Be){Me===be.default.events.TEXT_CHANGE&&Be.length()>0&&De.update(be.default.sources.SILENT)}),this.emitter.on(be.default.events.SCROLL_BEFORE_UPDATE,function(){if(De.hasFocus()){var Me=De.getNativeRange();Me!=null&&Me.start.node!==De.cursor.textNode&&De.emitter.once(be.default.events.SCROLL_UPDATE,function(){try{De.setNativeRange(Me.start.node,Me.start.offset,Me.end.node,Me.end.offset)}catch{}})}}),this.emitter.on(be.default.events.SCROLL_OPTIMIZE,function(Me,Be){if(Be.range){var Ve=Be.range,Je=Ve.startNode,Ye=Ve.startOffset,kt=Ve.endNode,Qe=Ve.endOffset;De.setNativeRange(Je,Ye,kt,Qe)}}),this.update(be.default.sources.SILENT)}return oe(Ne,[{key:"handleComposition",value:function(){var Ae=this;this.root.addEventListener("compositionstart",function(){Ae.composing=!0}),this.root.addEventListener("compositionend",function(){if(Ae.composing=!1,Ae.cursor.parent){var De=Ae.cursor.restore();if(!De)return;setTimeout(function(){Ae.setNativeRange(De.startNode,De.startOffset,De.endNode,De.endOffset)},1)}})}},{key:"handleDragging",value:function(){var Ae=this;this.emitter.listenDOM("mousedown",document.body,function(){Ae.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){Ae.mouseDown=!1,Ae.update(be.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(Ae,De){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[Ae])){this.scroll.update();var Me=this.getNativeRange();if(!(Me==null||!Me.native.collapsed||ue.default.query(Ae,ue.default.Scope.BLOCK))){if(Me.start.node!==this.cursor.textNode){var Be=ue.default.find(Me.start.node,!1);if(Be==null)return;if(Be instanceof ue.default.Leaf){var Ve=Be.split(Me.start.offset);Be.parent.insertBefore(this.cursor,Ve)}else Be.insertBefore(this.cursor,Me.start.node);this.cursor.attach()}this.cursor.format(Ae,De),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Me=this.scroll.length();Ae=Math.min(Ae,Me-1),De=Math.min(Ae+De,Me-1)-Ae;var Be=void 0,Ve=this.scroll.leaf(Ae),Je=ne(Ve,2),Ye=Je[0],kt=Je[1];if(Ye==null)return null;var Qe=Ye.position(kt,!0),We=ne(Qe,2);Be=We[0],kt=We[1];var Fe=document.createRange();if(De>0){Fe.setStart(Be,kt);var He=this.scroll.leaf(Ae+De),Ge=ne(He,2);if(Ye=Ge[0],kt=Ge[1],Ye==null)return null;var Xe=Ye.position(kt,!0),Ke=ne(Xe,2);return Be=Ke[0],kt=Ke[1],Fe.setEnd(Be,kt),Fe.getBoundingClientRect()}else{var je="left",Ze=void 0;return Be instanceof Text?(kt<Be.data.length?(Fe.setStart(Be,kt),Fe.setEnd(Be,kt+1)):(Fe.setStart(Be,kt-1),Fe.setEnd(Be,kt),je="right"),Ze=Fe.getBoundingClientRect()):(Ze=Ye.domNode.getBoundingClientRect(),kt>0&&(je="right")),{bottom:Ze.top+Ze.height,height:Ze.height,left:Ze[je],right:Ze[je],top:Ze.top,width:0}}}},{key:"getNativeRange",value:function(){var Ae=(0,ye.getRange)(this.rootDocument);if(Ae==null)return null;var De=this.normalizeNative(Ae);return Ce.info("getNativeRange",De),De}},{key:"getRange",value:function(){var Ae=this.getNativeRange();if(Ae==null)return[null,null];var De=this.normalizedToRange(Ae);return[De,Ae]}},{key:"hasFocus",value:function(){return this.rootDocument.activeElement===this.root}},{key:"normalizedToRange",value:function(Ae){var De=this,Me=[[Ae.start.node,Ae.start.offset]];Ae.native.collapsed||Me.push([Ae.end.node,Ae.end.offset]);var Be=Me.map(function(Ye){var kt=ne(Ye,2),Qe=kt[0],We=kt[1],Fe=ue.default.find(Qe,!0),He=Fe.offset(De.scroll);return We===0?He:Fe instanceof ue.default.Container?He+Fe.length():He+Fe.index(Qe,We)}),Ve=Math.min(Math.max.apply(Math,Se(Be)),this.scroll.length()-1),Je=Math.min.apply(Math,[Ve].concat(Se(Be)));return new Le(Je,Ve-Je)}},{key:"normalizeNative",value:function(Ae){if(!Ie(this.root,Ae.startContainer)||!Ae.collapsed&&!Ie(this.root,Ae.endContainer))return null;var De={start:{node:Ae.startContainer,offset:Ae.startOffset},end:{node:Ae.endContainer,offset:Ae.endOffset},native:Ae};return[De.start,De.end].forEach(function(Me){for(var Be=Me.node,Ve=Me.offset;!(Be instanceof Text)&&Be.childNodes.length>0;)if(Be.childNodes.length>Ve)Be=Be.childNodes[Ve],Ve=0;else if(Be.childNodes.length===Ve)Be=Be.lastChild,Ve=Be instanceof Text?Be.data.length:Be.childNodes.length+1;else break;Me.node=Be,Me.offset=Ve}),De}},{key:"rangeToNative",value:function(Ae){var De=this,Me=Ae.collapsed?[Ae.index]:[Ae.index,Ae.index+Ae.length],Be=[],Ve=this.scroll.length();return Me.forEach(function(Je,Ye){Je=Math.min(Ve-1,Je);var kt=void 0,Qe=De.scroll.leaf(Je),We=ne(Qe,2),Fe=We[0],He=We[1],Ge=Fe.position(He,Ye!==0),Xe=ne(Ge,2);kt=Xe[0],He=Xe[1],Be.push(kt,He)}),Be.length<2&&(Be=Be.concat(Be)),Be}},{key:"scrollIntoView",value:function(Ae){var De=this.lastRange;if(De!=null){var Me=this.getBounds(De.index,De.length);if(Me!=null){var Be=this.scroll.length()-1,Ve=this.scroll.line(Math.min(De.index,Be)),Je=ne(Ve,1),Ye=Je[0],kt=Ye;if(De.length>0){var Qe=this.scroll.line(Math.min(De.index+De.length,Be)),We=ne(Qe,1);kt=We[0]}if(!(Ye==null||kt==null)){var Fe=Ae.getBoundingClientRect();Me.top<Fe.top?Ae.scrollTop-=Fe.top-Me.top:Me.bottom>Fe.bottom&&(Ae.scrollTop+=Me.bottom-Fe.bottom)}}}}},{key:"setNativeRange",value:function(Ae,De){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ae,Be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:De,Ve=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Ce.info("setNativeRange",Ae,De,Me,Be),!(Ae!=null&&(this.root.parentNode==null||Ae.parentNode==null||Me.parentNode==null))){var Je=typeof this.rootDocument.getSelection=="function"?this.rootDocument.getSelection():document.getSelection();if(Je!=null)if(Ae!=null){this.hasFocus()||this.root.focus();var Ye=(this.getNativeRange()||{}).native;if(Ye==null||Ve||Ae!==Ye.startContainer||De!==Ye.startOffset||Me!==Ye.endContainer||Be!==Ye.endOffset){Ae.tagName=="BR"&&(De=[].indexOf.call(Ae.parentNode.childNodes,Ae),Ae=Ae.parentNode),Me.tagName=="BR"&&(Be=[].indexOf.call(Me.parentNode.childNodes,Me),Me=Me.parentNode);var kt=document.createRange();kt.setStart(Ae,De),kt.setEnd(Me,Be),Je.removeAllRanges(),Je.addRange(kt)}}else Je.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:be.default.sources.API;if(typeof De=="string"&&(Me=De,De=!1),Ce.info("setRange",Ae),Ae!=null){var Be=this.rangeToNative(Ae);this.setNativeRange.apply(this,Se(Be).concat([De]))}else this.setNativeRange(null);this.update(Me)}},{key:"update",value:function(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:be.default.sources.USER,De=this.lastRange,Me=this.getRange(),Be=ne(Me,2),Ve=Be[0],Je=Be[1];if(this.lastRange=Ve,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,fe.default)(De,this.lastRange)){var Ye;!this.composing&&Je!=null&&Je.native.collapsed&&Je.start.node!==this.cursor.textNode&&this.cursor.restore();var kt=[be.default.events.SELECTION_CHANGE,(0,he.default)(this.lastRange),(0,he.default)(De),Ae];if((Ye=this.emitter).emit.apply(Ye,[be.default.events.EDITOR_CHANGE].concat(kt)),Ae!==be.default.sources.SILENT){var Qe;(Qe=this.emitter).emit.apply(Qe,kt)}}}}]),Ne}();function Ie(Ne,qe){try{qe.parentNode}catch{return!1}return qe instanceof Text&&(qe=qe.parentNode),Ne.contains(qe)}te.Range=Le,te.default=Pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(0),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return ne(me,[{key:"insertInto",value:function(ye,we){ye.children.length===0?oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"insertInto",this).call(this,ye,we):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),me}(ue.default.Embed);ge.blotName="break",ge.tagName="BR",te.default=ge},function(J,te,re){var ne=this&&this.__extends||function(){var pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ge){fe.__proto__=ge}||function(fe,ge){for(var be in ge)ge.hasOwnProperty(be)&&(fe[be]=ge[be])};return function(fe,ge){pe(fe,ge);function be(){this.constructor=fe}fe.prototype=ge===null?Object.create(ge):(be.prototype=ge.prototype,new be)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(45),de=re(30),ue=re(1),ce=function(pe){ne(fe,pe);function fe(ge){var be=pe.call(this,ge)||this;return be.build(),be}return fe.prototype.appendChild=function(ge){this.insertBefore(ge)},fe.prototype.attach=function(){pe.prototype.attach.call(this),this.children.forEach(function(ge){ge.attach()})},fe.prototype.build=function(){var ge=this;this.children=new oe.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(be){try{var me=he(be);ge.insertBefore(me,ge.children.head||void 0)}catch(ve){if(ve instanceof ue.ParchmentError)return;throw ve}})},fe.prototype.deleteAt=function(ge,be){if(ge===0&&be===this.length())return this.remove();this.children.forEachAt(ge,be,function(me,ve,ye){me.deleteAt(ve,ye)})},fe.prototype.descendant=function(ge,be){var me=this.children.find(be),ve=me[0],ye=me[1];return ge.blotName==null&&ge(ve)||ge.blotName!=null&&ve instanceof ge?[ve,ye]:ve instanceof fe?ve.descendant(ge,ye):[null,-1]},fe.prototype.descendants=function(ge,be,me){be===void 0&&(be=0),me===void 0&&(me=Number.MAX_VALUE);var ve=[],ye=me;return this.children.forEachAt(be,me,function(we,Se,_e){(ge.blotName==null&&ge(we)||ge.blotName!=null&&we instanceof ge)&&ve.push(we),we instanceof fe&&(ve=ve.concat(we.descendants(ge,Se,ye))),ye-=_e}),ve},fe.prototype.detach=function(){this.children.forEach(function(ge){ge.detach()}),pe.prototype.detach.call(this)},fe.prototype.formatAt=function(ge,be,me,ve){this.children.forEachAt(ge,be,function(ye,we,Se){ye.formatAt(we,Se,me,ve)})},fe.prototype.insertAt=function(ge,be,me){var ve=this.children.find(ge),ye=ve[0],we=ve[1];if(ye)ye.insertAt(we,be,me);else{var Se=me==null?ue.create("text",be):ue.create(be,me);this.appendChild(Se)}},fe.prototype.insertBefore=function(ge,be){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(me){return ge instanceof me}))throw new ue.ParchmentError("Cannot insert "+ge.statics.blotName+" into "+this.statics.blotName);ge.insertInto(this,be)},fe.prototype.length=function(){return this.children.reduce(function(ge,be){return ge+be.length()},0)},fe.prototype.moveChildren=function(ge,be){this.children.forEach(function(me){ge.insertBefore(me,be)})},fe.prototype.optimize=function(ge){if(pe.prototype.optimize.call(this,ge),this.children.length===0)if(this.statics.defaultChild!=null){var be=ue.create(this.statics.defaultChild);this.appendChild(be),be.optimize(ge)}else this.remove()},fe.prototype.path=function(ge,be){be===void 0&&(be=!1);var me=this.children.find(ge,be),ve=me[0],ye=me[1],we=[[this,ge]];return ve instanceof fe?we.concat(ve.path(ye,be)):(ve!=null&&we.push([ve,ye]),we)},fe.prototype.removeChild=function(ge){this.children.remove(ge)},fe.prototype.replace=function(ge){ge instanceof fe&&ge.moveChildren(this),pe.prototype.replace.call(this,ge)},fe.prototype.split=function(ge,be){if(be===void 0&&(be=!1),!be){if(ge===0)return this;if(ge===this.length())return this.next}var me=this.clone();return this.parent.insertBefore(me,this.next),this.children.forEachAt(ge,this.length(),function(ve,ye,we){ve=ve.split(ye,be),me.appendChild(ve)}),me},fe.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},fe.prototype.update=function(ge,be){var me=this,ve=[],ye=[];ge.forEach(function(we){we.target===me.domNode&&we.type==="childList"&&(ve.push.apply(ve,we.addedNodes),ye.push.apply(ye,we.removedNodes))}),ye.forEach(function(we){if(!(we.parentNode!=null&&we.tagName!=="IFRAME"&&document.body.compareDocumentPosition(we)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var Se=ue.find(we);Se!=null&&(Se.domNode.parentNode==null||Se.domNode.parentNode===me.domNode)&&Se.detach()}}),ve.filter(function(we){return we.parentNode==me.domNode}).sort(function(we,Se){return we===Se?0:we.compareDocumentPosition(Se)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(we){var Se=null;we.nextSibling!=null&&(Se=ue.find(we.nextSibling));var _e=he(we);(_e.next!=Se||_e.next==null)&&(_e.parent!=null&&_e.parent.removeChild(me),me.insertBefore(_e,Se||void 0))})},fe}(de.default);function he(pe){var fe=ue.find(pe);if(fe==null)try{fe=ue.create(pe)}catch{fe=ue.create(ue.Scope.INLINE),[].slice.call(pe.childNodes).forEach(function(be){fe.domNode.appendChild(be)}),pe.parentNode&&pe.parentNode.replaceChild(fe.domNode,pe),fe.attach()}return fe}te.default=ce},function(J,te,re){var ne=this&&this.__extends||function(){var pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ge){fe.__proto__=ge}||function(fe,ge){for(var be in ge)ge.hasOwnProperty(be)&&(fe[be]=ge[be])};return function(fe,ge){pe(fe,ge);function be(){this.constructor=fe}fe.prototype=ge===null?Object.create(ge):(be.prototype=ge.prototype,new be)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(12),de=re(31),ue=re(17),ce=re(1),he=function(pe){ne(fe,pe);function fe(ge){var be=pe.call(this,ge)||this;return be.attributes=new de.default(be.domNode),be}return fe.formats=function(ge){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return ge.tagName.toLowerCase()},fe.prototype.format=function(ge,be){var me=ce.query(ge);me instanceof oe.default?this.attributes.attribute(me,be):be&&me!=null&&(ge!==this.statics.blotName||this.formats()[ge]!==be)&&this.replaceWith(ge,be)},fe.prototype.formats=function(){var ge=this.attributes.values(),be=this.statics.formats(this.domNode);return be!=null&&(ge[this.statics.blotName]=be),ge},fe.prototype.replaceWith=function(ge,be){var me=pe.prototype.replaceWith.call(this,ge,be);return this.attributes.copy(me),me},fe.prototype.update=function(ge,be){var me=this;pe.prototype.update.call(this,ge,be),ge.some(function(ve){return ve.target===me.domNode&&ve.type==="attributes"})&&this.attributes.build()},fe.prototype.wrap=function(ge,be){var me=pe.prototype.wrap.call(this,ge,be);return me instanceof fe&&me.statics.scope===this.statics.scope&&this.attributes.move(me),me},fe}(ue.default);te.default=he},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(30),de=re(1),ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.value=function(pe){return!0},he.prototype.index=function(pe,fe){return this.domNode===pe||this.domNode.compareDocumentPosition(pe)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(fe,1):-1},he.prototype.position=function(pe,fe){var ge=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return pe>0&&(ge+=1),[this.parent.domNode,ge]},he.prototype.value=function(){var pe;return pe={},pe[this.statics.blotName]=this.statics.value(this.domNode)||!0,pe},he.scope=de.Scope.INLINE_BLOT,he}(oe.default);te.default=ue},function(J,te,re){var ne=re(11),oe=re(3),de={attributes:{compose:function(ce,he,pe){typeof ce!="object"&&(ce={}),typeof he!="object"&&(he={});var fe=oe(!0,{},he);pe||(fe=Object.keys(fe).reduce(function(be,me){return fe[me]!=null&&(be[me]=fe[me]),be},{}));for(var ge in ce)ce[ge]!==void 0&&he[ge]===void 0&&(fe[ge]=ce[ge]);return Object.keys(fe).length>0?fe:void 0},diff:function(ce,he){typeof ce!="object"&&(ce={}),typeof he!="object"&&(he={});var pe=Object.keys(ce).concat(Object.keys(he)).reduce(function(fe,ge){return ne(ce[ge],he[ge])||(fe[ge]=he[ge]===void 0?null:he[ge]),fe},{});return Object.keys(pe).length>0?pe:void 0},transform:function(ce,he,pe){if(typeof ce!="object")return he;if(typeof he=="object"){if(!pe)return he;var fe=Object.keys(he).reduce(function(ge,be){return ce[be]===void 0&&(ge[be]=he[be]),ge},{});return Object.keys(fe).length>0?fe:void 0}}},iterator:function(ce){return new ue(ce)},length:function(ce){return typeof ce.delete=="number"?ce.delete:typeof ce.retain=="number"?ce.retain:typeof ce.insert=="string"?ce.insert.length:1}};function ue(ce){this.ops=ce,this.index=0,this.offset=0}ue.prototype.hasNext=function(){return this.peekLength()<1/0},ue.prototype.next=function(ce){ce||(ce=1/0);var he=this.ops[this.index];if(he){var pe=this.offset,fe=de.length(he);if(ce>=fe-pe?(ce=fe-pe,this.index+=1,this.offset=0):this.offset+=ce,typeof he.delete=="number")return{delete:ce};var ge={};return he.attributes&&(ge.attributes=he.attributes),typeof he.retain=="number"?ge.retain=ce:typeof he.insert=="string"?ge.insert=he.insert.substr(pe,ce):ge.insert=he.insert,ge}else return{retain:1/0}},ue.prototype.peek=function(){return this.ops[this.index]},ue.prototype.peekLength=function(){return this.ops[this.index]?de.length(this.ops[this.index])-this.offset:1/0},ue.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},ue.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var ce=this.offset,he=this.index,pe=this.next(),fe=this.ops.slice(this.index);return this.offset=ce,this.index=he,[pe].concat(fe)}else return[]},J.exports=de},function(J,te){var re=function(){function ne(me,ve){return ve!=null&&me instanceof ve}var oe;try{oe=Map}catch{oe=function(){}}var de;try{de=Set}catch{de=function(){}}var ue;try{ue=Promise}catch{ue=function(){}}function ce(me,ve,ye,we,Se){typeof ve=="object"&&(ye=ve.depth,we=ve.prototype,Se=ve.includeNonEnumerable,ve=ve.circular);var _e=[],Ce=[],Le=typeof Buffer<"u";typeof ve>"u"&&(ve=!0),typeof ye>"u"&&(ye=1/0);function Pe(Ie,Ne){if(Ie===null)return null;if(Ne===0)return Ie;var qe,Ae;if(typeof Ie!="object")return Ie;if(ne(Ie,oe))qe=new oe;else if(ne(Ie,de))qe=new de;else if(ne(Ie,ue))qe=new ue(function(We,Fe){Ie.then(function(He){We(Pe(He,Ne-1))},function(He){Fe(Pe(He,Ne-1))})});else if(ce.__isArray(Ie))qe=[];else if(ce.__isRegExp(Ie))qe=new RegExp(Ie.source,be(Ie)),Ie.lastIndex&&(qe.lastIndex=Ie.lastIndex);else if(ce.__isDate(Ie))qe=new Date(Ie.getTime());else{if(Le&&Buffer.isBuffer(Ie))return Buffer.allocUnsafe?qe=Buffer.allocUnsafe(Ie.length):qe=new Buffer(Ie.length),Ie.copy(qe),qe;ne(Ie,Error)?qe=Object.create(Ie):typeof we>"u"?(Ae=Object.getPrototypeOf(Ie),qe=Object.create(Ae)):(qe=Object.create(we),Ae=we)}if(ve){var De=_e.indexOf(Ie);if(De!=-1)return Ce[De];_e.push(Ie),Ce.push(qe)}ne(Ie,oe)&&Ie.forEach(function(We,Fe){var He=Pe(Fe,Ne-1),Ge=Pe(We,Ne-1);qe.set(He,Ge)}),ne(Ie,de)&&Ie.forEach(function(We){var Fe=Pe(We,Ne-1);qe.add(Fe)});for(var Me in Ie){var Be;Ae&&(Be=Object.getOwnPropertyDescriptor(Ae,Me)),!(Be&&Be.set==null)&&(qe[Me]=Pe(Ie[Me],Ne-1))}if(Object.getOwnPropertySymbols)for(var Ve=Object.getOwnPropertySymbols(Ie),Me=0;Me<Ve.length;Me++){var Je=Ve[Me],Ye=Object.getOwnPropertyDescriptor(Ie,Je);Ye&&!Ye.enumerable&&!Se||(qe[Je]=Pe(Ie[Je],Ne-1),Ye.enumerable||Object.defineProperty(qe,Je,{enumerable:!1}))}if(Se)for(var kt=Object.getOwnPropertyNames(Ie),Me=0;Me<kt.length;Me++){var Qe=kt[Me],Ye=Object.getOwnPropertyDescriptor(Ie,Qe);Ye&&Ye.enumerable||(qe[Qe]=Pe(Ie[Qe],Ne-1),Object.defineProperty(qe,Qe,{enumerable:!1}))}return qe}return Pe(me,ye)}ce.clonePrototype=function(ve){if(ve===null)return null;var ye=function(){};return ye.prototype=ve,new ye};function he(me){return Object.prototype.toString.call(me)}ce.__objToStr=he;function pe(me){return typeof me=="object"&&he(me)==="[object Date]"}ce.__isDate=pe;function fe(me){return typeof me=="object"&&he(me)==="[object Array]"}ce.__isArray=fe;function ge(me){return typeof me=="object"&&he(me)==="[object RegExp]"}ce.__isRegExp=ge;function be(me){var ve="";return me.global&&(ve+="g"),me.ignoreCase&&(ve+="i"),me.multiline&&(ve+="m"),ve}return ce.__getRegExpFlags=be,ce}();typeof J=="object"&&J.exports&&(J.exports=re)},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function qe(Ae,De){var Me=[],Be=!0,Ve=!1,Je=void 0;try{for(var Ye=Ae[Symbol.iterator](),kt;!(Be=(kt=Ye.next()).done)&&(Me.push(kt.value),!(De&&Me.length===De));Be=!0);}catch(Qe){Ve=!0,Je=Qe}finally{try{!Be&&Ye.return&&Ye.return()}finally{if(Ve)throw Je}}return Me}return function(Ae,De){if(Array.isArray(Ae))return Ae;if(Symbol.iterator in Object(Ae))return qe(Ae,De);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function qe(Ae,De){for(var Me=0;Me<De.length;Me++){var Be=De[Me];Be.enumerable=Be.enumerable||!1,Be.configurable=!0,"value"in Be&&(Be.writable=!0),Object.defineProperty(Ae,Be.key,Be)}}return function(Ae,De,Me){return De&&qe(Ae.prototype,De),Me&&qe(Ae,Me),Ae}}(),de=function qe(Ae,De,Me){Ae===null&&(Ae=Function.prototype);var Be=Object.getOwnPropertyDescriptor(Ae,De);if(Be===void 0){var Ve=Object.getPrototypeOf(Ae);return Ve===null?void 0:qe(Ve,De,Me)}else{if("value"in Be)return Be.value;var Je=Be.get;return Je===void 0?void 0:Je.call(Me)}},ue=re(0),ce=_e(ue),he=re(8),pe=_e(he),fe=re(4),ge=_e(fe),be=re(16),me=_e(be),ve=re(13),ye=_e(ve),we=re(25),Se=_e(we);function _e(qe){return qe&&qe.__esModule?qe:{default:qe}}function Ce(qe,Ae){if(!(qe instanceof Ae))throw new TypeError("Cannot call a class as a function")}function Le(qe,Ae){if(!qe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ae&&(typeof Ae=="object"||typeof Ae=="function")?Ae:qe}function Pe(qe,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ae);qe.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:qe,enumerable:!1,writable:!0,configurable:!0}}),Ae&&(Object.setPrototypeOf?Object.setPrototypeOf(qe,Ae):qe.__proto__=Ae)}function Ie(qe){return qe instanceof ge.default||qe instanceof fe.BlockEmbed}var Ne=function(qe){Pe(Ae,qe);function Ae(De,Me){Ce(this,Ae);var Be=Le(this,(Ae.__proto__||Object.getPrototypeOf(Ae)).call(this,De));return Be.emitter=Me.emitter,Array.isArray(Me.whitelist)&&(Be.whitelist=Me.whitelist.reduce(function(Ve,Je){return Ve[Je]=!0,Ve},{})),Be.domNode.addEventListener("DOMNodeInserted",function(){}),Be.optimize(),Be.enable(),Be}return oe(Ae,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(Me,Be){var Ve=this.line(Me),Je=ne(Ve,2),Ye=Je[0],kt=Je[1],Qe=this.line(Me+Be),We=ne(Qe,1),Fe=We[0];if(de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"deleteAt",this).call(this,Me,Be),Fe!=null&&Ye!==Fe&&kt>0){if(Ye instanceof fe.BlockEmbed||Fe instanceof fe.BlockEmbed){this.optimize();return}if(Ye instanceof ye.default){var He=Ye.newlineIndex(Ye.length(),!0);if(He>-1&&(Ye=Ye.split(He+1),Ye===Fe)){this.optimize();return}}else if(Fe instanceof ye.default){var Ge=Fe.newlineIndex(0);Ge>-1&&Fe.split(Ge+1)}var Xe=Fe.children.head instanceof me.default?null:Fe.children.head;Ye.moveChildren(Fe,Xe),Ye.remove()}this.optimize()}},{key:"enable",value:function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",Me)}},{key:"formatAt",value:function(Me,Be,Ve,Je){this.whitelist!=null&&!this.whitelist[Ve]||(de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"formatAt",this).call(this,Me,Be,Ve,Je),this.optimize())}},{key:"insertAt",value:function(Me,Be,Ve){if(!(Ve!=null&&this.whitelist!=null&&!this.whitelist[Be])){if(Me>=this.length())if(Ve==null||ce.default.query(Be,ce.default.Scope.BLOCK)==null){var Je=ce.default.create(this.statics.defaultChild);this.appendChild(Je),Ve==null&&Be.endsWith(`
|
|
6584
|
+
`)&&(Be=Be.slice(0,-1)),Je.insertAt(0,Be,Ve)}else{var Ye=ce.default.create(Be,Ve);this.appendChild(Ye)}else de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"insertAt",this).call(this,Me,Be,Ve);this.optimize()}}},{key:"insertBefore",value:function(Me,Be){if(Me.statics.scope===ce.default.Scope.INLINE_BLOT){var Ve=ce.default.create(this.statics.defaultChild);Ve.appendChild(Me),Me=Ve}de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"insertBefore",this).call(this,Me,Be)}},{key:"leaf",value:function(Me){return this.path(Me).pop()||[null,-1]}},{key:"line",value:function(Me){return Me===this.length()?this.line(Me-1):this.descendant(Ie,Me)}},{key:"lines",value:function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,Ve=function Je(Ye,kt,Qe){var We=[],Fe=Qe;return Ye.children.forEachAt(kt,Qe,function(He,Ge,Xe){Ie(He)?We.push(He):He instanceof ce.default.Container&&(We=We.concat(Je(He,Ge,Fe))),Fe-=Xe}),We};return Ve(this,Me,Be)}},{key:"optimize",value:function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"optimize",this).call(this,Me,Be),Me.length>0&&this.emitter.emit(pe.default.events.SCROLL_OPTIMIZE,Me,Be))}},{key:"path",value:function(Me){return de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"path",this).call(this,Me).slice(1)}},{key:"update",value:function(Me){if(this.batch!==!0){var Be=pe.default.sources.USER;typeof Me=="string"&&(Be=Me),Array.isArray(Me)||(Me=this.observer.takeRecords()),Me.length>0&&this.emitter.emit(pe.default.events.SCROLL_BEFORE_UPDATE,Be,Me),de(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"update",this).call(this,Me.concat([])),Me.length>0&&this.emitter.emit(pe.default.events.SCROLL_UPDATE,Be,Me)}}}]),Ae}(ce.default.Scroll);Ne.blotName="scroll",Ne.className="ql-editor",Ne.tagName="DIV",Ne.defaultChild="block",Ne.allowedChildren=[ge.default,fe.BlockEmbed,Se.default],te.default=Ne},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.SHORTKEY=te.default=void 0;var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(je){return typeof je}:function(je){return je&&typeof Symbol=="function"&&je.constructor===Symbol&&je!==Symbol.prototype?"symbol":typeof je},oe=function(){function je(Ze,nt){var ot=[],Ct=!0,Lt=!1,Bt=void 0;try{for(var jt=Ze[Symbol.iterator](),Kt;!(Ct=(Kt=jt.next()).done)&&(ot.push(Kt.value),!(nt&&ot.length===nt));Ct=!0);}catch(ei){Lt=!0,Bt=ei}finally{try{!Ct&&jt.return&&jt.return()}finally{if(Lt)throw Bt}}return ot}return function(Ze,nt){if(Array.isArray(Ze))return Ze;if(Symbol.iterator in Object(Ze))return je(Ze,nt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),de=function(){function je(Ze,nt){for(var ot=0;ot<nt.length;ot++){var Ct=nt[ot];Ct.enumerable=Ct.enumerable||!1,Ct.configurable=!0,"value"in Ct&&(Ct.writable=!0),Object.defineProperty(Ze,Ct.key,Ct)}}return function(Ze,nt,ot){return nt&&je(Ze.prototype,nt),ot&&je(Ze,ot),Ze}}(),ue=re(21),ce=qe(ue),he=re(11),pe=qe(he),fe=re(3),ge=qe(fe),be=re(2),me=qe(be),ve=re(20),ye=qe(ve),we=re(0),Se=qe(we),_e=re(5),Ce=qe(_e),Le=re(10),Pe=qe(Le),Ie=re(9),Ne=qe(Ie);function qe(je){return je&&je.__esModule?je:{default:je}}function Ae(je,Ze,nt){return Ze in je?Object.defineProperty(je,Ze,{value:nt,enumerable:!0,configurable:!0,writable:!0}):je[Ze]=nt,je}function De(je,Ze){if(!(je instanceof Ze))throw new TypeError("Cannot call a class as a function")}function Me(je,Ze){if(!je)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ze&&(typeof Ze=="object"||typeof Ze=="function")?Ze:je}function Be(je,Ze){if(typeof Ze!="function"&&Ze!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ze);je.prototype=Object.create(Ze&&Ze.prototype,{constructor:{value:je,enumerable:!1,writable:!0,configurable:!0}}),Ze&&(Object.setPrototypeOf?Object.setPrototypeOf(je,Ze):je.__proto__=Ze)}var Ve=(0,Pe.default)("quill:keyboard"),Je=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Ye=function(je){Be(Ze,je),de(Ze,null,[{key:"match",value:function(ot,Ct){return Ct=Ke(Ct),["altKey","ctrlKey","metaKey","shiftKey"].some(function(Lt){return!!Ct[Lt]!==ot[Lt]&&Ct[Lt]!==null})?!1:Ct.key===(ot.which||ot.keyCode)}}]);function Ze(nt,ot){De(this,Ze);var Ct=Me(this,(Ze.__proto__||Object.getPrototypeOf(Ze)).call(this,nt,ot));return Ct.bindings={},Object.keys(Ct.options.bindings).forEach(function(Lt){Lt==="list autofill"&&nt.scroll.whitelist!=null&&!nt.scroll.whitelist.list||Ct.options.bindings[Lt]&&Ct.addBinding(Ct.options.bindings[Lt])}),Ct.addBinding({key:Ze.keys.ENTER,shiftKey:null},He),Ct.addBinding({key:Ze.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(Ct.addBinding({key:Ze.keys.BACKSPACE},{collapsed:!0},Qe),Ct.addBinding({key:Ze.keys.DELETE},{collapsed:!0},We)):(Ct.addBinding({key:Ze.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},Qe),Ct.addBinding({key:Ze.keys.DELETE},{collapsed:!0,suffix:/^.?$/},We)),Ct.addBinding({key:Ze.keys.BACKSPACE},{collapsed:!1},Fe),Ct.addBinding({key:Ze.keys.DELETE},{collapsed:!1},Fe),Ct.addBinding({key:Ze.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},Qe),Ct.listen(),Ct}return de(Ze,[{key:"addBinding",value:function(ot){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Bt=Ke(ot);if(Bt==null||Bt.key==null)return Ve.warn("Attempted to add invalid keyboard binding",Bt);typeof Ct=="function"&&(Ct={handler:Ct}),typeof Lt=="function"&&(Lt={handler:Lt}),Bt=(0,ge.default)(Bt,Ct,Lt),this.bindings[Bt.key]=this.bindings[Bt.key]||[],this.bindings[Bt.key].push(Bt)}},{key:"listen",value:function(){var ot=this;this.quill.root.addEventListener("keydown",function(Ct){if(!Ct.defaultPrevented){var Lt=Ct.which||Ct.keyCode,Bt=(ot.bindings[Lt]||[]).filter(function(ci){return Ze.match(Ct,ci)});if(Bt.length!==0){var jt=ot.quill.getSelection();if(!(jt==null||!ot.quill.hasFocus())){var Kt=ot.quill.getLine(jt.index),ei=oe(Kt,2),mi=ei[0],di=ei[1],xt=ot.quill.getLeaf(jt.index),St=oe(xt,2),qt=St[0],Dt=St[1],Tt=jt.length===0?[qt,Dt]:ot.quill.getLeaf(jt.index+jt.length),Gt=oe(Tt,2),Wt=Gt[0],Yt=Gt[1],pi=qt instanceof Se.default.Text?qt.value().slice(0,Dt):"",yi=Wt instanceof Se.default.Text?Wt.value().slice(Yt):"",ai={collapsed:jt.length===0,empty:jt.length===0&&mi.length()<=1,format:ot.quill.getFormat(jt),offset:di,prefix:pi,suffix:yi},Ii=Bt.some(function(ci){if(ci.collapsed!=null&&ci.collapsed!==ai.collapsed||ci.empty!=null&&ci.empty!==ai.empty||ci.offset!=null&&ci.offset!==ai.offset)return!1;if(Array.isArray(ci.format)){if(ci.format.every(function(it){return ai.format[it]==null}))return!1}else if(ne(ci.format)==="object"&&!Object.keys(ci.format).every(function(it){return ci.format[it]===!0?ai.format[it]!=null:ci.format[it]===!1?ai.format[it]==null:(0,pe.default)(ci.format[it],ai.format[it])}))return!1;return ci.prefix!=null&&!ci.prefix.test(ai.prefix)||ci.suffix!=null&&!ci.suffix.test(ai.suffix)?!1:ci.handler.call(ot,jt,ai)!==!0});Ii&&Ct.preventDefault()}}}})}}]),Ze}(Ne.default);Ye.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},Ye.DEFAULTS={bindings:{bold:Xe("bold"),italic:Xe("italic"),underline:Xe("underline"),indent:{key:Ye.keys.TAB,format:["blockquote","indent","list"],handler:function(Ze,nt){if(nt.collapsed&&nt.offset!==0)return!0;this.quill.format("indent","+1",Ce.default.sources.USER)}},outdent:{key:Ye.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Ze,nt){if(nt.collapsed&&nt.offset!==0)return!0;this.quill.format("indent","-1",Ce.default.sources.USER)}},"outdent backspace":{key:Ye.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Ze,nt){nt.format.indent!=null?this.quill.format("indent","-1",Ce.default.sources.USER):nt.format.list!=null&&this.quill.format("list",!1,Ce.default.sources.USER)}},"indent code-block":Ge(!0),"outdent code-block":Ge(!1),"remove tab":{key:Ye.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Ze){this.quill.deleteText(Ze.index-1,1,Ce.default.sources.USER)}},tab:{key:Ye.keys.TAB,handler:function(Ze){this.quill.history.cutoff();var nt=new me.default().retain(Ze.index).delete(Ze.length).insert(" ");this.quill.updateContents(nt,Ce.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Ze.index+1,Ce.default.sources.SILENT)}},"list empty enter":{key:Ye.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Ze,nt){this.quill.format("list",!1,Ce.default.sources.USER),nt.format.indent&&this.quill.format("indent",!1,Ce.default.sources.USER)}},"checklist enter":{key:Ye.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Ze){var nt=this.quill.getLine(Ze.index),ot=oe(nt,2),Ct=ot[0],Lt=ot[1],Bt=(0,ge.default)({},Ct.formats(),{list:"checked"}),jt=new me.default().retain(Ze.index).insert(`
|
|
6547
6585
|
`,Bt).retain(Ct.length()-Lt-1).retain(1,{list:"unchecked"});this.quill.updateContents(jt,Ce.default.sources.USER),this.quill.setSelection(Ze.index+1,Ce.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:Ye.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Ze,nt){var ot=this.quill.getLine(Ze.index),Ct=oe(ot,2),Lt=Ct[0],Bt=Ct[1],jt=new me.default().retain(Ze.index).insert(`
|
|
6548
|
-
`,nt.format).retain(Lt.length()-Bt-1).retain(1,{header:null});this.quill.updateContents(jt,Ce.default.sources.USER),this.quill.setSelection(Ze.index+1,Ce.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Ze,nt){var ot=nt.prefix.length,Ct=this.quill.getLine(Ze.index),Lt=oe(Ct,2),Bt=Lt[0],jt=Lt[1];if(jt>ot)return!0;var Kt=void 0;switch(nt.prefix.trim()){case"[]":case"[ ]":Kt="unchecked";break;case"[x]":Kt="checked";break;case"-":case"*":Kt="bullet";break;default:Kt="ordered"}this.quill.insertText(Ze.index," ",Ce.default.sources.USER),this.quill.history.cutoff();var ei=new me.default().retain(Ze.index-jt).delete(ot+1).retain(Bt.length()-2-jt).retain(1,{list:Kt});this.quill.updateContents(ei,Ce.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Ze.index-ot,Ce.default.sources.SILENT)}},"code exit":{key:Ye.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Ze){var nt=this.quill.getLine(Ze.index),ot=oe(nt,2),Ct=ot[0],Lt=ot[1],Bt=new me.default().retain(Ze.index+Ct.length()-Lt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Bt,Ce.default.sources.USER)}},"embed left":kt(Ye.keys.LEFT,!1),"embed left shift":kt(Ye.keys.LEFT,!0),"embed right":kt(Ye.keys.RIGHT,!1),"embed right shift":kt(Ye.keys.RIGHT,!0)}};function kt(je,Ze){var nt,ot=je===Ye.keys.LEFT?"prefix":"suffix";return nt={key:je,shiftKey:Ze,altKey:null},Ae(nt,ot,/^$/),Ae(nt,"handler",function(Lt){var Bt=Lt.index;je===Ye.keys.RIGHT&&(Bt+=Lt.length+1);var jt=this.quill.getLeaf(Bt),Kt=oe(jt,1),ei=Kt[0];return ei instanceof Se.default.Embed?(je===Ye.keys.LEFT?Ze?this.quill.setSelection(Lt.index-1,Lt.length+1,Ce.default.sources.USER):this.quill.setSelection(Lt.index-1,Ce.default.sources.USER):Ze?this.quill.setSelection(Lt.index,Lt.length+1,Ce.default.sources.USER):this.quill.setSelection(Lt.index+Lt.length+1,Ce.default.sources.USER),!1):!0}),nt}function Qe(je,Ze){if(!(je.index===0||this.quill.getLength()<=1)){var nt=this.quill.getLine(je.index),ot=oe(nt,1),Ct=ot[0],Lt={};if(Ze.offset===0){var Bt=this.quill.getLine(je.index-1),jt=oe(Bt,1),Kt=jt[0];if(Kt!=null&&Kt.length()>1){var ei=Ct.formats(),mi=this.quill.getFormat(je.index-1,1);Lt=ye.default.attributes.diff(ei,mi)||{}}}var di=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Ze.prefix)?2:1;this.quill.deleteText(je.index-di,di,Ce.default.sources.USER),Object.keys(Lt).length>0&&this.quill.formatLine(je.index-di,di,Lt,Ce.default.sources.USER),this.quill.focus()}}function We(je,Ze){var nt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Ze.suffix)?2:1;if(!(je.index>=this.quill.getLength()-nt)){var ot={},Ct=0,Lt=this.quill.getLine(je.index),Bt=oe(Lt,1),jt=Bt[0];if(Ze.offset>=jt.length()-1){var Kt=this.quill.getLine(je.index+1),ei=oe(Kt,1),mi=ei[0];if(mi){var di=jt.formats(),xt=this.quill.getFormat(je.index,1);ot=ye.default.attributes.diff(di,xt)||{},Ct=mi.length()}}this.quill.deleteText(je.index,nt,Ce.default.sources.USER),Object.keys(ot).length>0&&this.quill.formatLine(je.index+Ct-1,nt,ot,Ce.default.sources.USER)}}function
|
|
6586
|
+
`,nt.format).retain(Lt.length()-Bt-1).retain(1,{header:null});this.quill.updateContents(jt,Ce.default.sources.USER),this.quill.setSelection(Ze.index+1,Ce.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Ze,nt){var ot=nt.prefix.length,Ct=this.quill.getLine(Ze.index),Lt=oe(Ct,2),Bt=Lt[0],jt=Lt[1];if(jt>ot)return!0;var Kt=void 0;switch(nt.prefix.trim()){case"[]":case"[ ]":Kt="unchecked";break;case"[x]":Kt="checked";break;case"-":case"*":Kt="bullet";break;default:Kt="ordered"}this.quill.insertText(Ze.index," ",Ce.default.sources.USER),this.quill.history.cutoff();var ei=new me.default().retain(Ze.index-jt).delete(ot+1).retain(Bt.length()-2-jt).retain(1,{list:Kt});this.quill.updateContents(ei,Ce.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Ze.index-ot,Ce.default.sources.SILENT)}},"code exit":{key:Ye.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Ze){var nt=this.quill.getLine(Ze.index),ot=oe(nt,2),Ct=ot[0],Lt=ot[1],Bt=new me.default().retain(Ze.index+Ct.length()-Lt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(Bt,Ce.default.sources.USER)}},"embed left":kt(Ye.keys.LEFT,!1),"embed left shift":kt(Ye.keys.LEFT,!0),"embed right":kt(Ye.keys.RIGHT,!1),"embed right shift":kt(Ye.keys.RIGHT,!0)}};function kt(je,Ze){var nt,ot=je===Ye.keys.LEFT?"prefix":"suffix";return nt={key:je,shiftKey:Ze,altKey:null},Ae(nt,ot,/^$/),Ae(nt,"handler",function(Lt){var Bt=Lt.index;je===Ye.keys.RIGHT&&(Bt+=Lt.length+1);var jt=this.quill.getLeaf(Bt),Kt=oe(jt,1),ei=Kt[0];return ei instanceof Se.default.Embed?(je===Ye.keys.LEFT?Ze?this.quill.setSelection(Lt.index-1,Lt.length+1,Ce.default.sources.USER):this.quill.setSelection(Lt.index-1,Ce.default.sources.USER):Ze?this.quill.setSelection(Lt.index,Lt.length+1,Ce.default.sources.USER):this.quill.setSelection(Lt.index+Lt.length+1,Ce.default.sources.USER),!1):!0}),nt}function Qe(je,Ze){if(!(je.index===0||this.quill.getLength()<=1)){var nt=this.quill.getLine(je.index),ot=oe(nt,1),Ct=ot[0],Lt={};if(Ze.offset===0){var Bt=this.quill.getLine(je.index-1),jt=oe(Bt,1),Kt=jt[0];if(Kt!=null&&Kt.length()>1){var ei=Ct.formats(),mi=this.quill.getFormat(je.index-1,1);Lt=ye.default.attributes.diff(ei,mi)||{}}}var di=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Ze.prefix)?2:1;this.quill.deleteText(je.index-di,di,Ce.default.sources.USER),Object.keys(Lt).length>0&&this.quill.formatLine(je.index-di,di,Lt,Ce.default.sources.USER),this.quill.focus()}}function We(je,Ze){var nt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Ze.suffix)?2:1;if(!(je.index>=this.quill.getLength()-nt)){var ot={},Ct=0,Lt=this.quill.getLine(je.index),Bt=oe(Lt,1),jt=Bt[0];if(Ze.offset>=jt.length()-1){var Kt=this.quill.getLine(je.index+1),ei=oe(Kt,1),mi=ei[0];if(mi){var di=jt.formats(),xt=this.quill.getFormat(je.index,1);ot=ye.default.attributes.diff(di,xt)||{},Ct=mi.length()}}this.quill.deleteText(je.index,nt,Ce.default.sources.USER),Object.keys(ot).length>0&&this.quill.formatLine(je.index+Ct-1,nt,ot,Ce.default.sources.USER)}}function Fe(je){var Ze=this.quill.getLines(je),nt={};if(Ze.length>1){var ot=Ze[0].formats(),Ct=Ze[Ze.length-1].formats();nt=ye.default.attributes.diff(Ct,ot)||{}}this.quill.deleteText(je,Ce.default.sources.USER),Object.keys(nt).length>0&&this.quill.formatLine(je.index,1,nt,Ce.default.sources.USER),this.quill.setSelection(je.index,Ce.default.sources.SILENT),this.quill.focus()}function He(je,Ze){var nt=this;je.length>0&&this.quill.scroll.deleteAt(je.index,je.length);var ot=Object.keys(Ze.format).reduce(function(Ct,Lt){return Se.default.query(Lt,Se.default.Scope.BLOCK)&&!Array.isArray(Ze.format[Lt])&&(Ct[Lt]=Ze.format[Lt]),Ct},{});this.quill.insertText(je.index,`
|
|
6549
6587
|
`,ot,Ce.default.sources.USER),this.quill.setSelection(je.index+1,Ce.default.sources.SILENT),this.quill.focus(),Object.keys(Ze.format).forEach(function(Ct){ot[Ct]==null&&(Array.isArray(Ze.format[Ct])||Ct!=="link"&&nt.quill.format(Ct,Ze.format[Ct],Ce.default.sources.USER))})}function Ge(je){return{key:Ye.keys.TAB,shiftKey:!je,format:{"code-block":!0},handler:function(nt){var ot=Se.default.query("code-block"),Ct=nt.index,Lt=nt.length,Bt=this.quill.scroll.descendant(ot,Ct),jt=oe(Bt,2),Kt=jt[0],ei=jt[1];if(Kt!=null){var mi=this.quill.getIndex(Kt),di=Kt.newlineIndex(ei,!0)+1,xt=Kt.newlineIndex(mi+ei+Lt),St=Kt.domNode.textContent.slice(di,xt).split(`
|
|
6550
|
-
`);ei=0,St.forEach(function(qt,Dt){je?(Kt.insertAt(di+ei,ot.TAB),ei+=ot.TAB.length,Dt===0?Ct+=ot.TAB.length:Lt+=ot.TAB.length):qt.startsWith(ot.TAB)&&(Kt.deleteAt(di+ei,ot.TAB.length),ei-=ot.TAB.length,Dt===0?Ct-=ot.TAB.length:Lt-=ot.TAB.length),ei+=qt.length+1}),this.quill.update(Ce.default.sources.USER),this.quill.setSelection(Ct,Lt,Ce.default.sources.SILENT)}}}}function Xe(je){return{key:je[0].toUpperCase(),shortKey:!0,handler:function(nt,ot){this.quill.format(je,!ot.format[je],Ce.default.sources.USER)}}}function Ke(je){if(typeof je=="string"||typeof je=="number")return Ke({key:je});if((typeof je>"u"?"undefined":ne(je))==="object"&&(je=(0,ce.default)(je,!1)),typeof je.key=="string")if(Ye.keys[je.key.toUpperCase()]!=null)je.key=Ye.keys[je.key.toUpperCase()];else if(je.key.length===1)je.key=je.key.toUpperCase().charCodeAt(0);else return null;return je.shortKey&&(je[Je]=je.shortKey,delete je.shortKey),je}te.default=Ye,te.SHORTKEY=Je},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ye(we,Se){var _e=[],Ce=!0,Le=!1,Pe=void 0;try{for(var Ie=we[Symbol.iterator](),Fe;!(Ce=(Fe=Ie.next()).done)&&(_e.push(Fe.value),!(Se&&_e.length===Se));Ce=!0);}catch(qe){Le=!0,Pe=qe}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Le)throw Pe}}return _e}return function(we,Se){if(Array.isArray(we))return we;if(Symbol.iterator in Object(we))return ye(we,Se);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function ye(we,Se,_e){we===null&&(we=Function.prototype);var Ce=Object.getOwnPropertyDescriptor(we,Se);if(Ce===void 0){var Le=Object.getPrototypeOf(we);return Le===null?void 0:ye(Le,Se,_e)}else{if("value"in Ce)return Ce.value;var Pe=Ce.get;return Pe===void 0?void 0:Pe.call(_e)}},de=function(){function ye(we,Se){for(var _e=0;_e<Se.length;_e++){var Ce=Se[_e];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(we,Ce.key,Ce)}}return function(we,Se,_e){return Se&&ye(we.prototype,Se),_e&&ye(we,_e),we}}(),ue=re(0),ce=fe(ue),he=re(7),pe=fe(he);function fe(ye){return ye&&ye.__esModule?ye:{default:ye}}function ge(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}function be(ye,we){if(!ye)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return we&&(typeof we=="object"||typeof we=="function")?we:ye}function me(ye,we){if(typeof we!="function"&&we!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof we);ye.prototype=Object.create(we&&we.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),we&&(Object.setPrototypeOf?Object.setPrototypeOf(ye,we):ye.__proto__=we)}var ve=function(ye){me(we,ye),de(we,null,[{key:"value",value:function(){}}]);function we(Se,_e){ge(this,we);var Ce=be(this,(we.__proto__||Object.getPrototypeOf(we)).call(this,Se));return Ce.selection=_e,Ce.textNode=document.createTextNode(we.CONTENTS),Ce.domNode.appendChild(Ce.textNode),Ce._length=0,Ce}return de(we,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(_e,Ce){if(this._length!==0)return oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"format",this).call(this,_e,Ce);for(var Le=this,Pe=0;Le!=null&&Le.statics.scope!==ce.default.Scope.BLOCK_BLOT;)Pe+=Le.offset(Le.parent),Le=Le.parent;Le!=null&&(this._length=we.CONTENTS.length,Le.optimize(),Le.formatAt(Pe,we.CONTENTS.length,_e,Ce),this._length=0)}},{key:"index",value:function(_e,Ce){return _e===this.textNode?0:oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"index",this).call(this,_e,Ce)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var _e=this.textNode,Ce=this.selection.getNativeRange(),Le=void 0,Pe=void 0,Ie=void 0;if(Ce!=null&&Ce.start.node===_e&&Ce.end.node===_e){var Fe=[_e,Ce.start.offset,Ce.end.offset];Le=Fe[0],Pe=Fe[1],Ie=Fe[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==we.CONTENTS){var qe=this.textNode.data.split(we.CONTENTS).join("");this.next instanceof pe.default?(Le=this.next.domNode,this.next.insertAt(0,qe),this.textNode.data=we.CONTENTS):(this.textNode.data=qe,this.parent.insertBefore(ce.default.create(this.textNode),this),this.textNode=document.createTextNode(we.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),Pe!=null){var Ae=[Pe,Ie].map(function(Me){return Math.max(0,Math.min(Le.data.length,Me-1))}),De=ne(Ae,2);return Pe=De[0],Ie=De[1],{startNode:Le,startOffset:Pe,endNode:Le,endOffset:Ie}}}}},{key:"update",value:function(_e,Ce){var Le=this;if(_e.some(function(Ie){return Ie.type==="characterData"&&Ie.target===Le.textNode})){var Pe=this.restore();Pe&&(Ce.range=Pe)}}},{key:"value",value:function(){return""}}]),we}(ce.default.Embed);ve.blotName="cursor",ve.className="ql-cursor",ve.tagName="span",ve.CONTENTS="\uFEFF",te.default=ve},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(0),oe=ce(ne),de=re(4),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return me}(oe.default.Container);ge.allowedChildren=[ue.default,de.BlockEmbed,ge],te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.ColorStyle=te.ColorClass=te.ColorAttributor=void 0;var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(0),ue=ce(de);function ce(ve){return ve&&ve.__esModule?ve:{default:ve}}function he(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function pe(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function fe(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var ge=function(ve){fe(ye,ve);function ye(){return he(this,ye),pe(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"value",value:function(Se){var _e=oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"value",this).call(this,Se);return _e.startsWith("rgb(")?(_e=_e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+_e.split(",").map(function(Ce){return("00"+parseInt(Ce).toString(16)).slice(-2)}).join("")):_e}}]),ye}(ue.default.Attributor.Style),be=new ue.default.Attributor.Class("color","ql-color",{scope:ue.default.Scope.INLINE}),me=new ge("color","color",{scope:ue.default.Scope.INLINE});te.ColorAttributor=ge,te.ColorClass=be,te.ColorStyle=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.sanitize=te.default=void 0;var ne=function(){function me(ve,ye){for(var we=0;we<ye.length;we++){var Se=ye[we];Se.enumerable=Se.enumerable||!1,Se.configurable=!0,"value"in Se&&(Se.writable=!0),Object.defineProperty(ve,Se.key,Se)}}return function(ve,ye,we){return ye&&me(ve.prototype,ye),we&&me(ve,we),ve}}(),oe=function me(ve,ye,we){ve===null&&(ve=Function.prototype);var Se=Object.getOwnPropertyDescriptor(ve,ye);if(Se===void 0){var _e=Object.getPrototypeOf(ve);return _e===null?void 0:me(_e,ye,we)}else{if("value"in Se)return Se.value;var Ce=Se.get;return Ce===void 0?void 0:Ce.call(we)}},de=re(6),ue=ce(de);function ce(me){return me&&me.__esModule?me:{default:me}}function he(me,ve){if(!(me instanceof ve))throw new TypeError("Cannot call a class as a function")}function pe(me,ve){if(!me)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve&&(typeof ve=="object"||typeof ve=="function")?ve:me}function fe(me,ve){if(typeof ve!="function"&&ve!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ve);me.prototype=Object.create(ve&&ve.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}),ve&&(Object.setPrototypeOf?Object.setPrototypeOf(me,ve):me.__proto__=ve)}var ge=function(me){fe(ve,me);function ve(){return he(this,ve),pe(this,(ve.__proto__||Object.getPrototypeOf(ve)).apply(this,arguments))}return ne(ve,[{key:"format",value:function(we,Se){if(we!==this.statics.blotName||!Se)return oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"format",this).call(this,we,Se);Se=this.constructor.sanitize(Se),this.domNode.setAttribute("href",Se)}}],[{key:"create",value:function(we){var Se=oe(ve.__proto__||Object.getPrototypeOf(ve),"create",this).call(this,we);return we=this.sanitize(we),Se.setAttribute("href",we),Se.setAttribute("target","_blank"),Se}},{key:"formats",value:function(we){return we.getAttribute("href")}},{key:"sanitize",value:function(we){return be(we,this.PROTOCOL_WHITELIST)?we:this.SANITIZED_URL}}]),ve}(ue.default);ge.blotName="link",ge.tagName="A",ge.SANITIZED_URL="about:blank",ge.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function be(me,ve){var ye=document.createElement("a");ye.href=me;var we=ye.href.slice(0,ye.href.indexOf(":"));return ve.indexOf(we)>-1}te.default=ge,te.sanitize=be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ve){return typeof ve}:function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},oe=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),de=re(23),ue=pe(de),ce=re(108),he=pe(ce);function pe(ve){return ve&&ve.__esModule?ve:{default:ve}}function fe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}var ge=0;function be(ve,ye){ve.setAttribute(ye,ve.getAttribute(ye)!=="true")}var me=function(){function ve(ye){var we=this;fe(this,ve),this.select=ye,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){we.togglePicker()}),this.label.addEventListener("keydown",function(Se){switch(Se.keyCode){case ue.default.keys.ENTER:we.togglePicker();break;case ue.default.keys.ESCAPE:we.escape(),Se.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return oe(ve,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),be(this.label,"aria-expanded"),be(this.options,"aria-hidden")}},{key:"buildItem",value:function(we){var Se=this,_e=document.createElement("span");return _e.tabIndex="0",_e.setAttribute("role","button"),_e.classList.add("ql-picker-item"),we.hasAttribute("value")&&_e.setAttribute("data-value",we.getAttribute("value")),we.textContent&&_e.setAttribute("data-label",we.textContent),_e.addEventListener("click",function(){Se.selectItem(_e,!0)}),_e.addEventListener("keydown",function(Ce){switch(Ce.keyCode){case ue.default.keys.ENTER:Se.selectItem(_e,!0),Ce.preventDefault();break;case ue.default.keys.ESCAPE:Se.escape(),Ce.preventDefault();break}}),_e}},{key:"buildLabel",value:function(){var we=document.createElement("span");return we.classList.add("ql-picker-label"),we.innerHTML=he.default,we.tabIndex="0",we.setAttribute("role","button"),we.setAttribute("aria-expanded","false"),this.container.appendChild(we),we}},{key:"buildOptions",value:function(){var we=this,Se=document.createElement("span");Se.classList.add("ql-picker-options"),Se.setAttribute("aria-hidden","true"),Se.tabIndex="-1",Se.id="ql-picker-options-"+ge,ge+=1,this.label.setAttribute("aria-controls",Se.id),this.options=Se,[].slice.call(this.select.options).forEach(function(_e){var Ce=we.buildItem(_e);Se.appendChild(Ce),_e.selected===!0&&we.selectItem(Ce)}),this.container.appendChild(Se)}},{key:"buildPicker",value:function(){var we=this;[].slice.call(this.select.attributes).forEach(function(Se){we.container.setAttribute(Se.name,Se.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var we=this;this.close(),setTimeout(function(){return we.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(we){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_e=this.container.querySelector(".ql-selected");if(we!==_e&&(_e!=null&&_e.classList.remove("ql-selected"),we!=null&&(we.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(we.parentNode.children,we),we.hasAttribute("data-value")?this.label.setAttribute("data-value",we.getAttribute("data-value")):this.label.removeAttribute("data-value"),we.hasAttribute("data-label")?this.label.setAttribute("data-label",we.getAttribute("data-label")):this.label.removeAttribute("data-label"),Se))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":ne(Event))==="object"){var Ce=document.createEvent("Event");Ce.initEvent("change",!0,!0),this.select.dispatchEvent(Ce)}this.close()}}},{key:"update",value:function(){var we=void 0;if(this.select.selectedIndex>-1){var Se=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];we=this.select.options[this.select.selectedIndex],this.selectItem(Se)}else this.selectItem(null);var _e=we!=null&&we!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",_e)}}]),ve}();te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(0),oe=Ve(ne),de=re(5),ue=Ve(de),ce=re(4),he=Ve(ce),pe=re(16),fe=Ve(pe),ge=re(25),be=Ve(ge),me=re(24),ve=Ve(me),ye=re(36),we=Ve(ye),Se=re(6),_e=Ve(Se),Ce=re(22),Le=Ve(Ce),Pe=re(7),Ie=Ve(Pe),Fe=re(56),qe=Ve(Fe),Ae=re(43),De=Ve(Ae),Me=re(23),Be=Ve(Me);function Ve(Je){return Je&&Je.__esModule?Je:{default:Je}}ue.default.register({"blots/block":he.default,"blots/block/embed":ce.BlockEmbed,"blots/break":fe.default,"blots/container":be.default,"blots/cursor":ve.default,"blots/embed":we.default,"blots/inline":_e.default,"blots/scroll":Le.default,"blots/text":Ie.default,"modules/clipboard":qe.default,"modules/history":De.default,"modules/keyboard":Be.default}),oe.default.register(he.default,fe.default,ve.default,_e.default,Le.default,Ie.default),te.default=ue.default},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(1),oe=function(){function de(ue){this.domNode=ue,this.domNode[ne.DATA_KEY]={blot:this}}return Object.defineProperty(de.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),de.create=function(ue){if(this.tagName==null)throw new ne.ParchmentError("Blot definition missing tagName");var ce;return Array.isArray(this.tagName)?(typeof ue=="string"&&(ue=ue.toUpperCase(),parseInt(ue).toString()===ue&&(ue=parseInt(ue))),typeof ue=="number"?ce=document.createElement(this.tagName[ue-1]):this.tagName.indexOf(ue)>-1?ce=document.createElement(ue):ce=document.createElement(this.tagName[0])):ce=document.createElement(this.tagName),this.className&&ce.classList.add(this.className),ce},de.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},de.prototype.clone=function(){var ue=this.domNode.cloneNode(!1);return ne.create(ue)},de.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[ne.DATA_KEY]},de.prototype.deleteAt=function(ue,ce){var he=this.isolate(ue,ce);he.remove()},de.prototype.formatAt=function(ue,ce,he,pe){var fe=this.isolate(ue,ce);if(ne.query(he,ne.Scope.BLOT)!=null&&pe)fe.wrap(he,pe);else if(ne.query(he,ne.Scope.ATTRIBUTE)!=null){var ge=ne.create(this.statics.scope);fe.wrap(ge),ge.format(he,pe)}},de.prototype.insertAt=function(ue,ce,he){var pe=he==null?ne.create("text",ce):ne.create(ce,he),fe=this.split(ue);this.parent.insertBefore(pe,fe)},de.prototype.insertInto=function(ue,ce){ce===void 0&&(ce=null),this.parent!=null&&this.parent.children.remove(this);var he=null;ue.children.insertBefore(this,ce),ce!=null&&(he=ce.domNode),(this.domNode.parentNode!=ue.domNode||this.domNode.nextSibling!=he)&&ue.domNode.insertBefore(this.domNode,he),this.parent=ue,this.attach()},de.prototype.isolate=function(ue,ce){var he=this.split(ue);return he.split(ce),he},de.prototype.length=function(){return 1},de.prototype.offset=function(ue){return ue===void 0&&(ue=this.parent),this.parent==null||this==ue?0:this.parent.children.offset(this)+this.parent.offset(ue)},de.prototype.optimize=function(ue){this.domNode[ne.DATA_KEY]!=null&&delete this.domNode[ne.DATA_KEY].mutations},de.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},de.prototype.replace=function(ue){ue.parent!=null&&(ue.parent.insertBefore(this,ue.next),ue.remove())},de.prototype.replaceWith=function(ue,ce){var he=typeof ue=="string"?ne.create(ue,ce):ue;return he.replace(this),he},de.prototype.split=function(ue,ce){return ue===0?this:this.next},de.prototype.update=function(ue,ce){},de.prototype.wrap=function(ue,ce){var he=typeof ue=="string"?ne.create(ue,ce):ue;return this.parent!=null&&this.parent.insertBefore(he,this.next),he.appendChild(this),he},de.blotName="abstract",de}();te.default=oe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(12),oe=re(32),de=re(33),ue=re(1),ce=function(){function he(pe){this.attributes={},this.domNode=pe,this.build()}return he.prototype.attribute=function(pe,fe){fe?pe.add(this.domNode,fe)&&(pe.value(this.domNode)!=null?this.attributes[pe.attrName]=pe:delete this.attributes[pe.attrName]):(pe.remove(this.domNode),delete this.attributes[pe.attrName])},he.prototype.build=function(){var pe=this;this.attributes={};var fe=ne.default.keys(this.domNode),ge=oe.default.keys(this.domNode),be=de.default.keys(this.domNode);fe.concat(ge).concat(be).forEach(function(me){var ve=ue.query(me,ue.Scope.ATTRIBUTE);ve instanceof ne.default&&(pe.attributes[ve.attrName]=ve)})},he.prototype.copy=function(pe){var fe=this;Object.keys(this.attributes).forEach(function(ge){var be=fe.attributes[ge].value(fe.domNode);pe.format(ge,be)})},he.prototype.move=function(pe){var fe=this;this.copy(pe),Object.keys(this.attributes).forEach(function(ge){fe.attributes[ge].remove(fe.domNode)}),this.attributes={}},he.prototype.values=function(){var pe=this;return Object.keys(this.attributes).reduce(function(fe,ge){return fe[ge]=pe.attributes[ge].value(pe.domNode),fe},{})},he}();te.default=ce},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(12);function de(ce,he){var pe=ce.getAttribute("class")||"";return pe.split(/\s+/).filter(function(fe){return fe.indexOf(he+"-")===0})}var ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.keys=function(pe){return(pe.getAttribute("class")||"").split(/\s+/).map(function(fe){return fe.split("-").slice(0,-1).join("-")})},he.prototype.add=function(pe,fe){return this.canAdd(pe,fe)?(this.remove(pe),pe.classList.add(this.keyName+"-"+fe),!0):!1},he.prototype.remove=function(pe){var fe=de(pe,this.keyName);fe.forEach(function(ge){pe.classList.remove(ge)}),pe.classList.length===0&&pe.removeAttribute("class")},he.prototype.value=function(pe){var fe=de(pe,this.keyName)[0]||"",ge=fe.slice(this.keyName.length+1);return this.canAdd(pe,ge)?ge:""},he}(oe.default);te.default=ue},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(12);function de(ce){var he=ce.split("-"),pe=he.slice(1).map(function(fe){return fe[0].toUpperCase()+fe.slice(1)}).join("");return he[0]+pe}var ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.keys=function(pe){return(pe.getAttribute("style")||"").split(";").map(function(fe){var ge=fe.split(":");return ge[0].trim()})},he.prototype.add=function(pe,fe){return this.canAdd(pe,fe)?(pe.style[de(this.keyName)]=fe,!0):!1},he.prototype.remove=function(pe){pe.style[de(this.keyName)]="",pe.getAttribute("style")||pe.removeAttribute("style")},he.prototype.value=function(pe){var fe=pe.style[de(this.keyName)];return this.canAdd(pe,fe)?fe:""},he}(oe.default);te.default=ue},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.getRange=Pe,te.internalGetShadowSelection=Fe;var ne=te.SHADOW_SELECTIONCHANGE="-shadow-selectionchange",oe="attachShadow"in Element.prototype&&"getRootNode"in Element.prototype,de=!!(oe&&document.createElement("div").attachShadow({mode:"open"}).getSelection),ue=window.ShadyDOM&&window.ShadyDOM.inUse,ce=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,he=!oe||ue||!de&&!ce,pe=[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.DOCUMENT_FRAGMENT_NODE];function fe(qe){return pe.includes(qe.nodeType)}function ge(qe,Ae,De){var Me=Ae.childNodes||Ae.children;if(!Me)return Ae;for(var Be=0;Be<Me.length;++Be){var Ve=De?Be:Me.length-1-Be,Je=Me[Ve];if(fe(Je)&&qe.containsNode(Je,!0))return qe.containsNode(Je,!1)?Je:ge(qe,Je,De)}return Ae}var be=function(){if(de||he)return document.addEventListener("selectionchange",function(){document.dispatchEvent(new CustomEvent(ne))}),function(){};var qe=!1,Ae=[];return document.addEventListener("selectionchange",function(De){qe||(document.dispatchEvent(new CustomEvent(ne)),qe=!0,window.setTimeout(function(){qe=!1},2),Ae.forEach(function(Me){return Me(De)}))}),function(De){return Ae.push(De)}}(),me=!1,ve=null;be(function(){var qe=window.getSelection();qe.type==="Caret"?me=!0:me&&!ve&&(ve=Promise.resolve(!0).then(function(){me=!1,ve=null}))});function ye(qe,Ae,De){for(var Me=Ae;(Ae=Se(Ae,De))&&Ae.contains(Me););return Ae?Ae instanceof Element&&qe.containsNode(Ae,!0):!1}function we(qe,Ae,De){if(qe.type==="Range"){var Me=function(){return qe.toString().length},Be=Me();if(Be===1&&me&&Ae===De){qe.extend(Ae,0),qe.collapseToEnd();return}var Ve=void 0;if(qe.modify("extend","forward","character"),Ve=Me(),Ve>Be||ye(qe,De,!0))return qe.modify("extend","backward","character"),!0;if(Ve<Be||!qe.containsNode(Ae))return qe.modify("extend","backward","character"),!1;if(qe.modify("extend","backward","character"),Ve=Me(),Ve>Be||ye(qe,Ae,!1))return qe.modify("extend","forward","character"),!1;if(Ve<Be||!qe.containsNode(De))return qe.modify("extend","forward","character"),!0}}function Se(qe,Ae){if(!Ae)return qe.previousSibling||qe.parentNode||null;for(;qe;){if(qe.nextSibling)return qe.nextSibling;qe=qe.parentNode}return null}function _e(qe){return qe.nodeType!==Node.TEXT_NODE?0:/^\s*/.exec(qe.textContent)[0].length}function Ce(qe){if(qe.nodeType!==Node.TEXT_NODE)return 0;var Ae=/\s*$/.exec(qe.textContent)[0].length;return Ae?Ae-1:0}var Le=new Map;function Pe(qe){if(de||he){var Ae=(he?document:qe).getSelection();return Ae.rangeCount?Ae.getRangeAt(0):null}var De=Le.get(qe);if(De)return De;var Me=Fe(qe);return Le.set(qe,Me.range),window.setTimeout(function(){Le.delete(qe)},0),Me.range}var Ie=document.createTextNode("");function Fe(qe){var Ae=document.createRange(),De=window.getSelection();if(!De.containsNode(qe.host,!0))return{range:null,mode:"none"};qe.insertBefore(Ie,qe.childNodes[0]);var Me=De.containsNode(Ie);if(Ie.remove(),Me)return{range:null,mode:"outside-before"};qe.appendChild(Ie);var Be=De.containsNode(Ie);if(Ie.remove(),Be)return{range:null,mode:"outside-after"};var Ve=function(){return De.toString().length};if(!(De.type==="Caret"||De.type==="Range"))throw new TypeError("unexpected type: "+De.type);var Je=ge(De,qe,!0),Ye=void 0,kt=void 0;if(De.type==="Range"&&(Ye=ge(De,qe,!1),kt=we(De,Je,Ye)),De.type==="Caret"){De.extend(Je,0);var Qe=Ve();return De.collapseToEnd(),Ae.setStart(Je,Qe),Ae.setEnd(Je,Qe),{range:Ae,mode:"caret"}}else if(kt===void 0){if(De.type!=="Range")throw new TypeError("unexpected type: "+De.type);return Ae.setStart(Je,0),Ae.setEnd(Ye,Ye.length),{range:Ae,mode:"all"}}var We=Ve(),Ne=void 0,He=void 0,Ge=Ye.length-Ce(Ye);return kt?(De.extend(Je,0),Ne=Ve()+_e(Je),De.extend(Ye,Ge),He=Ge-(Ve()-We),De.extend(Ye,He)):(De.extend(Ye,Ge),He=Ge-Ve(),De.extend(Je,0),Ne=Ve()-We+_e(Je),De.extend(Je,Ne)),Ae.setStart(Je,Ne),Ae.setEnd(Ye,He),{mode:kt?"right":"left",range:Ae}}},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ue(ce,he){for(var pe=0;pe<he.length;pe++){var fe=he[pe];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(ce,fe.key,fe)}}return function(ce,he,pe){return he&&ue(ce.prototype,he),pe&&ue(ce,pe),ce}}();function oe(ue,ce){if(!(ue instanceof ce))throw new TypeError("Cannot call a class as a function")}var de=function(){function ue(ce,he){oe(this,ue),this.quill=ce,this.options=he,this.modules={}}return ne(ue,[{key:"init",value:function(){var he=this;Object.keys(this.options.modules).forEach(function(pe){he.modules[pe]==null&&he.addModule(pe)})}},{key:"addModule",value:function(he){var pe=this.quill.constructor.import("modules/"+he);return this.modules[he]=new pe(this.quill,this.options.modules[he]||{}),this.modules[he]}}]),ue}();de.DEFAULTS={modules:{}},de.themes={default:de},te.default=de},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ye(we,Se){for(var _e=0;_e<Se.length;_e++){var Ce=Se[_e];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(we,Ce.key,Ce)}}return function(we,Se,_e){return Se&&ye(we.prototype,Se),_e&&ye(we,_e),we}}(),oe=function ye(we,Se,_e){we===null&&(we=Function.prototype);var Ce=Object.getOwnPropertyDescriptor(we,Se);if(Ce===void 0){var Le=Object.getPrototypeOf(we);return Le===null?void 0:ye(Le,Se,_e)}else{if("value"in Ce)return Ce.value;var Pe=Ce.get;return Pe===void 0?void 0:Pe.call(_e)}},de=re(0),ue=pe(de),ce=re(7),he=pe(ce);function pe(ye){return ye&&ye.__esModule?ye:{default:ye}}function fe(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}function ge(ye,we){if(!ye)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return we&&(typeof we=="object"||typeof we=="function")?we:ye}function be(ye,we){if(typeof we!="function"&&we!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof we);ye.prototype=Object.create(we&&we.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),we&&(Object.setPrototypeOf?Object.setPrototypeOf(ye,we):ye.__proto__=we)}var me="\uFEFF",ve=function(ye){be(we,ye);function we(Se){fe(this,we);var _e=ge(this,(we.__proto__||Object.getPrototypeOf(we)).call(this,Se));return _e.contentNode=document.createElement("span"),_e.contentNode.setAttribute("contenteditable",!1),[].slice.call(_e.domNode.childNodes).forEach(function(Ce){_e.contentNode.appendChild(Ce)}),_e.leftGuard=document.createTextNode(me),_e.rightGuard=document.createTextNode(me),_e.domNode.appendChild(_e.leftGuard),_e.domNode.appendChild(_e.contentNode),_e.domNode.appendChild(_e.rightGuard),_e}return ne(we,[{key:"index",value:function(_e,Ce){return _e===this.leftGuard?0:_e===this.rightGuard?1:oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"index",this).call(this,_e,Ce)}},{key:"restore",value:function(_e){var Ce=void 0,Le=void 0,Pe=_e.data.split(me).join("");if(_e===this.leftGuard)if(this.prev instanceof he.default){var Ie=this.prev.length();this.prev.insertAt(Ie,Pe),Ce={startNode:this.prev.domNode,startOffset:Ie+Pe.length}}else Le=document.createTextNode(Pe),this.parent.insertBefore(ue.default.create(Le),this),Ce={startNode:Le,startOffset:Pe.length};else _e===this.rightGuard&&(this.next instanceof he.default?(this.next.insertAt(0,Pe),Ce={startNode:this.next.domNode,startOffset:Pe.length}):(Le=document.createTextNode(Pe),this.parent.insertBefore(ue.default.create(Le),this.next),Ce={startNode:Le,startOffset:Pe.length}));return _e.data=me,Ce}},{key:"update",value:function(_e,Ce){var Le=this;_e.forEach(function(Pe){if(Pe.type==="characterData"&&(Pe.target===Le.leftGuard||Pe.target===Le.rightGuard)){var Ie=Le.restore(Pe.target);Ie&&(Ce.range=Ie)}})}}]),we}(ue.default.Embed);te.default=ve},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.AlignStyle=te.AlignClass=te.AlignAttribute=void 0;var ne=re(0),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}var ue={scope:oe.default.Scope.BLOCK,whitelist:["right","center","justify"]},ce=new oe.default.Attributor.Attribute("align","align",ue),he=new oe.default.Attributor.Class("align","ql-align",ue),pe=new oe.default.Attributor.Style("align","text-align",ue);te.AlignAttribute=ce,te.AlignClass=he,te.AlignStyle=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.BackgroundStyle=te.BackgroundClass=void 0;var ne=re(0),oe=ue(ne),de=re(26);function ue(pe){return pe&&pe.__esModule?pe:{default:pe}}var ce=new oe.default.Attributor.Class("background","ql-bg",{scope:oe.default.Scope.INLINE}),he=new de.ColorAttributor("background","background-color",{scope:oe.default.Scope.INLINE});te.BackgroundClass=ce,te.BackgroundStyle=he},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.DirectionStyle=te.DirectionClass=te.DirectionAttribute=void 0;var ne=re(0),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}var ue={scope:oe.default.Scope.BLOCK,whitelist:["rtl"]},ce=new oe.default.Attributor.Attribute("direction","dir",ue),he=new oe.default.Attributor.Class("direction","ql-direction",ue),pe=new oe.default.Attributor.Style("direction","direction",ue);te.DirectionAttribute=ce,te.DirectionClass=he,te.DirectionStyle=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.FontClass=te.FontStyle=void 0;var ne=function(){function ye(we,Se){for(var _e=0;_e<Se.length;_e++){var Ce=Se[_e];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(we,Ce.key,Ce)}}return function(we,Se,_e){return Se&&ye(we.prototype,Se),_e&&ye(we,_e),we}}(),oe=function ye(we,Se,_e){we===null&&(we=Function.prototype);var Ce=Object.getOwnPropertyDescriptor(we,Se);if(Ce===void 0){var Le=Object.getPrototypeOf(we);return Le===null?void 0:ye(Le,Se,_e)}else{if("value"in Ce)return Ce.value;var Pe=Ce.get;return Pe===void 0?void 0:Pe.call(_e)}},de=re(0),ue=ce(de);function ce(ye){return ye&&ye.__esModule?ye:{default:ye}}function he(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}function pe(ye,we){if(!ye)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return we&&(typeof we=="object"||typeof we=="function")?we:ye}function fe(ye,we){if(typeof we!="function"&&we!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof we);ye.prototype=Object.create(we&&we.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),we&&(Object.setPrototypeOf?Object.setPrototypeOf(ye,we):ye.__proto__=we)}var ge={scope:ue.default.Scope.INLINE,whitelist:["serif","monospace"]},be=new ue.default.Attributor.Class("font","ql-font",ge),me=function(ye){fe(we,ye);function we(){return he(this,we),pe(this,(we.__proto__||Object.getPrototypeOf(we)).apply(this,arguments))}return ne(we,[{key:"value",value:function(_e){return oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"value",this).call(this,_e).replace(/["']/g,"")}}]),we}(ue.default.Attributor.Style),ve=new me("font","font-family",ge);te.FontStyle=ve,te.FontClass=be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.SizeStyle=te.SizeClass=void 0;var ne=re(0),oe=de(ne);function de(he){return he&&he.__esModule?he:{default:he}}var ue=new oe.default.Attributor.Class("size","ql-size",{scope:oe.default.Scope.INLINE,whitelist:["small","large","huge"]}),ce=new oe.default.Attributor.Style("size","font-size",{scope:oe.default.Scope.INLINE,whitelist:["10px","18px","32px"]});te.SizeClass=ue,te.SizeStyle=ce},function(J,te,re){J.exports={align:{"":re(77),center:re(78),right:re(79),justify:re(80)},background:re(81),blockquote:re(82),bold:re(83),clean:re(84),code:re(59),"code-block":re(59),color:re(85),direction:{"":re(86),rtl:re(87)},float:{center:re(88),full:re(89),left:re(90),right:re(91)},formula:re(92),header:{1:re(93),2:re(94)},italic:re(95),image:re(96),indent:{"+1":re(97),"-1":re(98)},link:re(99),list:{ordered:re(100),bullet:re(101),check:re(102)},script:{sub:re(103),super:re(104)},strike:re(105),underline:re(106),video:re(107)}},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.getLastChangeIndex=te.default=void 0;var ne=function(){function Se(_e,Ce){for(var Le=0;Le<Ce.length;Le++){var Pe=Ce[Le];Pe.enumerable=Pe.enumerable||!1,Pe.configurable=!0,"value"in Pe&&(Pe.writable=!0),Object.defineProperty(_e,Pe.key,Pe)}}return function(_e,Ce,Le){return Ce&&Se(_e.prototype,Ce),Le&&Se(_e,Le),_e}}(),oe=re(0),de=fe(oe),ue=re(5),ce=fe(ue),he=re(9),pe=fe(he);function fe(Se){return Se&&Se.__esModule?Se:{default:Se}}function ge(Se,_e){if(!(Se instanceof _e))throw new TypeError("Cannot call a class as a function")}function be(Se,_e){if(!Se)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e&&(typeof _e=="object"||typeof _e=="function")?_e:Se}function me(Se,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _e);Se.prototype=Object.create(_e&&_e.prototype,{constructor:{value:Se,enumerable:!1,writable:!0,configurable:!0}}),_e&&(Object.setPrototypeOf?Object.setPrototypeOf(Se,_e):Se.__proto__=_e)}var ve=function(Se){me(_e,Se);function _e(Ce,Le){ge(this,_e);var Pe=be(this,(_e.__proto__||Object.getPrototypeOf(_e)).call(this,Ce,Le));return Pe.lastRecorded=0,Pe.ignoreChange=!1,Pe.clear(),Pe.quill.on(ce.default.events.EDITOR_CHANGE,function(Ie,Fe,qe,Ae){Ie!==ce.default.events.TEXT_CHANGE||Pe.ignoreChange||(!Pe.options.userOnly||Ae===ce.default.sources.USER?Pe.record(Fe,qe):Pe.transform(Fe))}),Pe.quill.keyboard.addBinding({key:"Z",shortKey:!0},Pe.undo.bind(Pe)),Pe.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},Pe.redo.bind(Pe)),/Win/i.test(navigator.platform)&&Pe.quill.keyboard.addBinding({key:"Y",shortKey:!0},Pe.redo.bind(Pe)),Pe}return ne(_e,[{key:"change",value:function(Le,Pe){if(this.stack[Le].length!==0){var Ie=this.stack[Le].pop();this.stack[Pe].push(Ie),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(Ie[Le],ce.default.sources.USER),this.ignoreChange=!1;var Fe=we(Ie[Le]);this.quill.setSelection(Fe)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(Le,Pe){if(Le.ops.length!==0){this.stack.redo=[];var Ie=this.quill.getContents().diff(Pe),Fe=Date.now();if(this.lastRecorded+this.options.delay>Fe&&this.stack.undo.length>0){var qe=this.stack.undo.pop();Ie=Ie.compose(qe.undo),Le=qe.redo.compose(Le)}else this.lastRecorded=Fe;this.stack.undo.push({redo:Le,undo:Ie}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(Le){this.stack.undo.forEach(function(Pe){Pe.undo=Le.transform(Pe.undo,!0),Pe.redo=Le.transform(Pe.redo,!0)}),this.stack.redo.forEach(function(Pe){Pe.undo=Le.transform(Pe.undo,!0),Pe.redo=Le.transform(Pe.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),_e}(pe.default);ve.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function ye(Se){var _e=Se.ops[Se.ops.length-1];return _e==null?!1:_e.insert!=null?typeof _e.insert=="string"&&_e.insert.endsWith(`
|
|
6551
|
-
`):_e.attributes!=null?Object.keys(_e.attributes).some(function(Ce){return de.default.query(Ce,de.default.Scope.BLOCK)!=null}):!1}function we(Se){var _e=Se.reduce(function(Le,Pe){return Le+=Pe.delete||0,Le},0),Ce=Se.length()-_e;return ye(Se)&&(Ce-=1),Ce}te.default=ve,te.getLastChangeIndex=we},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.BaseTooltip=void 0;var ne=function(){function He(Ge,Xe){for(var Ke=0;Ke<Xe.length;Ke++){var je=Xe[Ke];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(Ge,je.key,je)}}return function(Ge,Xe,Ke){return Xe&&He(Ge.prototype,Xe),Ke&&He(Ge,Ke),Ge}}(),oe=function He(Ge,Xe,Ke){Ge===null&&(Ge=Function.prototype);var je=Object.getOwnPropertyDescriptor(Ge,Xe);if(je===void 0){var Ze=Object.getPrototypeOf(Ge);return Ze===null?void 0:He(Ze,Xe,Ke)}else{if("value"in je)return je.value;var nt=je.get;return nt===void 0?void 0:nt.call(Ke)}},de=re(3),ue=Fe(de),ce=re(2),he=Fe(ce),pe=re(8),fe=Fe(pe),ge=re(23),be=Fe(ge),me=re(35),ve=Fe(me),ye=re(60),we=Fe(ye),Se=re(61),_e=Fe(Se),Ce=re(28),Le=Fe(Ce),Pe=re(62),Ie=Fe(Pe);function Fe(He){return He&&He.__esModule?He:{default:He}}function qe(He,Ge){if(!(He instanceof Ge))throw new TypeError("Cannot call a class as a function")}function Ae(He,Ge){if(!He)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ge&&(typeof Ge=="object"||typeof Ge=="function")?Ge:He}function De(He,Ge){if(typeof Ge!="function"&&Ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ge);He.prototype=Object.create(Ge&&Ge.prototype,{constructor:{value:He,enumerable:!1,writable:!0,configurable:!0}}),Ge&&(Object.setPrototypeOf?Object.setPrototypeOf(He,Ge):He.__proto__=Ge)}var Me=[!1,"center","right","justify"],Be=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Ve=[!1,"serif","monospace"],Je=["1","2","3",!1],Ye=["petita",!1,"gran","enorme"],kt=function(He){De(Ge,He);function Ge(Xe,Ke){qe(this,Ge);var je=Ae(this,(Ge.__proto__||Object.getPrototypeOf(Ge)).call(this,Xe,Ke)),Ze=function nt(ot){if(!document.body.contains(Xe.root))return document.body.removeEventListener("click",nt);je.tooltip!=null&&!je.tooltip.root.contains(ot.target)&&document.activeElement!==je.tooltip.textbox&&!je.quill.hasFocus()&&je.tooltip.hide(),je.pickers!=null&&je.pickers.forEach(function(Ct){Ct.container.contains(ot.target)||Ct.close()})};return Xe.emitter.listenDOM("click",document.body,Ze),je}return ne(Ge,[{key:"addModule",value:function(Ke){var je=oe(Ge.prototype.__proto__||Object.getPrototypeOf(Ge.prototype),"addModule",this).call(this,Ke);return Ke==="toolbar"&&this.extendToolbar(je),je}},{key:"buildButtons",value:function(Ke,je){Ke.forEach(function(Ze){var nt=Ze.getAttribute("class")||"";nt.split(/\s+/).forEach(function(ot){if(ot.startsWith("ql-")&&(ot=ot.slice(3),je[ot]!=null))if(ot==="direction")Ze.innerHTML=je[ot][""]+je[ot].rtl;else if(typeof je[ot]=="string")Ze.innerHTML=je[ot];else{var Ct=Ze.value||"";Ct!=null&&je[ot][Ct]&&(Ze.innerHTML=je[ot][Ct])}})})}},{key:"buildPickers",value:function(Ke,je){var Ze=this;this.pickers=Ke.map(function(ot){if(ot.classList.contains("ql-align"))return ot.querySelector("option")==null&&Ne(ot,Me),new _e.default(ot,je.align);if(ot.classList.contains("ql-background")||ot.classList.contains("ql-color")){var Ct=ot.classList.contains("ql-background")?"background":"color";return ot.querySelector("option")==null&&Ne(ot,Be,Ct==="background"?"#ffffff":"#000000"),new we.default(ot,je[Ct])}else return ot.querySelector("option")==null&&(ot.classList.contains("ql-font")?Ne(ot,Ve):ot.classList.contains("ql-header")?Ne(ot,Je):ot.classList.contains("ql-size")&&Ne(ot,Ye)),new Le.default(ot)});var nt=function(){Ze.pickers.forEach(function(Ct){Ct.update()})};this.quill.on(fe.default.events.EDITOR_CHANGE,nt)}}]),Ge}(ve.default);kt.DEFAULTS=(0,ue.default)(!0,{},ve.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var Ge=this,Xe=this.container.querySelector("input.ql-image[type=file]");Xe==null&&(Xe=document.createElement("input"),Xe.setAttribute("type","file"),Xe.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Xe.classList.add("ql-image"),Xe.addEventListener("change",function(){if(Xe.files!=null&&Xe.files[0]!=null){var Ke=new FileReader;Ke.onload=function(je){var Ze=Ge.quill.getSelection(!0);Ge.quill.updateContents(new he.default().retain(Ze.index).delete(Ze.length).insert({image:je.target.result}),fe.default.sources.USER),Ge.quill.setSelection(Ze.index+1,fe.default.sources.SILENT),Xe.value=""},Ke.readAsDataURL(Xe.files[0])}}),this.container.appendChild(Xe)),Xe.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Qe=function(He){De(Ge,He);function Ge(Xe,Ke){qe(this,Ge);var je=Ae(this,(Ge.__proto__||Object.getPrototypeOf(Ge)).call(this,Xe,Ke));return je.textbox=je.root.querySelector('input[type="text"]'),je.listen(),je}return ne(Ge,[{key:"listen",value:function(){var Ke=this;this.textbox.addEventListener("keydown",function(je){be.default.match(je,"enter")?(Ke.save(),je.preventDefault()):be.default.match(je,"escape")&&(Ke.cancel(),je.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),je!=null?this.textbox.value=je:Ke!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+Ke)||""),this.root.setAttribute("data-mode",Ke)}},{key:"restoreFocus",value:function(){var Ke=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Ke}},{key:"save",value:function(){var Ke=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var je=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Ke,fe.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Ke,fe.default.sources.USER)),this.quill.root.scrollTop=je;break}case"video":Ke=We(Ke);case"formula":{if(!Ke)break;var Ze=this.quill.getSelection(!0);if(Ze!=null){var nt=Ze.index+Ze.length;this.quill.insertEmbed(nt,this.root.getAttribute("data-mode"),Ke,fe.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(nt+1," ",fe.default.sources.USER),this.quill.setSelection(nt+2,fe.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),Ge}(Ie.default);function We(He){var Ge=He.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||He.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return Ge?(Ge[1]||"https")+"://www.youtube.com/embed/"+Ge[2]+"?showinfo=0":(Ge=He.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(Ge[1]||"https")+"://player.vimeo.com/video/"+Ge[2]+"/":He}function Ne(He,Ge){var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ge.forEach(function(Ke){var je=document.createElement("option");Ke===Xe?je.setAttribute("selected","selected"):je.setAttribute("value",Ke),He.appendChild(je)})}te.BaseTooltip=Qe,te.default=kt},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function oe(){this.head=this.tail=null,this.length=0}return oe.prototype.append=function(){for(var de=[],ue=0;ue<arguments.length;ue++)de[ue]=arguments[ue];this.insertBefore(de[0],null),de.length>1&&this.append.apply(this,de.slice(1))},oe.prototype.contains=function(de){for(var ue,ce=this.iterator();ue=ce();)if(ue===de)return!0;return!1},oe.prototype.insertBefore=function(de,ue){de&&(de.next=ue,ue!=null?(de.prev=ue.prev,ue.prev!=null&&(ue.prev.next=de),ue.prev=de,ue===this.head&&(this.head=de)):this.tail!=null?(this.tail.next=de,de.prev=this.tail,this.tail=de):(de.prev=null,this.head=this.tail=de),this.length+=1)},oe.prototype.offset=function(de){for(var ue=0,ce=this.head;ce!=null;){if(ce===de)return ue;ue+=ce.length(),ce=ce.next}return-1},oe.prototype.remove=function(de){this.contains(de)&&(de.prev!=null&&(de.prev.next=de.next),de.next!=null&&(de.next.prev=de.prev),de===this.head&&(this.head=de.next),de===this.tail&&(this.tail=de.prev),this.length-=1)},oe.prototype.iterator=function(de){return de===void 0&&(de=this.head),function(){var ue=de;return de!=null&&(de=de.next),ue}},oe.prototype.find=function(de,ue){ue===void 0&&(ue=!1);for(var ce,he=this.iterator();ce=he();){var pe=ce.length();if(de<pe||ue&&de===pe&&(ce.next==null||ce.next.length()!==0))return[ce,de];de-=pe}return[null,0]},oe.prototype.forEach=function(de){for(var ue,ce=this.iterator();ue=ce();)de(ue)},oe.prototype.forEachAt=function(de,ue,ce){if(!(ue<=0))for(var he=this.find(de),pe=he[0],fe=he[1],ge,be=de-fe,me=this.iterator(pe);(ge=me())&&be<de+ue;){var ve=ge.length();de>be?ce(ge,de-be,Math.min(ue,be+ve-de)):ce(ge,0,Math.min(ve,de+ue-be)),be+=ve}},oe.prototype.map=function(de){return this.reduce(function(ue,ce){return ue.push(de(ce)),ue},[])},oe.prototype.reduce=function(de,ue){for(var ce,he=this.iterator();ce=he();)ue=de(ue,ce);return ue},oe}();te.default=ne},function(J,te,re){var ne=this&&this.__extends||function(){var pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ge){fe.__proto__=ge}||function(fe,ge){for(var be in ge)ge.hasOwnProperty(be)&&(fe[be]=ge[be])};return function(fe,ge){pe(fe,ge);function be(){this.constructor=fe}fe.prototype=ge===null?Object.create(ge):(be.prototype=ge.prototype,new be)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(17),de=re(1),ue={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},ce=100,he=function(pe){ne(fe,pe);function fe(ge){var be=pe.call(this,ge)||this;return be.scroll=be,be.observer=new MutationObserver(function(me){be.update(me)}),be.observer.observe(be.domNode,ue),be.attach(),be}return fe.prototype.detach=function(){pe.prototype.detach.call(this),this.observer.disconnect()},fe.prototype.deleteAt=function(ge,be){this.update(),ge===0&&be===this.length()?this.children.forEach(function(me){me.remove()}):pe.prototype.deleteAt.call(this,ge,be)},fe.prototype.formatAt=function(ge,be,me,ve){this.update(),pe.prototype.formatAt.call(this,ge,be,me,ve)},fe.prototype.insertAt=function(ge,be,me){this.update(),pe.prototype.insertAt.call(this,ge,be,me)},fe.prototype.optimize=function(ge,be){var me=this;ge===void 0&&(ge=[]),be===void 0&&(be={}),pe.prototype.optimize.call(this,be);for(var ve=[].slice.call(this.observer.takeRecords());ve.length>0;)ge.push(ve.pop());for(var ye=function(Ce,Le){Le===void 0&&(Le=!0),!(Ce==null||Ce===me)&&Ce.domNode.parentNode!=null&&(Ce.domNode[de.DATA_KEY].mutations==null&&(Ce.domNode[de.DATA_KEY].mutations=[]),Le&&ye(Ce.parent))},we=function(Ce){Ce.domNode[de.DATA_KEY]==null||Ce.domNode[de.DATA_KEY].mutations==null||(Ce instanceof oe.default&&Ce.children.forEach(we),Ce.optimize(be))},Se=ge,_e=0;Se.length>0;_e+=1){if(_e>=ce)throw new Error("[Parchment] Maximum optimize iterations reached");for(Se.forEach(function(Ce){var Le=de.find(Ce.target,!0);Le!=null&&(Le.domNode===Ce.target&&(Ce.type==="childList"?(ye(de.find(Ce.previousSibling,!1)),[].forEach.call(Ce.addedNodes,function(Pe){var Ie=de.find(Pe,!1);ye(Ie,!1),Ie instanceof oe.default&&Ie.children.forEach(function(Fe){ye(Fe,!1)})})):Ce.type==="attributes"&&ye(Le.prev)),ye(Le))}),this.children.forEach(we),Se=[].slice.call(this.observer.takeRecords()),ve=Se.slice();ve.length>0;)ge.push(ve.pop())}},fe.prototype.update=function(ge,be){var me=this;be===void 0&&(be={}),ge=ge||this.observer.takeRecords(),ge.map(function(ve){var ye=de.find(ve.target,!0);return ye==null?null:ye.domNode[de.DATA_KEY].mutations==null?(ye.domNode[de.DATA_KEY].mutations=[ve],ye):(ye.domNode[de.DATA_KEY].mutations.push(ve),null)}).forEach(function(ve){ve==null||ve===me||ve.domNode[de.DATA_KEY]==null||ve.update(ve.domNode[de.DATA_KEY].mutations||[],be)}),this.domNode[de.DATA_KEY].mutations!=null&&pe.prototype.update.call(this,this.domNode[de.DATA_KEY].mutations,be),this.optimize(ge,be)},fe.blotName="scroll",fe.defaultChild="block",fe.scope=de.Scope.BLOCK_BLOT,fe.tagName="DIV",fe}(oe.default);te.default=he},function(J,te,re){var ne=this&&this.__extends||function(){var he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,fe){pe.__proto__=fe}||function(pe,fe){for(var ge in fe)fe.hasOwnProperty(ge)&&(pe[ge]=fe[ge])};return function(pe,fe){he(pe,fe);function ge(){this.constructor=pe}pe.prototype=fe===null?Object.create(fe):(ge.prototype=fe.prototype,new ge)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(18),de=re(1);function ue(he,pe){if(Object.keys(he).length!==Object.keys(pe).length)return!1;for(var fe in he)if(he[fe]!==pe[fe])return!1;return!0}var ce=function(he){ne(pe,he);function pe(){return he!==null&&he.apply(this,arguments)||this}return pe.formats=function(fe){if(fe.tagName!==pe.tagName)return he.formats.call(this,fe)},pe.prototype.format=function(fe,ge){var be=this;fe===this.statics.blotName&&!ge?(this.children.forEach(function(me){me instanceof oe.default||(me=me.wrap(pe.blotName,!0)),be.attributes.copy(me)}),this.unwrap()):he.prototype.format.call(this,fe,ge)},pe.prototype.formatAt=function(fe,ge,be,me){if(this.formats()[be]!=null||de.query(be,de.Scope.ATTRIBUTE)){var ve=this.isolate(fe,ge);ve.format(be,me)}else he.prototype.formatAt.call(this,fe,ge,be,me)},pe.prototype.optimize=function(fe){he.prototype.optimize.call(this,fe);var ge=this.formats();if(Object.keys(ge).length===0)return this.unwrap();var be=this.next;be instanceof pe&&be.prev===this&&ue(ge,be.formats())&&(be.moveChildren(this),be.remove())},pe.blotName="inline",pe.scope=de.Scope.INLINE_BLOT,pe.tagName="SPAN",pe}(oe.default);te.default=ce},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(18),de=re(1),ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.formats=function(pe){var fe=de.query(he.blotName).tagName;if(pe.tagName!==fe)return ce.formats.call(this,pe)},he.prototype.format=function(pe,fe){de.query(pe,de.Scope.BLOCK)!=null&&(pe===this.statics.blotName&&!fe?this.replaceWith(he.blotName):ce.prototype.format.call(this,pe,fe))},he.prototype.formatAt=function(pe,fe,ge,be){de.query(ge,de.Scope.BLOCK)!=null?this.format(ge,be):ce.prototype.formatAt.call(this,pe,fe,ge,be)},he.prototype.insertAt=function(pe,fe,ge){if(ge==null||de.query(fe,de.Scope.INLINE)!=null)ce.prototype.insertAt.call(this,pe,fe,ge);else{var be=this.split(pe),me=de.create(fe,ge);be.parent.insertBefore(me,be)}},he.prototype.update=function(pe,fe){navigator.userAgent.match(/Trident/)?this.build():ce.prototype.update.call(this,pe,fe)},he.blotName="block",he.scope=de.Scope.BLOCK_BLOT,he.tagName="P",he}(oe.default);te.default=ue},function(J,te,re){var ne=this&&this.__extends||function(){var ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,he){ce.__proto__=he}||function(ce,he){for(var pe in he)he.hasOwnProperty(pe)&&(ce[pe]=he[pe])};return function(ce,he){ue(ce,he);function pe(){this.constructor=ce}ce.prototype=he===null?Object.create(he):(pe.prototype=he.prototype,new pe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(19),de=function(ue){ne(ce,ue);function ce(){return ue!==null&&ue.apply(this,arguments)||this}return ce.formats=function(he){},ce.prototype.format=function(he,pe){ue.prototype.formatAt.call(this,0,this.length(),he,pe)},ce.prototype.formatAt=function(he,pe,fe,ge){he===0&&pe===this.length()?this.format(fe,ge):ue.prototype.formatAt.call(this,he,pe,fe,ge)},ce.prototype.formats=function(){return this.statics.formats(this.domNode)},ce}(oe.default);te.default=de},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(19),de=re(1),ue=function(ce){ne(he,ce);function he(pe){var fe=ce.call(this,pe)||this;return fe.text=fe.statics.value(fe.domNode),fe}return he.create=function(pe){return document.createTextNode(pe)},he.value=function(pe){var fe=pe.data;return fe.normalize&&(fe=fe.normalize()),fe},he.prototype.deleteAt=function(pe,fe){this.domNode.data=this.text=this.text.slice(0,pe)+this.text.slice(pe+fe)},he.prototype.index=function(pe,fe){return this.domNode===pe?fe:-1},he.prototype.insertAt=function(pe,fe,ge){ge==null?(this.text=this.text.slice(0,pe)+fe+this.text.slice(pe),this.domNode.data=this.text):ce.prototype.insertAt.call(this,pe,fe,ge)},he.prototype.length=function(){return this.text.length},he.prototype.optimize=function(pe){ce.prototype.optimize.call(this,pe),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof he&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},he.prototype.position=function(pe,fe){return[this.domNode,pe]},he.prototype.split=function(pe,fe){if(fe===void 0&&(fe=!1),!fe){if(pe===0)return this;if(pe===this.length())return this.next}var ge=de.create(this.domNode.splitText(pe));return this.parent.insertBefore(ge,this.next),this.text=this.statics.value(this.domNode),ge},he.prototype.update=function(pe,fe){var ge=this;pe.some(function(be){return be.type==="characterData"&&be.target===ge.domNode})&&(this.text=this.statics.value(this.domNode))},he.prototype.value=function(){return this.text},he.blotName="text",he.scope=de.Scope.INLINE_BLOT,he}(oe.default);te.default=ue},function(J,te,re){var ne=document.createElement("div");if(ne.classList.toggle("test-class",!1),ne.classList.contains("test-class")){var oe=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(de,ue){return arguments.length>1&&!this.contains(de)==!ue?ue:oe.call(this,de)}}String.prototype.startsWith||(String.prototype.startsWith=function(de,ue){return ue=ue||0,this.substr(ue,de.length)===de}),String.prototype.endsWith||(String.prototype.endsWith=function(de,ue){var ce=this.toString();(typeof ue!="number"||!isFinite(ue)||Math.floor(ue)!==ue||ue>ce.length)&&(ue=ce.length),ue-=de.length;var he=ce.indexOf(de,ue);return he!==-1&&he===ue}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(ue){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof ue!="function")throw new TypeError("predicate must be a function");for(var ce=Object(this),he=ce.length>>>0,pe=arguments[1],fe,ge=0;ge<he;ge++)if(fe=ce[ge],ue.call(pe,fe,ge,ce))return fe}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(J,te){var re=-1,ne=1,oe=0;function de(_e,Ce,Le){if(_e==Ce)return _e?[[oe,_e]]:[];(Le<0||_e.length<Le)&&(Le=null);var Pe=pe(_e,Ce),Ie=_e.substring(0,Pe);_e=_e.substring(Pe),Ce=Ce.substring(Pe),Pe=fe(_e,Ce);var Fe=_e.substring(_e.length-Pe);_e=_e.substring(0,_e.length-Pe),Ce=Ce.substring(0,Ce.length-Pe);var qe=ue(_e,Ce);return Ie&&qe.unshift([oe,Ie]),Fe&&qe.push([oe,Fe]),be(qe),Le!=null&&(qe=ye(qe,Le)),qe=we(qe),qe}function ue(_e,Ce){var Le;if(!_e)return[[ne,Ce]];if(!Ce)return[[re,_e]];var Pe=_e.length>Ce.length?_e:Ce,Ie=_e.length>Ce.length?Ce:_e,Fe=Pe.indexOf(Ie);if(Fe!=-1)return Le=[[ne,Pe.substring(0,Fe)],[oe,Ie],[ne,Pe.substring(Fe+Ie.length)]],_e.length>Ce.length&&(Le[0][0]=Le[2][0]=re),Le;if(Ie.length==1)return[[re,_e],[ne,Ce]];var qe=ge(_e,Ce);if(qe){var Ae=qe[0],De=qe[1],Me=qe[2],Be=qe[3],Ve=qe[4],Je=de(Ae,Me),Ye=de(De,Be);return Je.concat([[oe,Ve]],Ye)}return ce(_e,Ce)}function ce(_e,Ce){for(var Le=_e.length,Pe=Ce.length,Ie=Math.ceil((Le+Pe)/2),Fe=Ie,qe=2*Ie,Ae=new Array(qe),De=new Array(qe),Me=0;Me<qe;Me++)Ae[Me]=-1,De[Me]=-1;Ae[Fe+1]=0,De[Fe+1]=0;for(var Be=Le-Pe,Ve=Be%2!=0,Je=0,Ye=0,kt=0,Qe=0,We=0;We<Ie;We++){for(var Ne=-We+Je;Ne<=We-Ye;Ne+=2){var He=Fe+Ne,Ge;Ne==-We||Ne!=We&&Ae[He-1]<Ae[He+1]?Ge=Ae[He+1]:Ge=Ae[He-1]+1;for(var Xe=Ge-Ne;Ge<Le&&Xe<Pe&&_e.charAt(Ge)==Ce.charAt(Xe);)Ge++,Xe++;if(Ae[He]=Ge,Ge>Le)Ye+=2;else if(Xe>Pe)Je+=2;else if(Ve){var Ke=Fe+Be-Ne;if(Ke>=0&&Ke<qe&&De[Ke]!=-1){var je=Le-De[Ke];if(Ge>=je)return he(_e,Ce,Ge,Xe)}}}for(var Ze=-We+kt;Ze<=We-Qe;Ze+=2){var Ke=Fe+Ze,je;Ze==-We||Ze!=We&&De[Ke-1]<De[Ke+1]?je=De[Ke+1]:je=De[Ke-1]+1;for(var nt=je-Ze;je<Le&&nt<Pe&&_e.charAt(Le-je-1)==Ce.charAt(Pe-nt-1);)je++,nt++;if(De[Ke]=je,je>Le)Qe+=2;else if(nt>Pe)kt+=2;else if(!Ve){var He=Fe+Be-Ze;if(He>=0&&He<qe&&Ae[He]!=-1){var Ge=Ae[He],Xe=Fe+Ge-He;if(je=Le-je,Ge>=je)return he(_e,Ce,Ge,Xe)}}}}return[[re,_e],[ne,Ce]]}function he(_e,Ce,Le,Pe){var Ie=_e.substring(0,Le),Fe=Ce.substring(0,Pe),qe=_e.substring(Le),Ae=Ce.substring(Pe),De=de(Ie,Fe),Me=de(qe,Ae);return De.concat(Me)}function pe(_e,Ce){if(!_e||!Ce||_e.charAt(0)!=Ce.charAt(0))return 0;for(var Le=0,Pe=Math.min(_e.length,Ce.length),Ie=Pe,Fe=0;Le<Ie;)_e.substring(Fe,Ie)==Ce.substring(Fe,Ie)?(Le=Ie,Fe=Le):Pe=Ie,Ie=Math.floor((Pe-Le)/2+Le);return Ie}function fe(_e,Ce){if(!_e||!Ce||_e.charAt(_e.length-1)!=Ce.charAt(Ce.length-1))return 0;for(var Le=0,Pe=Math.min(_e.length,Ce.length),Ie=Pe,Fe=0;Le<Ie;)_e.substring(_e.length-Ie,_e.length-Fe)==Ce.substring(Ce.length-Ie,Ce.length-Fe)?(Le=Ie,Fe=Le):Pe=Ie,Ie=Math.floor((Pe-Le)/2+Le);return Ie}function ge(_e,Ce){var Le=_e.length>Ce.length?_e:Ce,Pe=_e.length>Ce.length?Ce:_e;if(Le.length<4||Pe.length*2<Le.length)return null;function Ie(Ye,kt,Qe){for(var We=Ye.substring(Qe,Qe+Math.floor(Ye.length/4)),Ne=-1,He="",Ge,Xe,Ke,je;(Ne=kt.indexOf(We,Ne+1))!=-1;){var Ze=pe(Ye.substring(Qe),kt.substring(Ne)),nt=fe(Ye.substring(0,Qe),kt.substring(0,Ne));He.length<nt+Ze&&(He=kt.substring(Ne-nt,Ne)+kt.substring(Ne,Ne+Ze),Ge=Ye.substring(0,Qe-nt),Xe=Ye.substring(Qe+Ze),Ke=kt.substring(0,Ne-nt),je=kt.substring(Ne+Ze))}return He.length*2>=Ye.length?[Ge,Xe,Ke,je,He]:null}var Fe=Ie(Le,Pe,Math.ceil(Le.length/4)),qe=Ie(Le,Pe,Math.ceil(Le.length/2)),Ae;if(!Fe&&!qe)return null;qe?Fe?Ae=Fe[4].length>qe[4].length?Fe:qe:Ae=qe:Ae=Fe;var De,Me,Be,Ve;_e.length>Ce.length?(De=Ae[0],Me=Ae[1],Be=Ae[2],Ve=Ae[3]):(Be=Ae[0],Ve=Ae[1],De=Ae[2],Me=Ae[3]);var Je=Ae[4];return[De,Me,Be,Ve,Je]}function be(_e){_e.push([oe,""]);for(var Ce=0,Le=0,Pe=0,Ie="",Fe="",qe;Ce<_e.length;)switch(_e[Ce][0]){case ne:Pe++,Fe+=_e[Ce][1],Ce++;break;case re:Le++,Ie+=_e[Ce][1],Ce++;break;case oe:Le+Pe>1?(Le!==0&&Pe!==0&&(qe=pe(Fe,Ie),qe!==0&&(Ce-Le-Pe>0&&_e[Ce-Le-Pe-1][0]==oe?_e[Ce-Le-Pe-1][1]+=Fe.substring(0,qe):(_e.splice(0,0,[oe,Fe.substring(0,qe)]),Ce++),Fe=Fe.substring(qe),Ie=Ie.substring(qe)),qe=fe(Fe,Ie),qe!==0&&(_e[Ce][1]=Fe.substring(Fe.length-qe)+_e[Ce][1],Fe=Fe.substring(0,Fe.length-qe),Ie=Ie.substring(0,Ie.length-qe))),Le===0?_e.splice(Ce-Pe,Le+Pe,[ne,Fe]):Pe===0?_e.splice(Ce-Le,Le+Pe,[re,Ie]):_e.splice(Ce-Le-Pe,Le+Pe,[re,Ie],[ne,Fe]),Ce=Ce-Le-Pe+(Le?1:0)+(Pe?1:0)+1):Ce!==0&&_e[Ce-1][0]==oe?(_e[Ce-1][1]+=_e[Ce][1],_e.splice(Ce,1)):Ce++,Pe=0,Le=0,Ie="",Fe="";break}_e[_e.length-1][1]===""&&_e.pop();var Ae=!1;for(Ce=1;Ce<_e.length-1;)_e[Ce-1][0]==oe&&_e[Ce+1][0]==oe&&(_e[Ce][1].substring(_e[Ce][1].length-_e[Ce-1][1].length)==_e[Ce-1][1]?(_e[Ce][1]=_e[Ce-1][1]+_e[Ce][1].substring(0,_e[Ce][1].length-_e[Ce-1][1].length),_e[Ce+1][1]=_e[Ce-1][1]+_e[Ce+1][1],_e.splice(Ce-1,1),Ae=!0):_e[Ce][1].substring(0,_e[Ce+1][1].length)==_e[Ce+1][1]&&(_e[Ce-1][1]+=_e[Ce+1][1],_e[Ce][1]=_e[Ce][1].substring(_e[Ce+1][1].length)+_e[Ce+1][1],_e.splice(Ce+1,1),Ae=!0)),Ce++;Ae&&be(_e)}var me=de;me.INSERT=ne,me.DELETE=re,me.EQUAL=oe,J.exports=me;function ve(_e,Ce){if(Ce===0)return[oe,_e];for(var Le=0,Pe=0;Pe<_e.length;Pe++){var Ie=_e[Pe];if(Ie[0]===re||Ie[0]===oe){var Fe=Le+Ie[1].length;if(Ce===Fe)return[Pe+1,_e];if(Ce<Fe){_e=_e.slice();var qe=Ce-Le,Ae=[Ie[0],Ie[1].slice(0,qe)],De=[Ie[0],Ie[1].slice(qe)];return _e.splice(Pe,1,Ae,De),[Pe+1,_e]}else Le=Fe}}throw new Error("cursor_pos is out of bounds!")}function ye(_e,Ce){var Le=ve(_e,Ce),Pe=Le[1],Ie=Le[0],Fe=Pe[Ie],qe=Pe[Ie+1];if(Fe==null)return _e;if(Fe[0]!==oe)return _e;if(qe!=null&&Fe[1]+qe[1]===qe[1]+Fe[1])return Pe.splice(Ie,2,qe,Fe),Se(Pe,Ie,2);if(qe!=null&&qe[1].indexOf(Fe[1])===0){Pe.splice(Ie,2,[qe[0],Fe[1]],[0,Fe[1]]);var Ae=qe[1].slice(Fe[1].length);return Ae.length>0&&Pe.splice(Ie+2,0,[qe[0],Ae]),Se(Pe,Ie,3)}else return _e}function we(_e){for(var Ce=!1,Le=function(qe){return qe.charCodeAt(0)>=56320&&qe.charCodeAt(0)<=57343},Pe=function(qe){return qe.charCodeAt(qe.length-1)>=55296&&qe.charCodeAt(qe.length-1)<=56319},Ie=2;Ie<_e.length;Ie+=1)_e[Ie-2][0]===oe&&Pe(_e[Ie-2][1])&&_e[Ie-1][0]===re&&Le(_e[Ie-1][1])&&_e[Ie][0]===ne&&Le(_e[Ie][1])&&(Ce=!0,_e[Ie-1][1]=_e[Ie-2][1].slice(-1)+_e[Ie-1][1],_e[Ie][1]=_e[Ie-2][1].slice(-1)+_e[Ie][1],_e[Ie-2][1]=_e[Ie-2][1].slice(0,-1));if(!Ce)return _e;for(var Fe=[],Ie=0;Ie<_e.length;Ie+=1)_e[Ie][1].length>0&&Fe.push(_e[Ie]);return Fe}function Se(_e,Ce,Le){for(var Pe=Ce+Le-1;Pe>=0&&Pe>=Ce-1;Pe--)if(Pe+1<_e.length){var Ie=_e[Pe],Fe=_e[Pe+1];Ie[0]===Fe[1]&&_e.splice(Pe,2,[Ie[0],Ie[1]+Fe[1]])}return _e}},function(J,te){te=J.exports=typeof Object.keys=="function"?Object.keys:re,te.shim=re;function re(ne){var oe=[];for(var de in ne)oe.push(de);return oe}},function(J,te){var re=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";te=J.exports=re?ne:oe,te.supported=ne;function ne(de){return Object.prototype.toString.call(de)=="[object Arguments]"}te.unsupported=oe;function oe(de){return de&&typeof de=="object"&&typeof de.length=="number"&&Object.prototype.hasOwnProperty.call(de,"callee")&&!Object.prototype.propertyIsEnumerable.call(de,"callee")||!1}},function(J,te){var re=Object.prototype.hasOwnProperty,ne="~";function oe(){}Object.create&&(oe.prototype=Object.create(null),new oe().__proto__||(ne=!1));function de(ce,he,pe){this.fn=ce,this.context=he,this.once=pe||!1}function ue(){this._events=new oe,this._eventsCount=0}ue.prototype.eventNames=function(){var he=[],pe,fe;if(this._eventsCount===0)return he;for(fe in pe=this._events)re.call(pe,fe)&&he.push(ne?fe.slice(1):fe);return Object.getOwnPropertySymbols?he.concat(Object.getOwnPropertySymbols(pe)):he},ue.prototype.listeners=function(he,pe){var fe=ne?ne+he:he,ge=this._events[fe];if(pe)return!!ge;if(!ge)return[];if(ge.fn)return[ge.fn];for(var be=0,me=ge.length,ve=new Array(me);be<me;be++)ve[be]=ge[be].fn;return ve},ue.prototype.emit=function(he,pe,fe,ge,be,me){var ve=ne?ne+he:he;if(!this._events[ve])return!1;var ye=this._events[ve],we=arguments.length,Se,_e;if(ye.fn){switch(ye.once&&this.removeListener(he,ye.fn,void 0,!0),we){case 1:return ye.fn.call(ye.context),!0;case 2:return ye.fn.call(ye.context,pe),!0;case 3:return ye.fn.call(ye.context,pe,fe),!0;case 4:return ye.fn.call(ye.context,pe,fe,ge),!0;case 5:return ye.fn.call(ye.context,pe,fe,ge,be),!0;case 6:return ye.fn.call(ye.context,pe,fe,ge,be,me),!0}for(_e=1,Se=new Array(we-1);_e<we;_e++)Se[_e-1]=arguments[_e];ye.fn.apply(ye.context,Se)}else{var Ce=ye.length,Le;for(_e=0;_e<Ce;_e++)switch(ye[_e].once&&this.removeListener(he,ye[_e].fn,void 0,!0),we){case 1:ye[_e].fn.call(ye[_e].context);break;case 2:ye[_e].fn.call(ye[_e].context,pe);break;case 3:ye[_e].fn.call(ye[_e].context,pe,fe);break;case 4:ye[_e].fn.call(ye[_e].context,pe,fe,ge);break;default:if(!Se)for(Le=1,Se=new Array(we-1);Le<we;Le++)Se[Le-1]=arguments[Le];ye[_e].fn.apply(ye[_e].context,Se)}}return!0},ue.prototype.on=function(he,pe,fe){var ge=new de(pe,fe||this),be=ne?ne+he:he;return this._events[be]?this._events[be].fn?this._events[be]=[this._events[be],ge]:this._events[be].push(ge):(this._events[be]=ge,this._eventsCount++),this},ue.prototype.once=function(he,pe,fe){var ge=new de(pe,fe||this,!0),be=ne?ne+he:he;return this._events[be]?this._events[be].fn?this._events[be]=[this._events[be],ge]:this._events[be].push(ge):(this._events[be]=ge,this._eventsCount++),this},ue.prototype.removeListener=function(he,pe,fe,ge){var be=ne?ne+he:he;if(!this._events[be])return this;if(!pe)return--this._eventsCount===0?this._events=new oe:delete this._events[be],this;var me=this._events[be];if(me.fn)me.fn===pe&&(!ge||me.once)&&(!fe||me.context===fe)&&(--this._eventsCount===0?this._events=new oe:delete this._events[be]);else{for(var ve=0,ye=[],we=me.length;ve<we;ve++)(me[ve].fn!==pe||ge&&!me[ve].once||fe&&me[ve].context!==fe)&&ye.push(me[ve]);ye.length?this._events[be]=ye.length===1?ye[0]:ye:--this._eventsCount===0?this._events=new oe:delete this._events[be]}return this},ue.prototype.removeAllListeners=function(he){var pe;return he?(pe=ne?ne+he:he,this._events[pe]&&(--this._eventsCount===0?this._events=new oe:delete this._events[pe])):(this._events=new oe,this._eventsCount=0),this},ue.prototype.off=ue.prototype.removeListener,ue.prototype.addListener=ue.prototype.on,ue.prototype.setMaxListeners=function(){return this},ue.prefixed=ne,ue.EventEmitter=ue,typeof J<"u"&&(J.exports=ue)},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.matchText=te.matchSpacing=te.matchNewline=te.matchBlot=te.matchAttributor=te.default=void 0;var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(xt){return typeof xt}:function(xt){return xt&&typeof Symbol=="function"&&xt.constructor===Symbol&&xt!==Symbol.prototype?"symbol":typeof xt},oe=function(){function xt(St,qt){var Dt=[],Tt=!0,Gt=!1,Wt=void 0;try{for(var Yt=St[Symbol.iterator](),pi;!(Tt=(pi=Yt.next()).done)&&(Dt.push(pi.value),!(qt&&Dt.length===qt));Tt=!0);}catch(yi){Gt=!0,Wt=yi}finally{try{!Tt&&Yt.return&&Yt.return()}finally{if(Gt)throw Wt}}return Dt}return function(St,qt){if(Array.isArray(St))return St;if(Symbol.iterator in Object(St))return xt(St,qt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),de=function(){function xt(St,qt){for(var Dt=0;Dt<qt.length;Dt++){var Tt=qt[Dt];Tt.enumerable=Tt.enumerable||!1,Tt.configurable=!0,"value"in Tt&&(Tt.writable=!0),Object.defineProperty(St,Tt.key,Tt)}}return function(St,qt,Dt){return qt&&xt(St.prototype,qt),Dt&&xt(St,Dt),St}}(),ue=re(3),ce=De(ue),he=re(2),pe=De(he),fe=re(0),ge=De(fe),be=re(5),me=De(be),ve=re(10),ye=De(ve),we=re(9),Se=De(we),_e=re(37),Ce=re(38),Le=re(13),Pe=De(Le),Ie=re(26),Fe=re(39),qe=re(40),Ae=re(41);function De(xt){return xt&&xt.__esModule?xt:{default:xt}}function Me(xt,St,qt){return St in xt?Object.defineProperty(xt,St,{value:qt,enumerable:!0,configurable:!0,writable:!0}):xt[St]=qt,xt}function Be(xt,St){if(!(xt instanceof St))throw new TypeError("Cannot call a class as a function")}function Ve(xt,St){if(!xt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:xt}function Je(xt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);xt.prototype=Object.create(St&&St.prototype,{constructor:{value:xt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(xt,St):xt.__proto__=St)}var Ye=(0,ye.default)("quill:clipboard"),kt="__ql-matcher",Qe=[[Node.TEXT_NODE,di],[Node.TEXT_NODE,Kt],["br",Lt],[Node.ELEMENT_NODE,Kt],[Node.ELEMENT_NODE,Ct],[Node.ELEMENT_NODE,ei],[Node.ELEMENT_NODE,ot],[Node.ELEMENT_NODE,mi],["li",jt],["b",nt.bind(nt,"bold")],["i",nt.bind(nt,"italic")],["style",Bt]],We=[_e.AlignAttribute,Fe.DirectionAttribute].reduce(function(xt,St){return xt[St.keyName]=St,xt},{}),Ne=[_e.AlignStyle,Ce.BackgroundStyle,Ie.ColorStyle,Fe.DirectionStyle,qe.FontStyle,Ae.SizeStyle].reduce(function(xt,St){return xt[St.keyName]=St,xt},{}),He=function(xt){Je(St,xt);function St(qt,Dt){Be(this,St);var Tt=Ve(this,(St.__proto__||Object.getPrototypeOf(St)).call(this,qt,Dt));return Tt.quill.root.addEventListener("paste",Tt.onPaste.bind(Tt)),Tt.container=Tt.quill.addContainer("ql-clipboard"),Tt.container.setAttribute("contenteditable",!0),Tt.container.setAttribute("tabindex",-1),Tt.matchers=[],Qe.concat(Tt.options.matchers).forEach(function(Gt){var Wt=oe(Gt,2),Yt=Wt[0],pi=Wt[1];!Dt.matchVisual&&pi===ei||Tt.addMatcher(Yt,pi)}),Tt}return de(St,[{key:"addMatcher",value:function(Dt,Tt){this.matchers.push([Dt,Tt])}},{key:"convert",value:function(Dt){if(typeof Dt=="string")return this.container.innerHTML=Dt.replace(/\>\r?\n +\</g,"><"),this.convert();var Tt=this.quill.getFormat(this.quill.selection.savedRange.index);if(Tt[Pe.default.blotName]){var Gt=this.container.innerText;return this.container.innerHTML="",new pe.default().insert(Gt,Me({},Pe.default.blotName,Tt[Pe.default.blotName]))}var Wt=this.prepareMatching(),Yt=oe(Wt,2),pi=Yt[0],yi=Yt[1],ai=Ze(this.container,pi,yi);return Ke(ai,`
|
|
6552
|
-
`)&&ai.ops[ai.ops.length-1].attributes==null&&(ai=ai.compose(new pe.default().retain(ai.length()-1).delete(1))),Ye.log("convert",this.container.innerHTML,ai),this.container.innerHTML="",ai}},{key:"dangerouslyPasteHTML",value:function(Dt,Tt){var Gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:me.default.sources.API;if(typeof Dt=="string")this.quill.setContents(this.convert(Dt),Tt),this.quill.setSelection(0,me.default.sources.SILENT);else{var Wt=this.convert(Tt);this.quill.updateContents(new pe.default().retain(Dt).concat(Wt),Gt),this.quill.setSelection(Dt+Wt.length(),me.default.sources.SILENT)}}},{key:"onPaste",value:function(Dt){var Tt=this;if(!(Dt.defaultPrevented||!this.quill.isEnabled())){var Gt=this.quill.getSelection(),Wt=new pe.default().retain(Gt.index),Yt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(me.default.sources.SILENT),setTimeout(function(){Wt=Wt.concat(Tt.convert()).delete(Gt.length),Tt.quill.updateContents(Wt,me.default.sources.USER),Tt.quill.setSelection(Wt.length()-Gt.length,me.default.sources.SILENT),Tt.quill.scrollingContainer.scrollTop=Yt,Tt.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Dt=this,Tt=[],Gt=[];return this.matchers.forEach(function(Wt){var Yt=oe(Wt,2),pi=Yt[0],yi=Yt[1];switch(pi){case Node.TEXT_NODE:Gt.push(yi);break;case Node.ELEMENT_NODE:Tt.push(yi);break;default:[].forEach.call(Dt.container.querySelectorAll(pi),function(ai){ai[kt]=ai[kt]||[],ai[kt].push(yi)});break}}),[Tt,Gt]}}]),St}(Se.default);He.DEFAULTS={matchers:[],matchVisual:!0};function Ge(xt,St,qt){return(typeof St>"u"?"undefined":ne(St))==="object"?Object.keys(St).reduce(function(Dt,Tt){return Ge(Dt,Tt,St[Tt])},xt):xt.reduce(function(Dt,Tt){return Tt.attributes&&Tt.attributes[St]?Dt.push(Tt):Dt.insert(Tt.insert,(0,ce.default)({},Me({},St,qt),Tt.attributes))},new pe.default)}function Xe(xt){if(xt.nodeType!==Node.ELEMENT_NODE)return{};var St="__ql-computed-style";return xt[St]||(xt[St]=window.getComputedStyle(xt))}function Ke(xt,St){for(var qt="",Dt=xt.ops.length-1;Dt>=0&&qt.length<St.length;--Dt){var Tt=xt.ops[Dt];if(typeof Tt.insert!="string")break;qt=Tt.insert+qt}return qt.slice(-1*St.length)===St}function je(xt){if(xt.childNodes.length===0)return!1;var St=Xe(xt);return["block","list-item"].indexOf(St.display)>-1}function Ze(xt,St,qt){return xt.nodeType===xt.TEXT_NODE?qt.reduce(function(Dt,Tt){return Tt(xt,Dt)},new pe.default):xt.nodeType===xt.ELEMENT_NODE?[].reduce.call(xt.childNodes||[],function(Dt,Tt){var Gt=Ze(Tt,St,qt);return Tt.nodeType===xt.ELEMENT_NODE&&(Gt=St.reduce(function(Wt,Yt){return Yt(Tt,Wt)},Gt),Gt=(Tt[kt]||[]).reduce(function(Wt,Yt){return Yt(Tt,Wt)},Gt)),Dt.concat(Gt)},new pe.default):new pe.default}function nt(xt,St,qt){return Ge(qt,xt,!0)}function ot(xt,St){var qt=ge.default.Attributor.Attribute.keys(xt),Dt=ge.default.Attributor.Class.keys(xt),Tt=ge.default.Attributor.Style.keys(xt),Gt={};return qt.concat(Dt).concat(Tt).forEach(function(Wt){var Yt=ge.default.query(Wt,ge.default.Scope.ATTRIBUTE);Yt!=null&&(Gt[Yt.attrName]=Yt.value(xt),Gt[Yt.attrName])||(Yt=We[Wt],Yt!=null&&(Yt.attrName===Wt||Yt.keyName===Wt)&&(Gt[Yt.attrName]=Yt.value(xt)||void 0),Yt=
|
|
6588
|
+
`);ei=0,St.forEach(function(qt,Dt){je?(Kt.insertAt(di+ei,ot.TAB),ei+=ot.TAB.length,Dt===0?Ct+=ot.TAB.length:Lt+=ot.TAB.length):qt.startsWith(ot.TAB)&&(Kt.deleteAt(di+ei,ot.TAB.length),ei-=ot.TAB.length,Dt===0?Ct-=ot.TAB.length:Lt-=ot.TAB.length),ei+=qt.length+1}),this.quill.update(Ce.default.sources.USER),this.quill.setSelection(Ct,Lt,Ce.default.sources.SILENT)}}}}function Xe(je){return{key:je[0].toUpperCase(),shortKey:!0,handler:function(nt,ot){this.quill.format(je,!ot.format[je],Ce.default.sources.USER)}}}function Ke(je){if(typeof je=="string"||typeof je=="number")return Ke({key:je});if((typeof je>"u"?"undefined":ne(je))==="object"&&(je=(0,ce.default)(je,!1)),typeof je.key=="string")if(Ye.keys[je.key.toUpperCase()]!=null)je.key=Ye.keys[je.key.toUpperCase()];else if(je.key.length===1)je.key=je.key.toUpperCase().charCodeAt(0);else return null;return je.shortKey&&(je[Je]=je.shortKey,delete je.shortKey),je}te.default=Ye,te.SHORTKEY=Je},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ye(we,Se){var _e=[],Ce=!0,Le=!1,Pe=void 0;try{for(var Ie=we[Symbol.iterator](),Ne;!(Ce=(Ne=Ie.next()).done)&&(_e.push(Ne.value),!(Se&&_e.length===Se));Ce=!0);}catch(qe){Le=!0,Pe=qe}finally{try{!Ce&&Ie.return&&Ie.return()}finally{if(Le)throw Pe}}return _e}return function(we,Se){if(Array.isArray(we))return we;if(Symbol.iterator in Object(we))return ye(we,Se);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function ye(we,Se,_e){we===null&&(we=Function.prototype);var Ce=Object.getOwnPropertyDescriptor(we,Se);if(Ce===void 0){var Le=Object.getPrototypeOf(we);return Le===null?void 0:ye(Le,Se,_e)}else{if("value"in Ce)return Ce.value;var Pe=Ce.get;return Pe===void 0?void 0:Pe.call(_e)}},de=function(){function ye(we,Se){for(var _e=0;_e<Se.length;_e++){var Ce=Se[_e];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(we,Ce.key,Ce)}}return function(we,Se,_e){return Se&&ye(we.prototype,Se),_e&&ye(we,_e),we}}(),ue=re(0),ce=fe(ue),he=re(7),pe=fe(he);function fe(ye){return ye&&ye.__esModule?ye:{default:ye}}function ge(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}function be(ye,we){if(!ye)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return we&&(typeof we=="object"||typeof we=="function")?we:ye}function me(ye,we){if(typeof we!="function"&&we!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof we);ye.prototype=Object.create(we&&we.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),we&&(Object.setPrototypeOf?Object.setPrototypeOf(ye,we):ye.__proto__=we)}var ve=function(ye){me(we,ye),de(we,null,[{key:"value",value:function(){}}]);function we(Se,_e){ge(this,we);var Ce=be(this,(we.__proto__||Object.getPrototypeOf(we)).call(this,Se));return Ce.selection=_e,Ce.textNode=document.createTextNode(we.CONTENTS),Ce.domNode.appendChild(Ce.textNode),Ce._length=0,Ce}return de(we,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(_e,Ce){if(this._length!==0)return oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"format",this).call(this,_e,Ce);for(var Le=this,Pe=0;Le!=null&&Le.statics.scope!==ce.default.Scope.BLOCK_BLOT;)Pe+=Le.offset(Le.parent),Le=Le.parent;Le!=null&&(this._length=we.CONTENTS.length,Le.optimize(),Le.formatAt(Pe,we.CONTENTS.length,_e,Ce),this._length=0)}},{key:"index",value:function(_e,Ce){return _e===this.textNode?0:oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"index",this).call(this,_e,Ce)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var _e=this.textNode,Ce=this.selection.getNativeRange(),Le=void 0,Pe=void 0,Ie=void 0;if(Ce!=null&&Ce.start.node===_e&&Ce.end.node===_e){var Ne=[_e,Ce.start.offset,Ce.end.offset];Le=Ne[0],Pe=Ne[1],Ie=Ne[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==we.CONTENTS){var qe=this.textNode.data.split(we.CONTENTS).join("");this.next instanceof pe.default?(Le=this.next.domNode,this.next.insertAt(0,qe),this.textNode.data=we.CONTENTS):(this.textNode.data=qe,this.parent.insertBefore(ce.default.create(this.textNode),this),this.textNode=document.createTextNode(we.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),Pe!=null){var Ae=[Pe,Ie].map(function(Me){return Math.max(0,Math.min(Le.data.length,Me-1))}),De=ne(Ae,2);return Pe=De[0],Ie=De[1],{startNode:Le,startOffset:Pe,endNode:Le,endOffset:Ie}}}}},{key:"update",value:function(_e,Ce){var Le=this;if(_e.some(function(Ie){return Ie.type==="characterData"&&Ie.target===Le.textNode})){var Pe=this.restore();Pe&&(Ce.range=Pe)}}},{key:"value",value:function(){return""}}]),we}(ce.default.Embed);ve.blotName="cursor",ve.className="ql-cursor",ve.tagName="span",ve.CONTENTS="\uFEFF",te.default=ve},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(0),oe=ce(ne),de=re(4),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return me}(oe.default.Container);ge.allowedChildren=[ue.default,de.BlockEmbed,ge],te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.ColorStyle=te.ColorClass=te.ColorAttributor=void 0;var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(0),ue=ce(de);function ce(ve){return ve&&ve.__esModule?ve:{default:ve}}function he(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function pe(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function fe(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var ge=function(ve){fe(ye,ve);function ye(){return he(this,ye),pe(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"value",value:function(Se){var _e=oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"value",this).call(this,Se);return _e.startsWith("rgb(")?(_e=_e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+_e.split(",").map(function(Ce){return("00"+parseInt(Ce).toString(16)).slice(-2)}).join("")):_e}}]),ye}(ue.default.Attributor.Style),be=new ue.default.Attributor.Class("color","ql-color",{scope:ue.default.Scope.INLINE}),me=new ge("color","color",{scope:ue.default.Scope.INLINE});te.ColorAttributor=ge,te.ColorClass=be,te.ColorStyle=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.sanitize=te.default=void 0;var ne=function(){function me(ve,ye){for(var we=0;we<ye.length;we++){var Se=ye[we];Se.enumerable=Se.enumerable||!1,Se.configurable=!0,"value"in Se&&(Se.writable=!0),Object.defineProperty(ve,Se.key,Se)}}return function(ve,ye,we){return ye&&me(ve.prototype,ye),we&&me(ve,we),ve}}(),oe=function me(ve,ye,we){ve===null&&(ve=Function.prototype);var Se=Object.getOwnPropertyDescriptor(ve,ye);if(Se===void 0){var _e=Object.getPrototypeOf(ve);return _e===null?void 0:me(_e,ye,we)}else{if("value"in Se)return Se.value;var Ce=Se.get;return Ce===void 0?void 0:Ce.call(we)}},de=re(6),ue=ce(de);function ce(me){return me&&me.__esModule?me:{default:me}}function he(me,ve){if(!(me instanceof ve))throw new TypeError("Cannot call a class as a function")}function pe(me,ve){if(!me)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve&&(typeof ve=="object"||typeof ve=="function")?ve:me}function fe(me,ve){if(typeof ve!="function"&&ve!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ve);me.prototype=Object.create(ve&&ve.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}),ve&&(Object.setPrototypeOf?Object.setPrototypeOf(me,ve):me.__proto__=ve)}var ge=function(me){fe(ve,me);function ve(){return he(this,ve),pe(this,(ve.__proto__||Object.getPrototypeOf(ve)).apply(this,arguments))}return ne(ve,[{key:"format",value:function(we,Se){if(we!==this.statics.blotName||!Se)return oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"format",this).call(this,we,Se);Se=this.constructor.sanitize(Se),this.domNode.setAttribute("href",Se)}}],[{key:"create",value:function(we){var Se=oe(ve.__proto__||Object.getPrototypeOf(ve),"create",this).call(this,we);return we=this.sanitize(we),Se.setAttribute("href",we),Se.setAttribute("target","_blank"),Se}},{key:"formats",value:function(we){return we.getAttribute("href")}},{key:"sanitize",value:function(we){return be(we,this.PROTOCOL_WHITELIST)?we:this.SANITIZED_URL}}]),ve}(ue.default);ge.blotName="link",ge.tagName="A",ge.SANITIZED_URL="about:blank",ge.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function be(me,ve){var ye=document.createElement("a");ye.href=me;var we=ye.href.slice(0,ye.href.indexOf(":"));return ve.indexOf(we)>-1}te.default=ge,te.sanitize=be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ve){return typeof ve}:function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},oe=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),de=re(23),ue=pe(de),ce=re(108),he=pe(ce);function pe(ve){return ve&&ve.__esModule?ve:{default:ve}}function fe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}var ge=0;function be(ve,ye){ve.setAttribute(ye,ve.getAttribute(ye)!=="true")}var me=function(){function ve(ye){var we=this;fe(this,ve),this.select=ye,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){we.togglePicker()}),this.label.addEventListener("keydown",function(Se){switch(Se.keyCode){case ue.default.keys.ENTER:we.togglePicker();break;case ue.default.keys.ESCAPE:we.escape(),Se.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return oe(ve,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),be(this.label,"aria-expanded"),be(this.options,"aria-hidden")}},{key:"buildItem",value:function(we){var Se=this,_e=document.createElement("span");return _e.tabIndex="0",_e.setAttribute("role","button"),_e.classList.add("ql-picker-item"),we.hasAttribute("value")&&_e.setAttribute("data-value",we.getAttribute("value")),we.textContent&&_e.setAttribute("data-label",we.textContent),_e.addEventListener("click",function(){Se.selectItem(_e,!0)}),_e.addEventListener("keydown",function(Ce){switch(Ce.keyCode){case ue.default.keys.ENTER:Se.selectItem(_e,!0),Ce.preventDefault();break;case ue.default.keys.ESCAPE:Se.escape(),Ce.preventDefault();break}}),_e}},{key:"buildLabel",value:function(){var we=document.createElement("span");return we.classList.add("ql-picker-label"),we.innerHTML=he.default,we.tabIndex="0",we.setAttribute("role","button"),we.setAttribute("aria-expanded","false"),this.container.appendChild(we),we}},{key:"buildOptions",value:function(){var we=this,Se=document.createElement("span");Se.classList.add("ql-picker-options"),Se.setAttribute("aria-hidden","true"),Se.tabIndex="-1",Se.id="ql-picker-options-"+ge,ge+=1,this.label.setAttribute("aria-controls",Se.id),this.options=Se,[].slice.call(this.select.options).forEach(function(_e){var Ce=we.buildItem(_e);Se.appendChild(Ce),_e.selected===!0&&we.selectItem(Ce)}),this.container.appendChild(Se)}},{key:"buildPicker",value:function(){var we=this;[].slice.call(this.select.attributes).forEach(function(Se){we.container.setAttribute(Se.name,Se.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var we=this;this.close(),setTimeout(function(){return we.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(we){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_e=this.container.querySelector(".ql-selected");if(we!==_e&&(_e!=null&&_e.classList.remove("ql-selected"),we!=null&&(we.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(we.parentNode.children,we),we.hasAttribute("data-value")?this.label.setAttribute("data-value",we.getAttribute("data-value")):this.label.removeAttribute("data-value"),we.hasAttribute("data-label")?this.label.setAttribute("data-label",we.getAttribute("data-label")):this.label.removeAttribute("data-label"),Se))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":ne(Event))==="object"){var Ce=document.createEvent("Event");Ce.initEvent("change",!0,!0),this.select.dispatchEvent(Ce)}this.close()}}},{key:"update",value:function(){var we=void 0;if(this.select.selectedIndex>-1){var Se=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];we=this.select.options[this.select.selectedIndex],this.selectItem(Se)}else this.selectItem(null);var _e=we!=null&&we!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",_e)}}]),ve}();te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(0),oe=Ve(ne),de=re(5),ue=Ve(de),ce=re(4),he=Ve(ce),pe=re(16),fe=Ve(pe),ge=re(25),be=Ve(ge),me=re(24),ve=Ve(me),ye=re(36),we=Ve(ye),Se=re(6),_e=Ve(Se),Ce=re(22),Le=Ve(Ce),Pe=re(7),Ie=Ve(Pe),Ne=re(56),qe=Ve(Ne),Ae=re(43),De=Ve(Ae),Me=re(23),Be=Ve(Me);function Ve(Je){return Je&&Je.__esModule?Je:{default:Je}}ue.default.register({"blots/block":he.default,"blots/block/embed":ce.BlockEmbed,"blots/break":fe.default,"blots/container":be.default,"blots/cursor":ve.default,"blots/embed":we.default,"blots/inline":_e.default,"blots/scroll":Le.default,"blots/text":Ie.default,"modules/clipboard":qe.default,"modules/history":De.default,"modules/keyboard":Be.default}),oe.default.register(he.default,fe.default,ve.default,_e.default,Le.default,Ie.default),te.default=ue.default},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(1),oe=function(){function de(ue){this.domNode=ue,this.domNode[ne.DATA_KEY]={blot:this}}return Object.defineProperty(de.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),de.create=function(ue){if(this.tagName==null)throw new ne.ParchmentError("Blot definition missing tagName");var ce;return Array.isArray(this.tagName)?(typeof ue=="string"&&(ue=ue.toUpperCase(),parseInt(ue).toString()===ue&&(ue=parseInt(ue))),typeof ue=="number"?ce=document.createElement(this.tagName[ue-1]):this.tagName.indexOf(ue)>-1?ce=document.createElement(ue):ce=document.createElement(this.tagName[0])):ce=document.createElement(this.tagName),this.className&&ce.classList.add(this.className),ce},de.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},de.prototype.clone=function(){var ue=this.domNode.cloneNode(!1);return ne.create(ue)},de.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[ne.DATA_KEY]},de.prototype.deleteAt=function(ue,ce){var he=this.isolate(ue,ce);he.remove()},de.prototype.formatAt=function(ue,ce,he,pe){var fe=this.isolate(ue,ce);if(ne.query(he,ne.Scope.BLOT)!=null&&pe)fe.wrap(he,pe);else if(ne.query(he,ne.Scope.ATTRIBUTE)!=null){var ge=ne.create(this.statics.scope);fe.wrap(ge),ge.format(he,pe)}},de.prototype.insertAt=function(ue,ce,he){var pe=he==null?ne.create("text",ce):ne.create(ce,he),fe=this.split(ue);this.parent.insertBefore(pe,fe)},de.prototype.insertInto=function(ue,ce){ce===void 0&&(ce=null),this.parent!=null&&this.parent.children.remove(this);var he=null;ue.children.insertBefore(this,ce),ce!=null&&(he=ce.domNode),(this.domNode.parentNode!=ue.domNode||this.domNode.nextSibling!=he)&&ue.domNode.insertBefore(this.domNode,he),this.parent=ue,this.attach()},de.prototype.isolate=function(ue,ce){var he=this.split(ue);return he.split(ce),he},de.prototype.length=function(){return 1},de.prototype.offset=function(ue){return ue===void 0&&(ue=this.parent),this.parent==null||this==ue?0:this.parent.children.offset(this)+this.parent.offset(ue)},de.prototype.optimize=function(ue){this.domNode[ne.DATA_KEY]!=null&&delete this.domNode[ne.DATA_KEY].mutations},de.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},de.prototype.replace=function(ue){ue.parent!=null&&(ue.parent.insertBefore(this,ue.next),ue.remove())},de.prototype.replaceWith=function(ue,ce){var he=typeof ue=="string"?ne.create(ue,ce):ue;return he.replace(this),he},de.prototype.split=function(ue,ce){return ue===0?this:this.next},de.prototype.update=function(ue,ce){},de.prototype.wrap=function(ue,ce){var he=typeof ue=="string"?ne.create(ue,ce):ue;return this.parent!=null&&this.parent.insertBefore(he,this.next),he.appendChild(this),he},de.blotName="abstract",de}();te.default=oe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(12),oe=re(32),de=re(33),ue=re(1),ce=function(){function he(pe){this.attributes={},this.domNode=pe,this.build()}return he.prototype.attribute=function(pe,fe){fe?pe.add(this.domNode,fe)&&(pe.value(this.domNode)!=null?this.attributes[pe.attrName]=pe:delete this.attributes[pe.attrName]):(pe.remove(this.domNode),delete this.attributes[pe.attrName])},he.prototype.build=function(){var pe=this;this.attributes={};var fe=ne.default.keys(this.domNode),ge=oe.default.keys(this.domNode),be=de.default.keys(this.domNode);fe.concat(ge).concat(be).forEach(function(me){var ve=ue.query(me,ue.Scope.ATTRIBUTE);ve instanceof ne.default&&(pe.attributes[ve.attrName]=ve)})},he.prototype.copy=function(pe){var fe=this;Object.keys(this.attributes).forEach(function(ge){var be=fe.attributes[ge].value(fe.domNode);pe.format(ge,be)})},he.prototype.move=function(pe){var fe=this;this.copy(pe),Object.keys(this.attributes).forEach(function(ge){fe.attributes[ge].remove(fe.domNode)}),this.attributes={}},he.prototype.values=function(){var pe=this;return Object.keys(this.attributes).reduce(function(fe,ge){return fe[ge]=pe.attributes[ge].value(pe.domNode),fe},{})},he}();te.default=ce},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(12);function de(ce,he){var pe=ce.getAttribute("class")||"";return pe.split(/\s+/).filter(function(fe){return fe.indexOf(he+"-")===0})}var ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.keys=function(pe){return(pe.getAttribute("class")||"").split(/\s+/).map(function(fe){return fe.split("-").slice(0,-1).join("-")})},he.prototype.add=function(pe,fe){return this.canAdd(pe,fe)?(this.remove(pe),pe.classList.add(this.keyName+"-"+fe),!0):!1},he.prototype.remove=function(pe){var fe=de(pe,this.keyName);fe.forEach(function(ge){pe.classList.remove(ge)}),pe.classList.length===0&&pe.removeAttribute("class")},he.prototype.value=function(pe){var fe=de(pe,this.keyName)[0]||"",ge=fe.slice(this.keyName.length+1);return this.canAdd(pe,ge)?ge:""},he}(oe.default);te.default=ue},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(12);function de(ce){var he=ce.split("-"),pe=he.slice(1).map(function(fe){return fe[0].toUpperCase()+fe.slice(1)}).join("");return he[0]+pe}var ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.keys=function(pe){return(pe.getAttribute("style")||"").split(";").map(function(fe){var ge=fe.split(":");return ge[0].trim()})},he.prototype.add=function(pe,fe){return this.canAdd(pe,fe)?(pe.style[de(this.keyName)]=fe,!0):!1},he.prototype.remove=function(pe){pe.style[de(this.keyName)]="",pe.getAttribute("style")||pe.removeAttribute("style")},he.prototype.value=function(pe){var fe=pe.style[de(this.keyName)];return this.canAdd(pe,fe)?fe:""},he}(oe.default);te.default=ue},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.getRange=Pe,te.internalGetShadowSelection=Ne;var ne=te.SHADOW_SELECTIONCHANGE="-shadow-selectionchange",oe="attachShadow"in Element.prototype&&"getRootNode"in Element.prototype,de=!!(oe&&document.createElement("div").attachShadow({mode:"open"}).getSelection),ue=window.ShadyDOM&&window.ShadyDOM.inUse,ce=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,he=!oe||ue||!de&&!ce,pe=[Node.ELEMENT_NODE,Node.TEXT_NODE,Node.DOCUMENT_FRAGMENT_NODE];function fe(qe){return pe.includes(qe.nodeType)}function ge(qe,Ae,De){var Me=Ae.childNodes||Ae.children;if(!Me)return Ae;for(var Be=0;Be<Me.length;++Be){var Ve=De?Be:Me.length-1-Be,Je=Me[Ve];if(fe(Je)&&qe.containsNode(Je,!0))return qe.containsNode(Je,!1)?Je:ge(qe,Je,De)}return Ae}var be=function(){if(de||he)return document.addEventListener("selectionchange",function(){document.dispatchEvent(new CustomEvent(ne))}),function(){};var qe=!1,Ae=[];return document.addEventListener("selectionchange",function(De){qe||(document.dispatchEvent(new CustomEvent(ne)),qe=!0,window.setTimeout(function(){qe=!1},2),Ae.forEach(function(Me){return Me(De)}))}),function(De){return Ae.push(De)}}(),me=!1,ve=null;be(function(){var qe=window.getSelection();qe.type==="Caret"?me=!0:me&&!ve&&(ve=Promise.resolve(!0).then(function(){me=!1,ve=null}))});function ye(qe,Ae,De){for(var Me=Ae;(Ae=Se(Ae,De))&&Ae.contains(Me););return Ae?Ae instanceof Element&&qe.containsNode(Ae,!0):!1}function we(qe,Ae,De){if(qe.type==="Range"){var Me=function(){return qe.toString().length},Be=Me();if(Be===1&&me&&Ae===De){qe.extend(Ae,0),qe.collapseToEnd();return}var Ve=void 0;if(qe.modify("extend","forward","character"),Ve=Me(),Ve>Be||ye(qe,De,!0))return qe.modify("extend","backward","character"),!0;if(Ve<Be||!qe.containsNode(Ae))return qe.modify("extend","backward","character"),!1;if(qe.modify("extend","backward","character"),Ve=Me(),Ve>Be||ye(qe,Ae,!1))return qe.modify("extend","forward","character"),!1;if(Ve<Be||!qe.containsNode(De))return qe.modify("extend","forward","character"),!0}}function Se(qe,Ae){if(!Ae)return qe.previousSibling||qe.parentNode||null;for(;qe;){if(qe.nextSibling)return qe.nextSibling;qe=qe.parentNode}return null}function _e(qe){return qe.nodeType!==Node.TEXT_NODE?0:/^\s*/.exec(qe.textContent)[0].length}function Ce(qe){if(qe.nodeType!==Node.TEXT_NODE)return 0;var Ae=/\s*$/.exec(qe.textContent)[0].length;return Ae?Ae-1:0}var Le=new Map;function Pe(qe){if(de||he){var Ae=(he?document:qe).getSelection();return Ae.rangeCount?Ae.getRangeAt(0):null}var De=Le.get(qe);if(De)return De;var Me=Ne(qe);return Le.set(qe,Me.range),window.setTimeout(function(){Le.delete(qe)},0),Me.range}var Ie=document.createTextNode("");function Ne(qe){var Ae=document.createRange(),De=window.getSelection();if(!De.containsNode(qe.host,!0))return{range:null,mode:"none"};qe.insertBefore(Ie,qe.childNodes[0]);var Me=De.containsNode(Ie);if(Ie.remove(),Me)return{range:null,mode:"outside-before"};qe.appendChild(Ie);var Be=De.containsNode(Ie);if(Ie.remove(),Be)return{range:null,mode:"outside-after"};var Ve=function(){return De.toString().length};if(!(De.type==="Caret"||De.type==="Range"))throw new TypeError("unexpected type: "+De.type);var Je=ge(De,qe,!0),Ye=void 0,kt=void 0;if(De.type==="Range"&&(Ye=ge(De,qe,!1),kt=we(De,Je,Ye)),De.type==="Caret"){De.extend(Je,0);var Qe=Ve();return De.collapseToEnd(),Ae.setStart(Je,Qe),Ae.setEnd(Je,Qe),{range:Ae,mode:"caret"}}else if(kt===void 0){if(De.type!=="Range")throw new TypeError("unexpected type: "+De.type);return Ae.setStart(Je,0),Ae.setEnd(Ye,Ye.length),{range:Ae,mode:"all"}}var We=Ve(),Fe=void 0,He=void 0,Ge=Ye.length-Ce(Ye);return kt?(De.extend(Je,0),Fe=Ve()+_e(Je),De.extend(Ye,Ge),He=Ge-(Ve()-We),De.extend(Ye,He)):(De.extend(Ye,Ge),He=Ge-Ve(),De.extend(Je,0),Fe=Ve()-We+_e(Je),De.extend(Je,Fe)),Ae.setStart(Je,Fe),Ae.setEnd(Ye,He),{mode:kt?"right":"left",range:Ae}}},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ue(ce,he){for(var pe=0;pe<he.length;pe++){var fe=he[pe];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(ce,fe.key,fe)}}return function(ce,he,pe){return he&&ue(ce.prototype,he),pe&&ue(ce,pe),ce}}();function oe(ue,ce){if(!(ue instanceof ce))throw new TypeError("Cannot call a class as a function")}var de=function(){function ue(ce,he){oe(this,ue),this.quill=ce,this.options=he,this.modules={}}return ne(ue,[{key:"init",value:function(){var he=this;Object.keys(this.options.modules).forEach(function(pe){he.modules[pe]==null&&he.addModule(pe)})}},{key:"addModule",value:function(he){var pe=this.quill.constructor.import("modules/"+he);return this.modules[he]=new pe(this.quill,this.options.modules[he]||{}),this.modules[he]}}]),ue}();de.DEFAULTS={modules:{}},de.themes={default:de},te.default=de},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ye(we,Se){for(var _e=0;_e<Se.length;_e++){var Ce=Se[_e];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(we,Ce.key,Ce)}}return function(we,Se,_e){return Se&&ye(we.prototype,Se),_e&&ye(we,_e),we}}(),oe=function ye(we,Se,_e){we===null&&(we=Function.prototype);var Ce=Object.getOwnPropertyDescriptor(we,Se);if(Ce===void 0){var Le=Object.getPrototypeOf(we);return Le===null?void 0:ye(Le,Se,_e)}else{if("value"in Ce)return Ce.value;var Pe=Ce.get;return Pe===void 0?void 0:Pe.call(_e)}},de=re(0),ue=pe(de),ce=re(7),he=pe(ce);function pe(ye){return ye&&ye.__esModule?ye:{default:ye}}function fe(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}function ge(ye,we){if(!ye)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return we&&(typeof we=="object"||typeof we=="function")?we:ye}function be(ye,we){if(typeof we!="function"&&we!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof we);ye.prototype=Object.create(we&&we.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),we&&(Object.setPrototypeOf?Object.setPrototypeOf(ye,we):ye.__proto__=we)}var me="\uFEFF",ve=function(ye){be(we,ye);function we(Se){fe(this,we);var _e=ge(this,(we.__proto__||Object.getPrototypeOf(we)).call(this,Se));return _e.contentNode=document.createElement("span"),_e.contentNode.setAttribute("contenteditable",!1),[].slice.call(_e.domNode.childNodes).forEach(function(Ce){_e.contentNode.appendChild(Ce)}),_e.leftGuard=document.createTextNode(me),_e.rightGuard=document.createTextNode(me),_e.domNode.appendChild(_e.leftGuard),_e.domNode.appendChild(_e.contentNode),_e.domNode.appendChild(_e.rightGuard),_e}return ne(we,[{key:"index",value:function(_e,Ce){return _e===this.leftGuard?0:_e===this.rightGuard?1:oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"index",this).call(this,_e,Ce)}},{key:"restore",value:function(_e){var Ce=void 0,Le=void 0,Pe=_e.data.split(me).join("");if(_e===this.leftGuard)if(this.prev instanceof he.default){var Ie=this.prev.length();this.prev.insertAt(Ie,Pe),Ce={startNode:this.prev.domNode,startOffset:Ie+Pe.length}}else Le=document.createTextNode(Pe),this.parent.insertBefore(ue.default.create(Le),this),Ce={startNode:Le,startOffset:Pe.length};else _e===this.rightGuard&&(this.next instanceof he.default?(this.next.insertAt(0,Pe),Ce={startNode:this.next.domNode,startOffset:Pe.length}):(Le=document.createTextNode(Pe),this.parent.insertBefore(ue.default.create(Le),this.next),Ce={startNode:Le,startOffset:Pe.length}));return _e.data=me,Ce}},{key:"update",value:function(_e,Ce){var Le=this;_e.forEach(function(Pe){if(Pe.type==="characterData"&&(Pe.target===Le.leftGuard||Pe.target===Le.rightGuard)){var Ie=Le.restore(Pe.target);Ie&&(Ce.range=Ie)}})}}]),we}(ue.default.Embed);te.default=ve},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.AlignStyle=te.AlignClass=te.AlignAttribute=void 0;var ne=re(0),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}var ue={scope:oe.default.Scope.BLOCK,whitelist:["right","center","justify"]},ce=new oe.default.Attributor.Attribute("align","align",ue),he=new oe.default.Attributor.Class("align","ql-align",ue),pe=new oe.default.Attributor.Style("align","text-align",ue);te.AlignAttribute=ce,te.AlignClass=he,te.AlignStyle=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.BackgroundStyle=te.BackgroundClass=void 0;var ne=re(0),oe=ue(ne),de=re(26);function ue(pe){return pe&&pe.__esModule?pe:{default:pe}}var ce=new oe.default.Attributor.Class("background","ql-bg",{scope:oe.default.Scope.INLINE}),he=new de.ColorAttributor("background","background-color",{scope:oe.default.Scope.INLINE});te.BackgroundClass=ce,te.BackgroundStyle=he},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.DirectionStyle=te.DirectionClass=te.DirectionAttribute=void 0;var ne=re(0),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}var ue={scope:oe.default.Scope.BLOCK,whitelist:["rtl"]},ce=new oe.default.Attributor.Attribute("direction","dir",ue),he=new oe.default.Attributor.Class("direction","ql-direction",ue),pe=new oe.default.Attributor.Style("direction","direction",ue);te.DirectionAttribute=ce,te.DirectionClass=he,te.DirectionStyle=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.FontClass=te.FontStyle=void 0;var ne=function(){function ye(we,Se){for(var _e=0;_e<Se.length;_e++){var Ce=Se[_e];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(we,Ce.key,Ce)}}return function(we,Se,_e){return Se&&ye(we.prototype,Se),_e&&ye(we,_e),we}}(),oe=function ye(we,Se,_e){we===null&&(we=Function.prototype);var Ce=Object.getOwnPropertyDescriptor(we,Se);if(Ce===void 0){var Le=Object.getPrototypeOf(we);return Le===null?void 0:ye(Le,Se,_e)}else{if("value"in Ce)return Ce.value;var Pe=Ce.get;return Pe===void 0?void 0:Pe.call(_e)}},de=re(0),ue=ce(de);function ce(ye){return ye&&ye.__esModule?ye:{default:ye}}function he(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}function pe(ye,we){if(!ye)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return we&&(typeof we=="object"||typeof we=="function")?we:ye}function fe(ye,we){if(typeof we!="function"&&we!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof we);ye.prototype=Object.create(we&&we.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),we&&(Object.setPrototypeOf?Object.setPrototypeOf(ye,we):ye.__proto__=we)}var ge={scope:ue.default.Scope.INLINE,whitelist:["serif","monospace"]},be=new ue.default.Attributor.Class("font","ql-font",ge),me=function(ye){fe(we,ye);function we(){return he(this,we),pe(this,(we.__proto__||Object.getPrototypeOf(we)).apply(this,arguments))}return ne(we,[{key:"value",value:function(_e){return oe(we.prototype.__proto__||Object.getPrototypeOf(we.prototype),"value",this).call(this,_e).replace(/["']/g,"")}}]),we}(ue.default.Attributor.Style),ve=new me("font","font-family",ge);te.FontStyle=ve,te.FontClass=be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.SizeStyle=te.SizeClass=void 0;var ne=re(0),oe=de(ne);function de(he){return he&&he.__esModule?he:{default:he}}var ue=new oe.default.Attributor.Class("size","ql-size",{scope:oe.default.Scope.INLINE,whitelist:["small","large","huge"]}),ce=new oe.default.Attributor.Style("size","font-size",{scope:oe.default.Scope.INLINE,whitelist:["10px","18px","32px"]});te.SizeClass=ue,te.SizeStyle=ce},function(J,te,re){J.exports={align:{"":re(77),center:re(78),right:re(79),justify:re(80)},background:re(81),blockquote:re(82),bold:re(83),clean:re(84),code:re(59),"code-block":re(59),color:re(85),direction:{"":re(86),rtl:re(87)},float:{center:re(88),full:re(89),left:re(90),right:re(91)},formula:re(92),header:{1:re(93),2:re(94)},italic:re(95),image:re(96),indent:{"+1":re(97),"-1":re(98)},link:re(99),list:{ordered:re(100),bullet:re(101),check:re(102)},script:{sub:re(103),super:re(104)},strike:re(105),underline:re(106),video:re(107)}},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.getLastChangeIndex=te.default=void 0;var ne=function(){function Se(_e,Ce){for(var Le=0;Le<Ce.length;Le++){var Pe=Ce[Le];Pe.enumerable=Pe.enumerable||!1,Pe.configurable=!0,"value"in Pe&&(Pe.writable=!0),Object.defineProperty(_e,Pe.key,Pe)}}return function(_e,Ce,Le){return Ce&&Se(_e.prototype,Ce),Le&&Se(_e,Le),_e}}(),oe=re(0),de=fe(oe),ue=re(5),ce=fe(ue),he=re(9),pe=fe(he);function fe(Se){return Se&&Se.__esModule?Se:{default:Se}}function ge(Se,_e){if(!(Se instanceof _e))throw new TypeError("Cannot call a class as a function")}function be(Se,_e){if(!Se)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e&&(typeof _e=="object"||typeof _e=="function")?_e:Se}function me(Se,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _e);Se.prototype=Object.create(_e&&_e.prototype,{constructor:{value:Se,enumerable:!1,writable:!0,configurable:!0}}),_e&&(Object.setPrototypeOf?Object.setPrototypeOf(Se,_e):Se.__proto__=_e)}var ve=function(Se){me(_e,Se);function _e(Ce,Le){ge(this,_e);var Pe=be(this,(_e.__proto__||Object.getPrototypeOf(_e)).call(this,Ce,Le));return Pe.lastRecorded=0,Pe.ignoreChange=!1,Pe.clear(),Pe.quill.on(ce.default.events.EDITOR_CHANGE,function(Ie,Ne,qe,Ae){Ie!==ce.default.events.TEXT_CHANGE||Pe.ignoreChange||(!Pe.options.userOnly||Ae===ce.default.sources.USER?Pe.record(Ne,qe):Pe.transform(Ne))}),Pe.quill.keyboard.addBinding({key:"Z",shortKey:!0},Pe.undo.bind(Pe)),Pe.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},Pe.redo.bind(Pe)),/Win/i.test(navigator.platform)&&Pe.quill.keyboard.addBinding({key:"Y",shortKey:!0},Pe.redo.bind(Pe)),Pe}return ne(_e,[{key:"change",value:function(Le,Pe){if(this.stack[Le].length!==0){var Ie=this.stack[Le].pop();this.stack[Pe].push(Ie),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(Ie[Le],ce.default.sources.USER),this.ignoreChange=!1;var Ne=we(Ie[Le]);this.quill.setSelection(Ne)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(Le,Pe){if(Le.ops.length!==0){this.stack.redo=[];var Ie=this.quill.getContents().diff(Pe),Ne=Date.now();if(this.lastRecorded+this.options.delay>Ne&&this.stack.undo.length>0){var qe=this.stack.undo.pop();Ie=Ie.compose(qe.undo),Le=qe.redo.compose(Le)}else this.lastRecorded=Ne;this.stack.undo.push({redo:Le,undo:Ie}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(Le){this.stack.undo.forEach(function(Pe){Pe.undo=Le.transform(Pe.undo,!0),Pe.redo=Le.transform(Pe.redo,!0)}),this.stack.redo.forEach(function(Pe){Pe.undo=Le.transform(Pe.undo,!0),Pe.redo=Le.transform(Pe.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),_e}(pe.default);ve.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function ye(Se){var _e=Se.ops[Se.ops.length-1];return _e==null?!1:_e.insert!=null?typeof _e.insert=="string"&&_e.insert.endsWith(`
|
|
6589
|
+
`):_e.attributes!=null?Object.keys(_e.attributes).some(function(Ce){return de.default.query(Ce,de.default.Scope.BLOCK)!=null}):!1}function we(Se){var _e=Se.reduce(function(Le,Pe){return Le+=Pe.delete||0,Le},0),Ce=Se.length()-_e;return ye(Se)&&(Ce-=1),Ce}te.default=ve,te.getLastChangeIndex=we},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.BaseTooltip=void 0;var ne=function(){function He(Ge,Xe){for(var Ke=0;Ke<Xe.length;Ke++){var je=Xe[Ke];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(Ge,je.key,je)}}return function(Ge,Xe,Ke){return Xe&&He(Ge.prototype,Xe),Ke&&He(Ge,Ke),Ge}}(),oe=function He(Ge,Xe,Ke){Ge===null&&(Ge=Function.prototype);var je=Object.getOwnPropertyDescriptor(Ge,Xe);if(je===void 0){var Ze=Object.getPrototypeOf(Ge);return Ze===null?void 0:He(Ze,Xe,Ke)}else{if("value"in je)return je.value;var nt=je.get;return nt===void 0?void 0:nt.call(Ke)}},de=re(3),ue=Ne(de),ce=re(2),he=Ne(ce),pe=re(8),fe=Ne(pe),ge=re(23),be=Ne(ge),me=re(35),ve=Ne(me),ye=re(60),we=Ne(ye),Se=re(61),_e=Ne(Se),Ce=re(28),Le=Ne(Ce),Pe=re(62),Ie=Ne(Pe);function Ne(He){return He&&He.__esModule?He:{default:He}}function qe(He,Ge){if(!(He instanceof Ge))throw new TypeError("Cannot call a class as a function")}function Ae(He,Ge){if(!He)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ge&&(typeof Ge=="object"||typeof Ge=="function")?Ge:He}function De(He,Ge){if(typeof Ge!="function"&&Ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ge);He.prototype=Object.create(Ge&&Ge.prototype,{constructor:{value:He,enumerable:!1,writable:!0,configurable:!0}}),Ge&&(Object.setPrototypeOf?Object.setPrototypeOf(He,Ge):He.__proto__=Ge)}var Me=[!1,"center","right","justify"],Be=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Ve=[!1,"serif","monospace"],Je=["1","2","3",!1],Ye=["petita",!1,"gran","enorme"],kt=function(He){De(Ge,He);function Ge(Xe,Ke){qe(this,Ge);var je=Ae(this,(Ge.__proto__||Object.getPrototypeOf(Ge)).call(this,Xe,Ke)),Ze=function nt(ot){if(!document.body.contains(Xe.root))return document.body.removeEventListener("click",nt);je.tooltip!=null&&!je.tooltip.root.contains(ot.target)&&document.activeElement!==je.tooltip.textbox&&!je.quill.hasFocus()&&je.tooltip.hide(),je.pickers!=null&&je.pickers.forEach(function(Ct){Ct.container.contains(ot.target)||Ct.close()})};return Xe.emitter.listenDOM("click",document.body,Ze),je}return ne(Ge,[{key:"addModule",value:function(Ke){var je=oe(Ge.prototype.__proto__||Object.getPrototypeOf(Ge.prototype),"addModule",this).call(this,Ke);return Ke==="toolbar"&&this.extendToolbar(je),je}},{key:"buildButtons",value:function(Ke,je){Ke.forEach(function(Ze){var nt=Ze.getAttribute("class")||"";nt.split(/\s+/).forEach(function(ot){if(ot.startsWith("ql-")&&(ot=ot.slice(3),je[ot]!=null))if(ot==="direction")Ze.innerHTML=je[ot][""]+je[ot].rtl;else if(typeof je[ot]=="string")Ze.innerHTML=je[ot];else{var Ct=Ze.value||"";Ct!=null&&je[ot][Ct]&&(Ze.innerHTML=je[ot][Ct])}})})}},{key:"buildPickers",value:function(Ke,je){var Ze=this;this.pickers=Ke.map(function(ot){if(ot.classList.contains("ql-align"))return ot.querySelector("option")==null&&Fe(ot,Me),new _e.default(ot,je.align);if(ot.classList.contains("ql-background")||ot.classList.contains("ql-color")){var Ct=ot.classList.contains("ql-background")?"background":"color";return ot.querySelector("option")==null&&Fe(ot,Be,Ct==="background"?"#ffffff":"#000000"),new we.default(ot,je[Ct])}else return ot.querySelector("option")==null&&(ot.classList.contains("ql-font")?Fe(ot,Ve):ot.classList.contains("ql-header")?Fe(ot,Je):ot.classList.contains("ql-size")&&Fe(ot,Ye)),new Le.default(ot)});var nt=function(){Ze.pickers.forEach(function(Ct){Ct.update()})};this.quill.on(fe.default.events.EDITOR_CHANGE,nt)}}]),Ge}(ve.default);kt.DEFAULTS=(0,ue.default)(!0,{},ve.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var Ge=this,Xe=this.container.querySelector("input.ql-image[type=file]");Xe==null&&(Xe=document.createElement("input"),Xe.setAttribute("type","file"),Xe.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Xe.classList.add("ql-image"),Xe.addEventListener("change",function(){if(Xe.files!=null&&Xe.files[0]!=null){var Ke=new FileReader;Ke.onload=function(je){var Ze=Ge.quill.getSelection(!0);Ge.quill.updateContents(new he.default().retain(Ze.index).delete(Ze.length).insert({image:je.target.result}),fe.default.sources.USER),Ge.quill.setSelection(Ze.index+1,fe.default.sources.SILENT),Xe.value=""},Ke.readAsDataURL(Xe.files[0])}}),this.container.appendChild(Xe)),Xe.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var Qe=function(He){De(Ge,He);function Ge(Xe,Ke){qe(this,Ge);var je=Ae(this,(Ge.__proto__||Object.getPrototypeOf(Ge)).call(this,Xe,Ke));return je.textbox=je.root.querySelector('input[type="text"]'),je.listen(),je}return ne(Ge,[{key:"listen",value:function(){var Ke=this;this.textbox.addEventListener("keydown",function(je){be.default.match(je,"enter")?(Ke.save(),je.preventDefault()):be.default.match(je,"escape")&&(Ke.cancel(),je.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),je!=null?this.textbox.value=je:Ke!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+Ke)||""),this.root.setAttribute("data-mode",Ke)}},{key:"restoreFocus",value:function(){var Ke=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Ke}},{key:"save",value:function(){var Ke=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var je=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Ke,fe.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Ke,fe.default.sources.USER)),this.quill.root.scrollTop=je;break}case"video":Ke=We(Ke);case"formula":{if(!Ke)break;var Ze=this.quill.getSelection(!0);if(Ze!=null){var nt=Ze.index+Ze.length;this.quill.insertEmbed(nt,this.root.getAttribute("data-mode"),Ke,fe.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(nt+1," ",fe.default.sources.USER),this.quill.setSelection(nt+2,fe.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),Ge}(Ie.default);function We(He){var Ge=He.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||He.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return Ge?(Ge[1]||"https")+"://www.youtube.com/embed/"+Ge[2]+"?showinfo=0":(Ge=He.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(Ge[1]||"https")+"://player.vimeo.com/video/"+Ge[2]+"/":He}function Fe(He,Ge){var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ge.forEach(function(Ke){var je=document.createElement("option");Ke===Xe?je.setAttribute("selected","selected"):je.setAttribute("value",Ke),He.appendChild(je)})}te.BaseTooltip=Qe,te.default=kt},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function oe(){this.head=this.tail=null,this.length=0}return oe.prototype.append=function(){for(var de=[],ue=0;ue<arguments.length;ue++)de[ue]=arguments[ue];this.insertBefore(de[0],null),de.length>1&&this.append.apply(this,de.slice(1))},oe.prototype.contains=function(de){for(var ue,ce=this.iterator();ue=ce();)if(ue===de)return!0;return!1},oe.prototype.insertBefore=function(de,ue){de&&(de.next=ue,ue!=null?(de.prev=ue.prev,ue.prev!=null&&(ue.prev.next=de),ue.prev=de,ue===this.head&&(this.head=de)):this.tail!=null?(this.tail.next=de,de.prev=this.tail,this.tail=de):(de.prev=null,this.head=this.tail=de),this.length+=1)},oe.prototype.offset=function(de){for(var ue=0,ce=this.head;ce!=null;){if(ce===de)return ue;ue+=ce.length(),ce=ce.next}return-1},oe.prototype.remove=function(de){this.contains(de)&&(de.prev!=null&&(de.prev.next=de.next),de.next!=null&&(de.next.prev=de.prev),de===this.head&&(this.head=de.next),de===this.tail&&(this.tail=de.prev),this.length-=1)},oe.prototype.iterator=function(de){return de===void 0&&(de=this.head),function(){var ue=de;return de!=null&&(de=de.next),ue}},oe.prototype.find=function(de,ue){ue===void 0&&(ue=!1);for(var ce,he=this.iterator();ce=he();){var pe=ce.length();if(de<pe||ue&&de===pe&&(ce.next==null||ce.next.length()!==0))return[ce,de];de-=pe}return[null,0]},oe.prototype.forEach=function(de){for(var ue,ce=this.iterator();ue=ce();)de(ue)},oe.prototype.forEachAt=function(de,ue,ce){if(!(ue<=0))for(var he=this.find(de),pe=he[0],fe=he[1],ge,be=de-fe,me=this.iterator(pe);(ge=me())&&be<de+ue;){var ve=ge.length();de>be?ce(ge,de-be,Math.min(ue,be+ve-de)):ce(ge,0,Math.min(ve,de+ue-be)),be+=ve}},oe.prototype.map=function(de){return this.reduce(function(ue,ce){return ue.push(de(ce)),ue},[])},oe.prototype.reduce=function(de,ue){for(var ce,he=this.iterator();ce=he();)ue=de(ue,ce);return ue},oe}();te.default=ne},function(J,te,re){var ne=this&&this.__extends||function(){var pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ge){fe.__proto__=ge}||function(fe,ge){for(var be in ge)ge.hasOwnProperty(be)&&(fe[be]=ge[be])};return function(fe,ge){pe(fe,ge);function be(){this.constructor=fe}fe.prototype=ge===null?Object.create(ge):(be.prototype=ge.prototype,new be)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(17),de=re(1),ue={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},ce=100,he=function(pe){ne(fe,pe);function fe(ge){var be=pe.call(this,ge)||this;return be.scroll=be,be.observer=new MutationObserver(function(me){be.update(me)}),be.observer.observe(be.domNode,ue),be.attach(),be}return fe.prototype.detach=function(){pe.prototype.detach.call(this),this.observer.disconnect()},fe.prototype.deleteAt=function(ge,be){this.update(),ge===0&&be===this.length()?this.children.forEach(function(me){me.remove()}):pe.prototype.deleteAt.call(this,ge,be)},fe.prototype.formatAt=function(ge,be,me,ve){this.update(),pe.prototype.formatAt.call(this,ge,be,me,ve)},fe.prototype.insertAt=function(ge,be,me){this.update(),pe.prototype.insertAt.call(this,ge,be,me)},fe.prototype.optimize=function(ge,be){var me=this;ge===void 0&&(ge=[]),be===void 0&&(be={}),pe.prototype.optimize.call(this,be);for(var ve=[].slice.call(this.observer.takeRecords());ve.length>0;)ge.push(ve.pop());for(var ye=function(Ce,Le){Le===void 0&&(Le=!0),!(Ce==null||Ce===me)&&Ce.domNode.parentNode!=null&&(Ce.domNode[de.DATA_KEY].mutations==null&&(Ce.domNode[de.DATA_KEY].mutations=[]),Le&&ye(Ce.parent))},we=function(Ce){Ce.domNode[de.DATA_KEY]==null||Ce.domNode[de.DATA_KEY].mutations==null||(Ce instanceof oe.default&&Ce.children.forEach(we),Ce.optimize(be))},Se=ge,_e=0;Se.length>0;_e+=1){if(_e>=ce)throw new Error("[Parchment] Maximum optimize iterations reached");for(Se.forEach(function(Ce){var Le=de.find(Ce.target,!0);Le!=null&&(Le.domNode===Ce.target&&(Ce.type==="childList"?(ye(de.find(Ce.previousSibling,!1)),[].forEach.call(Ce.addedNodes,function(Pe){var Ie=de.find(Pe,!1);ye(Ie,!1),Ie instanceof oe.default&&Ie.children.forEach(function(Ne){ye(Ne,!1)})})):Ce.type==="attributes"&&ye(Le.prev)),ye(Le))}),this.children.forEach(we),Se=[].slice.call(this.observer.takeRecords()),ve=Se.slice();ve.length>0;)ge.push(ve.pop())}},fe.prototype.update=function(ge,be){var me=this;be===void 0&&(be={}),ge=ge||this.observer.takeRecords(),ge.map(function(ve){var ye=de.find(ve.target,!0);return ye==null?null:ye.domNode[de.DATA_KEY].mutations==null?(ye.domNode[de.DATA_KEY].mutations=[ve],ye):(ye.domNode[de.DATA_KEY].mutations.push(ve),null)}).forEach(function(ve){ve==null||ve===me||ve.domNode[de.DATA_KEY]==null||ve.update(ve.domNode[de.DATA_KEY].mutations||[],be)}),this.domNode[de.DATA_KEY].mutations!=null&&pe.prototype.update.call(this,this.domNode[de.DATA_KEY].mutations,be),this.optimize(ge,be)},fe.blotName="scroll",fe.defaultChild="block",fe.scope=de.Scope.BLOCK_BLOT,fe.tagName="DIV",fe}(oe.default);te.default=he},function(J,te,re){var ne=this&&this.__extends||function(){var he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,fe){pe.__proto__=fe}||function(pe,fe){for(var ge in fe)fe.hasOwnProperty(ge)&&(pe[ge]=fe[ge])};return function(pe,fe){he(pe,fe);function ge(){this.constructor=pe}pe.prototype=fe===null?Object.create(fe):(ge.prototype=fe.prototype,new ge)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(18),de=re(1);function ue(he,pe){if(Object.keys(he).length!==Object.keys(pe).length)return!1;for(var fe in he)if(he[fe]!==pe[fe])return!1;return!0}var ce=function(he){ne(pe,he);function pe(){return he!==null&&he.apply(this,arguments)||this}return pe.formats=function(fe){if(fe.tagName!==pe.tagName)return he.formats.call(this,fe)},pe.prototype.format=function(fe,ge){var be=this;fe===this.statics.blotName&&!ge?(this.children.forEach(function(me){me instanceof oe.default||(me=me.wrap(pe.blotName,!0)),be.attributes.copy(me)}),this.unwrap()):he.prototype.format.call(this,fe,ge)},pe.prototype.formatAt=function(fe,ge,be,me){if(this.formats()[be]!=null||de.query(be,de.Scope.ATTRIBUTE)){var ve=this.isolate(fe,ge);ve.format(be,me)}else he.prototype.formatAt.call(this,fe,ge,be,me)},pe.prototype.optimize=function(fe){he.prototype.optimize.call(this,fe);var ge=this.formats();if(Object.keys(ge).length===0)return this.unwrap();var be=this.next;be instanceof pe&&be.prev===this&&ue(ge,be.formats())&&(be.moveChildren(this),be.remove())},pe.blotName="inline",pe.scope=de.Scope.INLINE_BLOT,pe.tagName="SPAN",pe}(oe.default);te.default=ce},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(18),de=re(1),ue=function(ce){ne(he,ce);function he(){return ce!==null&&ce.apply(this,arguments)||this}return he.formats=function(pe){var fe=de.query(he.blotName).tagName;if(pe.tagName!==fe)return ce.formats.call(this,pe)},he.prototype.format=function(pe,fe){de.query(pe,de.Scope.BLOCK)!=null&&(pe===this.statics.blotName&&!fe?this.replaceWith(he.blotName):ce.prototype.format.call(this,pe,fe))},he.prototype.formatAt=function(pe,fe,ge,be){de.query(ge,de.Scope.BLOCK)!=null?this.format(ge,be):ce.prototype.formatAt.call(this,pe,fe,ge,be)},he.prototype.insertAt=function(pe,fe,ge){if(ge==null||de.query(fe,de.Scope.INLINE)!=null)ce.prototype.insertAt.call(this,pe,fe,ge);else{var be=this.split(pe),me=de.create(fe,ge);be.parent.insertBefore(me,be)}},he.prototype.update=function(pe,fe){navigator.userAgent.match(/Trident/)?this.build():ce.prototype.update.call(this,pe,fe)},he.blotName="block",he.scope=de.Scope.BLOCK_BLOT,he.tagName="P",he}(oe.default);te.default=ue},function(J,te,re){var ne=this&&this.__extends||function(){var ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,he){ce.__proto__=he}||function(ce,he){for(var pe in he)he.hasOwnProperty(pe)&&(ce[pe]=he[pe])};return function(ce,he){ue(ce,he);function pe(){this.constructor=ce}ce.prototype=he===null?Object.create(he):(pe.prototype=he.prototype,new pe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(19),de=function(ue){ne(ce,ue);function ce(){return ue!==null&&ue.apply(this,arguments)||this}return ce.formats=function(he){},ce.prototype.format=function(he,pe){ue.prototype.formatAt.call(this,0,this.length(),he,pe)},ce.prototype.formatAt=function(he,pe,fe,ge){he===0&&pe===this.length()?this.format(fe,ge):ue.prototype.formatAt.call(this,he,pe,fe,ge)},ce.prototype.formats=function(){return this.statics.formats(this.domNode)},ce}(oe.default);te.default=de},function(J,te,re){var ne=this&&this.__extends||function(){var ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var fe in pe)pe.hasOwnProperty(fe)&&(he[fe]=pe[fe])};return function(he,pe){ce(he,pe);function fe(){this.constructor=he}he.prototype=pe===null?Object.create(pe):(fe.prototype=pe.prototype,new fe)}}();Object.defineProperty(te,"__esModule",{value:!0});var oe=re(19),de=re(1),ue=function(ce){ne(he,ce);function he(pe){var fe=ce.call(this,pe)||this;return fe.text=fe.statics.value(fe.domNode),fe}return he.create=function(pe){return document.createTextNode(pe)},he.value=function(pe){var fe=pe.data;return fe.normalize&&(fe=fe.normalize()),fe},he.prototype.deleteAt=function(pe,fe){this.domNode.data=this.text=this.text.slice(0,pe)+this.text.slice(pe+fe)},he.prototype.index=function(pe,fe){return this.domNode===pe?fe:-1},he.prototype.insertAt=function(pe,fe,ge){ge==null?(this.text=this.text.slice(0,pe)+fe+this.text.slice(pe),this.domNode.data=this.text):ce.prototype.insertAt.call(this,pe,fe,ge)},he.prototype.length=function(){return this.text.length},he.prototype.optimize=function(pe){ce.prototype.optimize.call(this,pe),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof he&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},he.prototype.position=function(pe,fe){return[this.domNode,pe]},he.prototype.split=function(pe,fe){if(fe===void 0&&(fe=!1),!fe){if(pe===0)return this;if(pe===this.length())return this.next}var ge=de.create(this.domNode.splitText(pe));return this.parent.insertBefore(ge,this.next),this.text=this.statics.value(this.domNode),ge},he.prototype.update=function(pe,fe){var ge=this;pe.some(function(be){return be.type==="characterData"&&be.target===ge.domNode})&&(this.text=this.statics.value(this.domNode))},he.prototype.value=function(){return this.text},he.blotName="text",he.scope=de.Scope.INLINE_BLOT,he}(oe.default);te.default=ue},function(J,te,re){var ne=document.createElement("div");if(ne.classList.toggle("test-class",!1),ne.classList.contains("test-class")){var oe=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(de,ue){return arguments.length>1&&!this.contains(de)==!ue?ue:oe.call(this,de)}}String.prototype.startsWith||(String.prototype.startsWith=function(de,ue){return ue=ue||0,this.substr(ue,de.length)===de}),String.prototype.endsWith||(String.prototype.endsWith=function(de,ue){var ce=this.toString();(typeof ue!="number"||!isFinite(ue)||Math.floor(ue)!==ue||ue>ce.length)&&(ue=ce.length),ue-=de.length;var he=ce.indexOf(de,ue);return he!==-1&&he===ue}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(ue){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof ue!="function")throw new TypeError("predicate must be a function");for(var ce=Object(this),he=ce.length>>>0,pe=arguments[1],fe,ge=0;ge<he;ge++)if(fe=ce[ge],ue.call(pe,fe,ge,ce))return fe}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(J,te){var re=-1,ne=1,oe=0;function de(_e,Ce,Le){if(_e==Ce)return _e?[[oe,_e]]:[];(Le<0||_e.length<Le)&&(Le=null);var Pe=pe(_e,Ce),Ie=_e.substring(0,Pe);_e=_e.substring(Pe),Ce=Ce.substring(Pe),Pe=fe(_e,Ce);var Ne=_e.substring(_e.length-Pe);_e=_e.substring(0,_e.length-Pe),Ce=Ce.substring(0,Ce.length-Pe);var qe=ue(_e,Ce);return Ie&&qe.unshift([oe,Ie]),Ne&&qe.push([oe,Ne]),be(qe),Le!=null&&(qe=ye(qe,Le)),qe=we(qe),qe}function ue(_e,Ce){var Le;if(!_e)return[[ne,Ce]];if(!Ce)return[[re,_e]];var Pe=_e.length>Ce.length?_e:Ce,Ie=_e.length>Ce.length?Ce:_e,Ne=Pe.indexOf(Ie);if(Ne!=-1)return Le=[[ne,Pe.substring(0,Ne)],[oe,Ie],[ne,Pe.substring(Ne+Ie.length)]],_e.length>Ce.length&&(Le[0][0]=Le[2][0]=re),Le;if(Ie.length==1)return[[re,_e],[ne,Ce]];var qe=ge(_e,Ce);if(qe){var Ae=qe[0],De=qe[1],Me=qe[2],Be=qe[3],Ve=qe[4],Je=de(Ae,Me),Ye=de(De,Be);return Je.concat([[oe,Ve]],Ye)}return ce(_e,Ce)}function ce(_e,Ce){for(var Le=_e.length,Pe=Ce.length,Ie=Math.ceil((Le+Pe)/2),Ne=Ie,qe=2*Ie,Ae=new Array(qe),De=new Array(qe),Me=0;Me<qe;Me++)Ae[Me]=-1,De[Me]=-1;Ae[Ne+1]=0,De[Ne+1]=0;for(var Be=Le-Pe,Ve=Be%2!=0,Je=0,Ye=0,kt=0,Qe=0,We=0;We<Ie;We++){for(var Fe=-We+Je;Fe<=We-Ye;Fe+=2){var He=Ne+Fe,Ge;Fe==-We||Fe!=We&&Ae[He-1]<Ae[He+1]?Ge=Ae[He+1]:Ge=Ae[He-1]+1;for(var Xe=Ge-Fe;Ge<Le&&Xe<Pe&&_e.charAt(Ge)==Ce.charAt(Xe);)Ge++,Xe++;if(Ae[He]=Ge,Ge>Le)Ye+=2;else if(Xe>Pe)Je+=2;else if(Ve){var Ke=Ne+Be-Fe;if(Ke>=0&&Ke<qe&&De[Ke]!=-1){var je=Le-De[Ke];if(Ge>=je)return he(_e,Ce,Ge,Xe)}}}for(var Ze=-We+kt;Ze<=We-Qe;Ze+=2){var Ke=Ne+Ze,je;Ze==-We||Ze!=We&&De[Ke-1]<De[Ke+1]?je=De[Ke+1]:je=De[Ke-1]+1;for(var nt=je-Ze;je<Le&&nt<Pe&&_e.charAt(Le-je-1)==Ce.charAt(Pe-nt-1);)je++,nt++;if(De[Ke]=je,je>Le)Qe+=2;else if(nt>Pe)kt+=2;else if(!Ve){var He=Ne+Be-Ze;if(He>=0&&He<qe&&Ae[He]!=-1){var Ge=Ae[He],Xe=Ne+Ge-He;if(je=Le-je,Ge>=je)return he(_e,Ce,Ge,Xe)}}}}return[[re,_e],[ne,Ce]]}function he(_e,Ce,Le,Pe){var Ie=_e.substring(0,Le),Ne=Ce.substring(0,Pe),qe=_e.substring(Le),Ae=Ce.substring(Pe),De=de(Ie,Ne),Me=de(qe,Ae);return De.concat(Me)}function pe(_e,Ce){if(!_e||!Ce||_e.charAt(0)!=Ce.charAt(0))return 0;for(var Le=0,Pe=Math.min(_e.length,Ce.length),Ie=Pe,Ne=0;Le<Ie;)_e.substring(Ne,Ie)==Ce.substring(Ne,Ie)?(Le=Ie,Ne=Le):Pe=Ie,Ie=Math.floor((Pe-Le)/2+Le);return Ie}function fe(_e,Ce){if(!_e||!Ce||_e.charAt(_e.length-1)!=Ce.charAt(Ce.length-1))return 0;for(var Le=0,Pe=Math.min(_e.length,Ce.length),Ie=Pe,Ne=0;Le<Ie;)_e.substring(_e.length-Ie,_e.length-Ne)==Ce.substring(Ce.length-Ie,Ce.length-Ne)?(Le=Ie,Ne=Le):Pe=Ie,Ie=Math.floor((Pe-Le)/2+Le);return Ie}function ge(_e,Ce){var Le=_e.length>Ce.length?_e:Ce,Pe=_e.length>Ce.length?Ce:_e;if(Le.length<4||Pe.length*2<Le.length)return null;function Ie(Ye,kt,Qe){for(var We=Ye.substring(Qe,Qe+Math.floor(Ye.length/4)),Fe=-1,He="",Ge,Xe,Ke,je;(Fe=kt.indexOf(We,Fe+1))!=-1;){var Ze=pe(Ye.substring(Qe),kt.substring(Fe)),nt=fe(Ye.substring(0,Qe),kt.substring(0,Fe));He.length<nt+Ze&&(He=kt.substring(Fe-nt,Fe)+kt.substring(Fe,Fe+Ze),Ge=Ye.substring(0,Qe-nt),Xe=Ye.substring(Qe+Ze),Ke=kt.substring(0,Fe-nt),je=kt.substring(Fe+Ze))}return He.length*2>=Ye.length?[Ge,Xe,Ke,je,He]:null}var Ne=Ie(Le,Pe,Math.ceil(Le.length/4)),qe=Ie(Le,Pe,Math.ceil(Le.length/2)),Ae;if(!Ne&&!qe)return null;qe?Ne?Ae=Ne[4].length>qe[4].length?Ne:qe:Ae=qe:Ae=Ne;var De,Me,Be,Ve;_e.length>Ce.length?(De=Ae[0],Me=Ae[1],Be=Ae[2],Ve=Ae[3]):(Be=Ae[0],Ve=Ae[1],De=Ae[2],Me=Ae[3]);var Je=Ae[4];return[De,Me,Be,Ve,Je]}function be(_e){_e.push([oe,""]);for(var Ce=0,Le=0,Pe=0,Ie="",Ne="",qe;Ce<_e.length;)switch(_e[Ce][0]){case ne:Pe++,Ne+=_e[Ce][1],Ce++;break;case re:Le++,Ie+=_e[Ce][1],Ce++;break;case oe:Le+Pe>1?(Le!==0&&Pe!==0&&(qe=pe(Ne,Ie),qe!==0&&(Ce-Le-Pe>0&&_e[Ce-Le-Pe-1][0]==oe?_e[Ce-Le-Pe-1][1]+=Ne.substring(0,qe):(_e.splice(0,0,[oe,Ne.substring(0,qe)]),Ce++),Ne=Ne.substring(qe),Ie=Ie.substring(qe)),qe=fe(Ne,Ie),qe!==0&&(_e[Ce][1]=Ne.substring(Ne.length-qe)+_e[Ce][1],Ne=Ne.substring(0,Ne.length-qe),Ie=Ie.substring(0,Ie.length-qe))),Le===0?_e.splice(Ce-Pe,Le+Pe,[ne,Ne]):Pe===0?_e.splice(Ce-Le,Le+Pe,[re,Ie]):_e.splice(Ce-Le-Pe,Le+Pe,[re,Ie],[ne,Ne]),Ce=Ce-Le-Pe+(Le?1:0)+(Pe?1:0)+1):Ce!==0&&_e[Ce-1][0]==oe?(_e[Ce-1][1]+=_e[Ce][1],_e.splice(Ce,1)):Ce++,Pe=0,Le=0,Ie="",Ne="";break}_e[_e.length-1][1]===""&&_e.pop();var Ae=!1;for(Ce=1;Ce<_e.length-1;)_e[Ce-1][0]==oe&&_e[Ce+1][0]==oe&&(_e[Ce][1].substring(_e[Ce][1].length-_e[Ce-1][1].length)==_e[Ce-1][1]?(_e[Ce][1]=_e[Ce-1][1]+_e[Ce][1].substring(0,_e[Ce][1].length-_e[Ce-1][1].length),_e[Ce+1][1]=_e[Ce-1][1]+_e[Ce+1][1],_e.splice(Ce-1,1),Ae=!0):_e[Ce][1].substring(0,_e[Ce+1][1].length)==_e[Ce+1][1]&&(_e[Ce-1][1]+=_e[Ce+1][1],_e[Ce][1]=_e[Ce][1].substring(_e[Ce+1][1].length)+_e[Ce+1][1],_e.splice(Ce+1,1),Ae=!0)),Ce++;Ae&&be(_e)}var me=de;me.INSERT=ne,me.DELETE=re,me.EQUAL=oe,J.exports=me;function ve(_e,Ce){if(Ce===0)return[oe,_e];for(var Le=0,Pe=0;Pe<_e.length;Pe++){var Ie=_e[Pe];if(Ie[0]===re||Ie[0]===oe){var Ne=Le+Ie[1].length;if(Ce===Ne)return[Pe+1,_e];if(Ce<Ne){_e=_e.slice();var qe=Ce-Le,Ae=[Ie[0],Ie[1].slice(0,qe)],De=[Ie[0],Ie[1].slice(qe)];return _e.splice(Pe,1,Ae,De),[Pe+1,_e]}else Le=Ne}}throw new Error("cursor_pos is out of bounds!")}function ye(_e,Ce){var Le=ve(_e,Ce),Pe=Le[1],Ie=Le[0],Ne=Pe[Ie],qe=Pe[Ie+1];if(Ne==null)return _e;if(Ne[0]!==oe)return _e;if(qe!=null&&Ne[1]+qe[1]===qe[1]+Ne[1])return Pe.splice(Ie,2,qe,Ne),Se(Pe,Ie,2);if(qe!=null&&qe[1].indexOf(Ne[1])===0){Pe.splice(Ie,2,[qe[0],Ne[1]],[0,Ne[1]]);var Ae=qe[1].slice(Ne[1].length);return Ae.length>0&&Pe.splice(Ie+2,0,[qe[0],Ae]),Se(Pe,Ie,3)}else return _e}function we(_e){for(var Ce=!1,Le=function(qe){return qe.charCodeAt(0)>=56320&&qe.charCodeAt(0)<=57343},Pe=function(qe){return qe.charCodeAt(qe.length-1)>=55296&&qe.charCodeAt(qe.length-1)<=56319},Ie=2;Ie<_e.length;Ie+=1)_e[Ie-2][0]===oe&&Pe(_e[Ie-2][1])&&_e[Ie-1][0]===re&&Le(_e[Ie-1][1])&&_e[Ie][0]===ne&&Le(_e[Ie][1])&&(Ce=!0,_e[Ie-1][1]=_e[Ie-2][1].slice(-1)+_e[Ie-1][1],_e[Ie][1]=_e[Ie-2][1].slice(-1)+_e[Ie][1],_e[Ie-2][1]=_e[Ie-2][1].slice(0,-1));if(!Ce)return _e;for(var Ne=[],Ie=0;Ie<_e.length;Ie+=1)_e[Ie][1].length>0&&Ne.push(_e[Ie]);return Ne}function Se(_e,Ce,Le){for(var Pe=Ce+Le-1;Pe>=0&&Pe>=Ce-1;Pe--)if(Pe+1<_e.length){var Ie=_e[Pe],Ne=_e[Pe+1];Ie[0]===Ne[1]&&_e.splice(Pe,2,[Ie[0],Ie[1]+Ne[1]])}return _e}},function(J,te){te=J.exports=typeof Object.keys=="function"?Object.keys:re,te.shim=re;function re(ne){var oe=[];for(var de in ne)oe.push(de);return oe}},function(J,te){var re=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";te=J.exports=re?ne:oe,te.supported=ne;function ne(de){return Object.prototype.toString.call(de)=="[object Arguments]"}te.unsupported=oe;function oe(de){return de&&typeof de=="object"&&typeof de.length=="number"&&Object.prototype.hasOwnProperty.call(de,"callee")&&!Object.prototype.propertyIsEnumerable.call(de,"callee")||!1}},function(J,te){var re=Object.prototype.hasOwnProperty,ne="~";function oe(){}Object.create&&(oe.prototype=Object.create(null),new oe().__proto__||(ne=!1));function de(ce,he,pe){this.fn=ce,this.context=he,this.once=pe||!1}function ue(){this._events=new oe,this._eventsCount=0}ue.prototype.eventNames=function(){var he=[],pe,fe;if(this._eventsCount===0)return he;for(fe in pe=this._events)re.call(pe,fe)&&he.push(ne?fe.slice(1):fe);return Object.getOwnPropertySymbols?he.concat(Object.getOwnPropertySymbols(pe)):he},ue.prototype.listeners=function(he,pe){var fe=ne?ne+he:he,ge=this._events[fe];if(pe)return!!ge;if(!ge)return[];if(ge.fn)return[ge.fn];for(var be=0,me=ge.length,ve=new Array(me);be<me;be++)ve[be]=ge[be].fn;return ve},ue.prototype.emit=function(he,pe,fe,ge,be,me){var ve=ne?ne+he:he;if(!this._events[ve])return!1;var ye=this._events[ve],we=arguments.length,Se,_e;if(ye.fn){switch(ye.once&&this.removeListener(he,ye.fn,void 0,!0),we){case 1:return ye.fn.call(ye.context),!0;case 2:return ye.fn.call(ye.context,pe),!0;case 3:return ye.fn.call(ye.context,pe,fe),!0;case 4:return ye.fn.call(ye.context,pe,fe,ge),!0;case 5:return ye.fn.call(ye.context,pe,fe,ge,be),!0;case 6:return ye.fn.call(ye.context,pe,fe,ge,be,me),!0}for(_e=1,Se=new Array(we-1);_e<we;_e++)Se[_e-1]=arguments[_e];ye.fn.apply(ye.context,Se)}else{var Ce=ye.length,Le;for(_e=0;_e<Ce;_e++)switch(ye[_e].once&&this.removeListener(he,ye[_e].fn,void 0,!0),we){case 1:ye[_e].fn.call(ye[_e].context);break;case 2:ye[_e].fn.call(ye[_e].context,pe);break;case 3:ye[_e].fn.call(ye[_e].context,pe,fe);break;case 4:ye[_e].fn.call(ye[_e].context,pe,fe,ge);break;default:if(!Se)for(Le=1,Se=new Array(we-1);Le<we;Le++)Se[Le-1]=arguments[Le];ye[_e].fn.apply(ye[_e].context,Se)}}return!0},ue.prototype.on=function(he,pe,fe){var ge=new de(pe,fe||this),be=ne?ne+he:he;return this._events[be]?this._events[be].fn?this._events[be]=[this._events[be],ge]:this._events[be].push(ge):(this._events[be]=ge,this._eventsCount++),this},ue.prototype.once=function(he,pe,fe){var ge=new de(pe,fe||this,!0),be=ne?ne+he:he;return this._events[be]?this._events[be].fn?this._events[be]=[this._events[be],ge]:this._events[be].push(ge):(this._events[be]=ge,this._eventsCount++),this},ue.prototype.removeListener=function(he,pe,fe,ge){var be=ne?ne+he:he;if(!this._events[be])return this;if(!pe)return--this._eventsCount===0?this._events=new oe:delete this._events[be],this;var me=this._events[be];if(me.fn)me.fn===pe&&(!ge||me.once)&&(!fe||me.context===fe)&&(--this._eventsCount===0?this._events=new oe:delete this._events[be]);else{for(var ve=0,ye=[],we=me.length;ve<we;ve++)(me[ve].fn!==pe||ge&&!me[ve].once||fe&&me[ve].context!==fe)&&ye.push(me[ve]);ye.length?this._events[be]=ye.length===1?ye[0]:ye:--this._eventsCount===0?this._events=new oe:delete this._events[be]}return this},ue.prototype.removeAllListeners=function(he){var pe;return he?(pe=ne?ne+he:he,this._events[pe]&&(--this._eventsCount===0?this._events=new oe:delete this._events[pe])):(this._events=new oe,this._eventsCount=0),this},ue.prototype.off=ue.prototype.removeListener,ue.prototype.addListener=ue.prototype.on,ue.prototype.setMaxListeners=function(){return this},ue.prefixed=ne,ue.EventEmitter=ue,typeof J<"u"&&(J.exports=ue)},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.matchText=te.matchSpacing=te.matchNewline=te.matchBlot=te.matchAttributor=te.default=void 0;var ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(xt){return typeof xt}:function(xt){return xt&&typeof Symbol=="function"&&xt.constructor===Symbol&&xt!==Symbol.prototype?"symbol":typeof xt},oe=function(){function xt(St,qt){var Dt=[],Tt=!0,Gt=!1,Wt=void 0;try{for(var Yt=St[Symbol.iterator](),pi;!(Tt=(pi=Yt.next()).done)&&(Dt.push(pi.value),!(qt&&Dt.length===qt));Tt=!0);}catch(yi){Gt=!0,Wt=yi}finally{try{!Tt&&Yt.return&&Yt.return()}finally{if(Gt)throw Wt}}return Dt}return function(St,qt){if(Array.isArray(St))return St;if(Symbol.iterator in Object(St))return xt(St,qt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),de=function(){function xt(St,qt){for(var Dt=0;Dt<qt.length;Dt++){var Tt=qt[Dt];Tt.enumerable=Tt.enumerable||!1,Tt.configurable=!0,"value"in Tt&&(Tt.writable=!0),Object.defineProperty(St,Tt.key,Tt)}}return function(St,qt,Dt){return qt&&xt(St.prototype,qt),Dt&&xt(St,Dt),St}}(),ue=re(3),ce=De(ue),he=re(2),pe=De(he),fe=re(0),ge=De(fe),be=re(5),me=De(be),ve=re(10),ye=De(ve),we=re(9),Se=De(we),_e=re(37),Ce=re(38),Le=re(13),Pe=De(Le),Ie=re(26),Ne=re(39),qe=re(40),Ae=re(41);function De(xt){return xt&&xt.__esModule?xt:{default:xt}}function Me(xt,St,qt){return St in xt?Object.defineProperty(xt,St,{value:qt,enumerable:!0,configurable:!0,writable:!0}):xt[St]=qt,xt}function Be(xt,St){if(!(xt instanceof St))throw new TypeError("Cannot call a class as a function")}function Ve(xt,St){if(!xt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return St&&(typeof St=="object"||typeof St=="function")?St:xt}function Je(xt,St){if(typeof St!="function"&&St!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof St);xt.prototype=Object.create(St&&St.prototype,{constructor:{value:xt,enumerable:!1,writable:!0,configurable:!0}}),St&&(Object.setPrototypeOf?Object.setPrototypeOf(xt,St):xt.__proto__=St)}var Ye=(0,ye.default)("quill:clipboard"),kt="__ql-matcher",Qe=[[Node.TEXT_NODE,di],[Node.TEXT_NODE,Kt],["br",Lt],[Node.ELEMENT_NODE,Kt],[Node.ELEMENT_NODE,Ct],[Node.ELEMENT_NODE,ei],[Node.ELEMENT_NODE,ot],[Node.ELEMENT_NODE,mi],["li",jt],["b",nt.bind(nt,"bold")],["i",nt.bind(nt,"italic")],["style",Bt]],We=[_e.AlignAttribute,Ne.DirectionAttribute].reduce(function(xt,St){return xt[St.keyName]=St,xt},{}),Fe=[_e.AlignStyle,Ce.BackgroundStyle,Ie.ColorStyle,Ne.DirectionStyle,qe.FontStyle,Ae.SizeStyle].reduce(function(xt,St){return xt[St.keyName]=St,xt},{}),He=function(xt){Je(St,xt);function St(qt,Dt){Be(this,St);var Tt=Ve(this,(St.__proto__||Object.getPrototypeOf(St)).call(this,qt,Dt));return Tt.quill.root.addEventListener("paste",Tt.onPaste.bind(Tt)),Tt.container=Tt.quill.addContainer("ql-clipboard"),Tt.container.setAttribute("contenteditable",!0),Tt.container.setAttribute("tabindex",-1),Tt.matchers=[],Qe.concat(Tt.options.matchers).forEach(function(Gt){var Wt=oe(Gt,2),Yt=Wt[0],pi=Wt[1];!Dt.matchVisual&&pi===ei||Tt.addMatcher(Yt,pi)}),Tt}return de(St,[{key:"addMatcher",value:function(Dt,Tt){this.matchers.push([Dt,Tt])}},{key:"convert",value:function(Dt){if(typeof Dt=="string")return this.container.innerHTML=Dt.replace(/\>\r?\n +\</g,"><"),this.convert();var Tt=this.quill.getFormat(this.quill.selection.savedRange.index);if(Tt[Pe.default.blotName]){var Gt=this.container.innerText;return this.container.innerHTML="",new pe.default().insert(Gt,Me({},Pe.default.blotName,Tt[Pe.default.blotName]))}var Wt=this.prepareMatching(),Yt=oe(Wt,2),pi=Yt[0],yi=Yt[1],ai=Ze(this.container,pi,yi);return Ke(ai,`
|
|
6590
|
+
`)&&ai.ops[ai.ops.length-1].attributes==null&&(ai=ai.compose(new pe.default().retain(ai.length()-1).delete(1))),Ye.log("convert",this.container.innerHTML,ai),this.container.innerHTML="",ai}},{key:"dangerouslyPasteHTML",value:function(Dt,Tt){var Gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:me.default.sources.API;if(typeof Dt=="string")this.quill.setContents(this.convert(Dt),Tt),this.quill.setSelection(0,me.default.sources.SILENT);else{var Wt=this.convert(Tt);this.quill.updateContents(new pe.default().retain(Dt).concat(Wt),Gt),this.quill.setSelection(Dt+Wt.length(),me.default.sources.SILENT)}}},{key:"onPaste",value:function(Dt){var Tt=this;if(!(Dt.defaultPrevented||!this.quill.isEnabled())){var Gt=this.quill.getSelection(),Wt=new pe.default().retain(Gt.index),Yt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(me.default.sources.SILENT),setTimeout(function(){Wt=Wt.concat(Tt.convert()).delete(Gt.length),Tt.quill.updateContents(Wt,me.default.sources.USER),Tt.quill.setSelection(Wt.length()-Gt.length,me.default.sources.SILENT),Tt.quill.scrollingContainer.scrollTop=Yt,Tt.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Dt=this,Tt=[],Gt=[];return this.matchers.forEach(function(Wt){var Yt=oe(Wt,2),pi=Yt[0],yi=Yt[1];switch(pi){case Node.TEXT_NODE:Gt.push(yi);break;case Node.ELEMENT_NODE:Tt.push(yi);break;default:[].forEach.call(Dt.container.querySelectorAll(pi),function(ai){ai[kt]=ai[kt]||[],ai[kt].push(yi)});break}}),[Tt,Gt]}}]),St}(Se.default);He.DEFAULTS={matchers:[],matchVisual:!0};function Ge(xt,St,qt){return(typeof St>"u"?"undefined":ne(St))==="object"?Object.keys(St).reduce(function(Dt,Tt){return Ge(Dt,Tt,St[Tt])},xt):xt.reduce(function(Dt,Tt){return Tt.attributes&&Tt.attributes[St]?Dt.push(Tt):Dt.insert(Tt.insert,(0,ce.default)({},Me({},St,qt),Tt.attributes))},new pe.default)}function Xe(xt){if(xt.nodeType!==Node.ELEMENT_NODE)return{};var St="__ql-computed-style";return xt[St]||(xt[St]=window.getComputedStyle(xt))}function Ke(xt,St){for(var qt="",Dt=xt.ops.length-1;Dt>=0&&qt.length<St.length;--Dt){var Tt=xt.ops[Dt];if(typeof Tt.insert!="string")break;qt=Tt.insert+qt}return qt.slice(-1*St.length)===St}function je(xt){if(xt.childNodes.length===0)return!1;var St=Xe(xt);return["block","list-item"].indexOf(St.display)>-1}function Ze(xt,St,qt){return xt.nodeType===xt.TEXT_NODE?qt.reduce(function(Dt,Tt){return Tt(xt,Dt)},new pe.default):xt.nodeType===xt.ELEMENT_NODE?[].reduce.call(xt.childNodes||[],function(Dt,Tt){var Gt=Ze(Tt,St,qt);return Tt.nodeType===xt.ELEMENT_NODE&&(Gt=St.reduce(function(Wt,Yt){return Yt(Tt,Wt)},Gt),Gt=(Tt[kt]||[]).reduce(function(Wt,Yt){return Yt(Tt,Wt)},Gt)),Dt.concat(Gt)},new pe.default):new pe.default}function nt(xt,St,qt){return Ge(qt,xt,!0)}function ot(xt,St){var qt=ge.default.Attributor.Attribute.keys(xt),Dt=ge.default.Attributor.Class.keys(xt),Tt=ge.default.Attributor.Style.keys(xt),Gt={};return qt.concat(Dt).concat(Tt).forEach(function(Wt){var Yt=ge.default.query(Wt,ge.default.Scope.ATTRIBUTE);Yt!=null&&(Gt[Yt.attrName]=Yt.value(xt),Gt[Yt.attrName])||(Yt=We[Wt],Yt!=null&&(Yt.attrName===Wt||Yt.keyName===Wt)&&(Gt[Yt.attrName]=Yt.value(xt)||void 0),Yt=Fe[Wt],Yt!=null&&(Yt.attrName===Wt||Yt.keyName===Wt)&&(Yt=Fe[Wt],Gt[Yt.attrName]=Yt.value(xt)||void 0))}),Object.keys(Gt).length>0&&(St=Ge(St,Gt)),St}function Ct(xt,St){var qt=ge.default.query(xt);if(qt==null)return St;if(qt.prototype instanceof ge.default.Embed){var Dt={},Tt=qt.value(xt);Tt!=null&&(Dt[qt.blotName]=Tt,St=new pe.default().insert(Dt,qt.formats(xt)))}else typeof qt.formats=="function"&&(St=Ge(St,qt.blotName,qt.formats(xt)));return St}function Lt(xt,St){return Ke(St,`
|
|
6553
6591
|
`)||St.insert(`
|
|
6554
6592
|
`),St}function Bt(){return new pe.default}function jt(xt,St){var qt=ge.default.query(xt);if(qt==null||qt.blotName!=="list-item"||!Ke(St,`
|
|
6555
6593
|
`))return St;for(var Dt=-1,Tt=xt.parentNode;!Tt.classList.contains("ql-clipboard");)(ge.default.query(Tt)||{}).blotName==="list"&&(Dt+=1),Tt=Tt.parentNode;return Dt<=0?St:St.compose(new pe.default().retain(St.length()-1).retain(1,{indent:Dt}))}function Kt(xt,St){return Ke(St,`
|
|
@@ -6557,25 +6595,23 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
6557
6595
|
`),St}function ei(xt,St){if(je(xt)&&xt.nextElementSibling!=null&&!Ke(St,`
|
|
6558
6596
|
|
|
6559
6597
|
`)){var qt=xt.offsetHeight+parseFloat(Xe(xt).marginTop)+parseFloat(Xe(xt).marginBottom);xt.nextElementSibling.offsetTop>xt.offsetTop+qt*1.5&&St.insert(`
|
|
6560
|
-
`)}return St}function mi(xt,St){var qt={},Dt=xt.style||{};return Dt.fontStyle&&Xe(xt).fontStyle==="italic"&&(qt.italic=!0),Dt.fontWeight&&(Xe(xt).fontWeight.startsWith("bold")||parseInt(Xe(xt).fontWeight)>=700)&&(qt.bold=!0),Object.keys(qt).length>0&&(St=Ge(St,qt)),parseFloat(Dt.textIndent||0)>0&&(St=new pe.default().insert(" ").concat(St)),St}function di(xt,St){var qt=xt.data;if(xt.parentNode.tagName==="O:P")return St.insert(qt.trim());if(qt.trim().length===0&&xt.parentNode.classList.contains("ql-clipboard"))return St;if(!Xe(xt.parentNode).whiteSpace.startsWith("pre")){var Dt=function(Gt,Wt){return Wt=Wt.replace(/[^\u00a0]/g,""),Wt.length<1&&Gt?" ":Wt};qt=qt.replace(/\r\n/g," ").replace(/\n/g," "),qt=qt.replace(/\s\s+/g,Dt.bind(Dt,!0)),(xt.previousSibling==null&&je(xt.parentNode)||xt.previousSibling!=null&&je(xt.previousSibling))&&(qt=qt.replace(/^\s+/,Dt.bind(Dt,!1))),(xt.nextSibling==null&&je(xt.parentNode)||xt.nextSibling!=null&&je(xt.nextSibling))&&(qt=qt.replace(/\s+$/,Dt.bind(Dt,!1)))}return St.insert(qt)}te.default=He,te.matchAttributor=ot,te.matchBlot=Ct,te.matchNewline=Kt,te.matchSpacing=ei,te.matchText=di},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(6),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return ne(me,[{key:"optimize",value:function(ye){oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"optimize",this).call(this,ye),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return oe(me.__proto__||Object.getPrototypeOf(me),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),me}(ue.default);ge.blotName="bold",ge.tagName=["STRONG","B"],te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.addControls=te.default=void 0;var ne=function(){function De(Me,Be){var Ve=[],Je=!0,Ye=!1,kt=void 0;try{for(var Qe=Me[Symbol.iterator](),We;!(Je=(We=Qe.next()).done)&&(Ve.push(We.value),!(Be&&Ve.length===Be));Je=!0);}catch(Ne){Ye=!0,kt=Ne}finally{try{!Je&&Qe.return&&Qe.return()}finally{if(Ye)throw kt}}return Ve}return function(Me,Be){if(Array.isArray(Me))return Me;if(Symbol.iterator in Object(Me))return De(Me,Be);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function De(Me,Be){for(var Ve=0;Ve<Be.length;Ve++){var Je=Be[Ve];Je.enumerable=Je.enumerable||!1,Je.configurable=!0,"value"in Je&&(Je.writable=!0),Object.defineProperty(Me,Je.key,Je)}}return function(Me,Be,Ve){return Be&&De(Me.prototype,Be),Ve&&De(Me,Ve),Me}}(),de=re(2),ue=ye(de),ce=re(0),he=ye(ce),pe=re(5),fe=ye(pe),ge=re(10),be=ye(ge),me=re(9),ve=ye(me);function ye(De){return De&&De.__esModule?De:{default:De}}function we(De,Me,Be){return Me in De?Object.defineProperty(De,Me,{value:Be,enumerable:!0,configurable:!0,writable:!0}):De[Me]=Be,De}function Se(De,Me){if(!(De instanceof Me))throw new TypeError("Cannot call a class as a function")}function _e(De,Me){if(!De)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Me&&(typeof Me=="object"||typeof Me=="function")?Me:De}function Ce(De,Me){if(typeof Me!="function"&&Me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Me);De.prototype=Object.create(Me&&Me.prototype,{constructor:{value:De,enumerable:!1,writable:!0,configurable:!0}}),Me&&(Object.setPrototypeOf?Object.setPrototypeOf(De,Me):De.__proto__=Me)}var Le="getRootNode"in document,Pe=(0,be.default)("quill:toolbar"),Ie=function(De){Ce(Me,De);function Me(Be,Ve){Se(this,Me);var Je=_e(this,(Me.__proto__||Object.getPrototypeOf(Me)).call(this,Be,Ve));if(Array.isArray(Je.options.container)){var Ye=document.createElement("div");qe(Ye,Je.options.container),Be.container.parentNode.insertBefore(Ye,Be.container),Je.container=Ye}else if(typeof Je.options.container=="string"){var kt=Le?Be.container.getRootNode():document;Je.container=kt.querySelector(Je.options.container)}else Je.container=Je.options.container;if(!(Je.container instanceof HTMLElement)){var Qe;return Qe=Pe.error("Container required for toolbar",Je.options),_e(Je,Qe)}return Je.container.classList.add("ql-toolbar"),Je.controls=[],Je.handlers={},Object.keys(Je.options.handlers).forEach(function(We){Je.addHandler(We,Je.options.handlers[We])}),[].forEach.call(Je.container.querySelectorAll("button, select"),function(We){Je.attach(We)}),Je.quill.on(fe.default.events.EDITOR_CHANGE,function(We,Ne){We===fe.default.events.SELECTION_CHANGE&&Je.update(Ne)}),Je.quill.on(fe.default.events.SCROLL_OPTIMIZE,function(){var We=Je.quill.selection.getRange(),Ne=ne(We,1),He=Ne[0];Je.update(He)}),Je}return oe(Me,[{key:"addHandler",value:function(Ve,Je){this.handlers[Ve]=Je}},{key:"attach",value:function(Ve){var Je=this,Ye=[].find.call(Ve.classList,function(Qe){return Qe.indexOf("ql-")===0});if(Ye){if(Ye=Ye.slice(3),Ve.tagName==="BUTTON"&&Ve.setAttribute("type","button"),this.handlers[Ye]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Ye]==null){Pe.warn("ignoring attaching to disabled format",Ye,Ve);return}if(he.default.query(Ye)==null){Pe.warn("ignoring attaching to nonexistent format",Ye,Ve);return}}var kt=Ve.tagName==="SELECT"?"change":"click";Ve.addEventListener(kt,function(Qe){var We=void 0;if(Ve.tagName==="SELECT"){if(Ve.selectedIndex<0)return;var Ne=Ve.options[Ve.selectedIndex];Ne.hasAttribute("selected")?We=!1:We=Ne.value||!1}else Ve.classList.contains("ql-active")?We=!1:We=Ve.value||!Ve.hasAttribute("value"),Qe.preventDefault();Je.quill.focus();var He=Je.quill.selection.getRange(),Ge=ne(He,1),Xe=Ge[0];if(Je.handlers[Ye]!=null)Je.handlers[Ye].call(Je,We);else if(he.default.query(Ye).prototype instanceof he.default.Embed){if(We=prompt("Enter "+Ye),!We)return;Je.quill.updateContents(new ue.default().retain(Xe.index).delete(Xe.length).insert(we({},Ye,We)),fe.default.sources.USER)}else Je.quill.format(Ye,We,fe.default.sources.USER);Je.update(Xe)}),this.controls.push([Ye,Ve])}}},{key:"update",value:function(Ve){var Je=Ve==null?{}:this.quill.getFormat(Ve);this.controls.forEach(function(Ye){var kt=ne(Ye,2),Qe=kt[0],We=kt[1];if(We.tagName==="SELECT"){var Ne=void 0;if(Ve==null)Ne=null;else if(Je[Qe]==null)Ne=We.querySelector("option[selected]");else if(!Array.isArray(Je[Qe])){var He=Je[Qe];typeof He=="string"&&(He=He.replace(/\"/g,'\\"')),Ne=We.querySelector('option[value="'+He+'"]')}Ne==null?(We.value="",We.selectedIndex=-1):Ne.selected=!0}else if(Ve==null)We.classList.remove("ql-active");else if(We.hasAttribute("value")){var Ge=Je[Qe]===We.getAttribute("value")||Je[Qe]!=null&&Je[Qe].toString()===We.getAttribute("value")||Je[Qe]==null&&!We.getAttribute("value");We.classList.toggle("ql-active",Ge)}else We.classList.toggle("ql-active",Je[Qe]!=null)})}}]),Me}(ve.default);Ie.DEFAULTS={};function Fe(De,Me,Be){var Ve=document.createElement("button");Ve.setAttribute("type","button"),Ve.classList.add("ql-"+Me),Be!=null&&(Ve.value=Be),De.appendChild(Ve)}function qe(De,Me){Array.isArray(Me[0])||(Me=[Me]),Me.forEach(function(Be){var Ve=document.createElement("span");Ve.classList.add("ql-formats"),Be.forEach(function(Je){if(typeof Je=="string")Fe(Ve,Je);else{var Ye=Object.keys(Je)[0],kt=Je[Ye];Array.isArray(kt)?Ae(Ve,Ye,kt):Fe(Ve,Ye,kt)}}),De.appendChild(Ve)})}function Ae(De,Me,Be){var Ve=document.createElement("select");Ve.classList.add("ql-"+Me),Be.forEach(function(Je){var Ye=document.createElement("option");Je!==!1?Ye.setAttribute("value",Je):Ye.setAttribute("selected","selected"),Ve.appendChild(Ye)}),De.appendChild(Ve)}Ie.DEFAULTS={container:null,handlers:{clean:function(){var Me=this,Be=this.quill.getSelection();if(Be!=null)if(Be.length==0){var Ve=this.quill.getFormat();Object.keys(Ve).forEach(function(Je){he.default.query(Je,he.default.Scope.INLINE)!=null&&Me.quill.format(Je,!1)})}else this.quill.removeFormat(Be,fe.default.sources.USER)},direction:function(Me){var Be=this.quill.getFormat().align;Me==="rtl"&&Be==null?this.quill.format("align","right",fe.default.sources.USER):!Me&&Be==="right"&&this.quill.format("align",!1,fe.default.sources.USER),this.quill.format("direction",Me,fe.default.sources.USER)},indent:function(Me){var Be=this.quill.getSelection(),Ve=this.quill.getFormat(Be),Je=parseInt(Ve.indent||0);if(Me==="+1"||Me==="-1"){var Ye=Me==="+1"?1:-1;Ve.direction==="rtl"&&(Ye*=-1),this.quill.format("indent",Je+Ye,fe.default.sources.USER)}},link:function(Me){Me===!0&&(Me=prompt("Enter link URL:")),this.quill.format("link",Me,fe.default.sources.USER)},list:function(Me){var Be=this.quill.getSelection(),Ve=this.quill.getFormat(Be);Me==="check"?Ve.list==="checked"||Ve.list==="unchecked"?this.quill.format("list",!1,fe.default.sources.USER):this.quill.format("list","unchecked",fe.default.sources.USER):this.quill.format("list",Me,fe.default.sources.USER)}}},te.default=Ie,te.addControls=qe},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(28),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(ve,ye){he(this,me);var we=pe(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,ve));return we.label.innerHTML=ye,we.container.classList.add("ql-color-picker"),[].slice.call(we.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(Se){Se.classList.add("ql-primary")}),we}return ne(me,[{key:"buildItem",value:function(ye){var we=oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"buildItem",this).call(this,ye);return we.style.backgroundColor=ye.getAttribute("value")||"",we}},{key:"selectItem",value:function(ye,we){oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"selectItem",this).call(this,ye,we);var Se=this.label.querySelector(".ql-color-label"),_e=ye&&ye.getAttribute("data-value")||"";Se&&(Se.tagName==="line"?Se.style.stroke=_e:Se.style.fill=_e)}}]),me}(ue.default);te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(28),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(ve,ye){he(this,me);var we=pe(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,ve));return we.container.classList.add("ql-icon-picker"),[].forEach.call(we.container.querySelectorAll(".ql-picker-item"),function(Se){Se.innerHTML=ye[Se.getAttribute("data-value")||""]}),we.defaultItem=we.container.querySelector(".ql-selected"),we.selectItem(we.defaultItem),we}return ne(me,[{key:"selectItem",value:function(ye,we){oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"selectItem",this).call(this,ye,we),ye=ye||this.defaultItem,this.label.innerHTML=ye.innerHTML}}]),me}(ue.default);te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ue(ce,he){for(var pe=0;pe<he.length;pe++){var fe=he[pe];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(ce,fe.key,fe)}}return function(ce,he,pe){return he&&ue(ce.prototype,he),pe&&ue(ce,pe),ce}}();function oe(ue,ce){if(!(ue instanceof ce))throw new TypeError("Cannot call a class as a function")}var de=function(){function ue(ce,he){var pe=this;oe(this,ue),this.quill=ce,this.boundsContainer=he||document.body,this.root=ce.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){pe.root.style.marginTop=-1*pe.quill.root.scrollTop+"px"}),this.hide()}return ne(ue,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(he){var pe=he.left+he.width/2-this.root.offsetWidth/2,fe=he.bottom+this.quill.root.scrollTop;this.root.style.left=pe+"px",this.root.style.top=fe+"px",this.root.classList.remove("ql-flip");var ge=this.boundsContainer.getBoundingClientRect(),be=this.root.getBoundingClientRect(),me=0;if(be.right>ge.right&&(me=ge.right-be.right,this.root.style.left=pe+me+"px"),be.left<ge.left&&(me=ge.left-be.left,this.root.style.left=pe+me+"px"),be.bottom>ge.bottom){var ve=be.bottom-be.top,ye=he.bottom-he.top+ve;this.root.style.top=fe-ye+"px",this.root.classList.add("ql-flip")}return me}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),ue}();te.default=de},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function qe(Ae,De){var Me=[],Be=!0,Ve=!1,Je=void 0;try{for(var Ye=Ae[Symbol.iterator](),kt;!(Be=(kt=Ye.next()).done)&&(Me.push(kt.value),!(De&&Me.length===De));Be=!0);}catch(Qe){Ve=!0,Je=Qe}finally{try{!Be&&Ye.return&&Ye.return()}finally{if(Ve)throw Je}}return Me}return function(Ae,De){if(Array.isArray(Ae))return Ae;if(Symbol.iterator in Object(Ae))return qe(Ae,De);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function qe(Ae,De,Me){Ae===null&&(Ae=Function.prototype);var Be=Object.getOwnPropertyDescriptor(Ae,De);if(Be===void 0){var Ve=Object.getPrototypeOf(Ae);return Ve===null?void 0:qe(Ve,De,Me)}else{if("value"in Be)return Be.value;var Je=Be.get;return Je===void 0?void 0:Je.call(Me)}},de=function(){function qe(Ae,De){for(var Me=0;Me<De.length;Me++){var Be=De[Me];Be.enumerable=Be.enumerable||!1,Be.configurable=!0,"value"in Be&&(Be.writable=!0),Object.defineProperty(Ae,Be.key,Be)}}return function(Ae,De,Me){return De&&qe(Ae.prototype,De),Me&&qe(Ae,Me),Ae}}(),ue=re(3),ce=Se(ue),he=re(8),pe=Se(he),fe=re(44),ge=Se(fe),be=re(27),me=Se(be),ve=re(15),ye=re(42),we=Se(ye);function Se(qe){return qe&&qe.__esModule?qe:{default:qe}}function _e(qe,Ae){if(!(qe instanceof Ae))throw new TypeError("Cannot call a class as a function")}function Ce(qe,Ae){if(!qe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ae&&(typeof Ae=="object"||typeof Ae=="function")?Ae:qe}function Le(qe,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ae);qe.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:qe,enumerable:!1,writable:!0,configurable:!0}}),Ae&&(Object.setPrototypeOf?Object.setPrototypeOf(qe,Ae):qe.__proto__=Ae)}var Pe=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],Ie=function(qe){Le(Ae,qe);function Ae(De,Me){_e(this,Ae),Me.modules.toolbar!=null&&Me.modules.toolbar.container==null&&(Me.modules.toolbar.container=Pe);var Be=Ce(this,(Ae.__proto__||Object.getPrototypeOf(Ae)).call(this,De,Me));return Be.quill.container.classList.add("ql-snow"),Be}return de(Ae,[{key:"extendToolbar",value:function(Me){Me.container.classList.add("ql-snow"),this.buildButtons([].slice.call(Me.container.querySelectorAll("button")),we.default),this.buildPickers([].slice.call(Me.container.querySelectorAll("select")),we.default),this.tooltip=new Fe(this.quill,this.options.bounds),Me.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(Be,Ve){Me.handlers.link.call(Me,!Ve.format.link)})}}]),Ae}(ge.default);Ie.DEFAULTS=(0,ce.default)(!0,{},ge.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(Ae){if(Ae){var De=this.quill.getSelection();if(De==null||De.length==0)return;var Me=this.quill.getText(De);/^\S+@\S+\.\S+$/.test(Me)&&Me.indexOf("mailto:")!==0&&(Me="mailto:"+Me);var Be=this.quill.theme.tooltip;Be.edit("link",Me)}else this.quill.format("link",!1)}}}}});var Fe=function(qe){Le(Ae,qe);function Ae(De,Me){_e(this,Ae);var Be=Ce(this,(Ae.__proto__||Object.getPrototypeOf(Ae)).call(this,De,Me));return Be.preview=Be.root.querySelector("a.ql-preview"),Be}return de(Ae,[{key:"listen",value:function(){var Me=this;oe(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(Be){Me.root.classList.contains("ql-editing")?Me.save():Me.edit("link",Me.preview.textContent),Be.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(Be){if(Me.linkRange!=null){var Ve=Me.linkRange;Me.restoreFocus(),Me.quill.formatText(Ve,"link",!1,pe.default.sources.USER),delete Me.linkRange}Be.preventDefault(),Me.hide()}),this.quill.on(pe.default.events.SELECTION_CHANGE,function(Be,Ve,Je){if(Be!=null){if(Be.length===0&&Je===pe.default.sources.USER){var Ye=Me.quill.scroll.descendant(me.default,Be.index),kt=ne(Ye,2),Qe=kt[0],We=kt[1];if(Qe!=null){Me.linkRange=new ve.Range(Be.index-We,Qe.length());var Ne=me.default.formats(Qe.domNode);Me.preview.textContent=Ne,Me.preview.setAttribute("href",Ne),Me.show(),Me.position(Me.quill.getBounds(Me.linkRange));return}}else delete Me.linkRange;Me.hide()}})}},{key:"show",value:function(){oe(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),Ae}(fe.BaseTooltip);Fe.TEMPLATE=['<a class="ql-preview" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),te.default=Ie},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(29),oe=Tt(ne),de=re(37),ue=re(39),ce=re(65),he=re(66),pe=Tt(he),fe=re(67),ge=Tt(fe),be=re(68),me=Tt(be),ve=re(38),ye=re(26),we=re(40),Se=re(41),_e=re(57),Ce=Tt(_e),Le=re(69),Pe=Tt(Le),Ie=re(27),Fe=Tt(Ie),qe=re(70),Ae=Tt(qe),De=re(71),Me=Tt(De),Be=re(72),Ve=Tt(Be),Je=re(73),Ye=Tt(Je),kt=re(74),Qe=Tt(kt),We=re(13),Ne=Tt(We),He=re(75),Ge=Tt(He),Xe=re(76),Ke=Tt(Xe),je=re(58),Ze=Tt(je),nt=re(42),ot=Tt(nt),Ct=re(28),Lt=Tt(Ct),Bt=re(60),jt=Tt(Bt),Kt=re(61),ei=Tt(Kt),mi=re(62),di=Tt(mi),xt=re(109),St=Tt(xt),qt=re(63),Dt=Tt(qt);function Tt(Gt){return Gt&&Gt.__esModule?Gt:{default:Gt}}oe.default.register({"attributors/attribute/direction":ue.DirectionAttribute,"attributors/class/align":de.AlignClass,"attributors/class/background":ve.BackgroundClass,"attributors/class/color":ye.ColorClass,"attributors/class/direction":ue.DirectionClass,"attributors/class/font":we.FontClass,"attributors/class/size":Se.SizeClass,"attributors/style/align":de.AlignStyle,"attributors/style/background":ve.BackgroundStyle,"attributors/style/color":ye.ColorStyle,"attributors/style/direction":ue.DirectionStyle,"attributors/style/font":we.FontStyle,"attributors/style/size":Se.SizeStyle},!0),oe.default.register({"formats/align":de.AlignClass,"formats/direction":ue.DirectionClass,"formats/indent":ce.IndentClass,"formats/background":ve.BackgroundStyle,"formats/color":ye.ColorStyle,"formats/font":we.FontClass,"formats/size":Se.SizeClass,"formats/blockquote":pe.default,"formats/code-block":Ne.default,"formats/header":ge.default,"formats/list":me.default,"formats/bold":Ce.default,"formats/code":We.Code,"formats/italic":Pe.default,"formats/link":Fe.default,"formats/script":Ae.default,"formats/strike":Me.default,"formats/underline":Ve.default,"formats/image":Ye.default,"formats/video":Qe.default,"formats/list/item":be.ListItem,"modules/formula":Ge.default,"modules/syntax":Ke.default,"modules/toolbar":Ze.default,"themes/bubble":St.default,"themes/snow":Dt.default,"ui/icons":ot.default,"ui/picker":Lt.default,"ui/icon-picker":ei.default,"ui/color-picker":jt.default,"ui/tooltip":di.default},!0),te.default=oe.default},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.IndentClass=void 0;var ne=function(){function me(ve,ye){for(var we=0;we<ye.length;we++){var Se=ye[we];Se.enumerable=Se.enumerable||!1,Se.configurable=!0,"value"in Se&&(Se.writable=!0),Object.defineProperty(ve,Se.key,Se)}}return function(ve,ye,we){return ye&&me(ve.prototype,ye),we&&me(ve,we),ve}}(),oe=function me(ve,ye,we){ve===null&&(ve=Function.prototype);var Se=Object.getOwnPropertyDescriptor(ve,ye);if(Se===void 0){var _e=Object.getPrototypeOf(ve);return _e===null?void 0:me(_e,ye,we)}else{if("value"in Se)return Se.value;var Ce=Se.get;return Ce===void 0?void 0:Ce.call(we)}},de=re(0),ue=ce(de);function ce(me){return me&&me.__esModule?me:{default:me}}function he(me,ve){if(!(me instanceof ve))throw new TypeError("Cannot call a class as a function")}function pe(me,ve){if(!me)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve&&(typeof ve=="object"||typeof ve=="function")?ve:me}function fe(me,ve){if(typeof ve!="function"&&ve!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ve);me.prototype=Object.create(ve&&ve.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}),ve&&(Object.setPrototypeOf?Object.setPrototypeOf(me,ve):me.__proto__=ve)}var ge=function(me){fe(ve,me);function ve(){return he(this,ve),pe(this,(ve.__proto__||Object.getPrototypeOf(ve)).apply(this,arguments))}return ne(ve,[{key:"add",value:function(we,Se){if(Se==="+1"||Se==="-1"){var _e=this.value(we)||0;Se=Se==="+1"?_e+1:_e-1}return Se===0?(this.remove(we),!0):oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"add",this).call(this,we,Se)}},{key:"canAdd",value:function(we,Se){return oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"canAdd",this).call(this,we,Se)||oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"canAdd",this).call(this,we,parseInt(Se))}},{key:"value",value:function(we){return parseInt(oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"value",this).call(this,we))||void 0}}]),ve}(ue.default.Attributor.Class),be=new ge("indent","ql-indent",{scope:ue.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});te.IndentClass=be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(4),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="blockquote",pe.tagName="blockquote",te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ge(be,me){for(var ve=0;ve<me.length;ve++){var ye=me[ve];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(be,ye.key,ye)}}return function(be,me,ve){return me&&ge(be.prototype,me),ve&&ge(be,ve),be}}(),oe=re(4),de=ue(oe);function ue(ge){return ge&&ge.__esModule?ge:{default:ge}}function ce(ge,be){if(!(ge instanceof be))throw new TypeError("Cannot call a class as a function")}function he(ge,be){if(!ge)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be&&(typeof be=="object"||typeof be=="function")?be:ge}function pe(ge,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof be);ge.prototype=Object.create(be&&be.prototype,{constructor:{value:ge,enumerable:!1,writable:!0,configurable:!0}}),be&&(Object.setPrototypeOf?Object.setPrototypeOf(ge,be):ge.__proto__=be)}var fe=function(ge){pe(be,ge);function be(){return ce(this,be),he(this,(be.__proto__||Object.getPrototypeOf(be)).apply(this,arguments))}return ne(be,null,[{key:"formats",value:function(ve){return this.tagName.indexOf(ve.tagName)+1}}]),be}(de.default);fe.blotName="header",fe.tagName=["H1","H2","H3","H4","H5","H6"],te.default=fe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.ListItem=void 0;var ne=function(){function _e(Ce,Le){for(var Pe=0;Pe<Le.length;Pe++){var Ie=Le[Pe];Ie.enumerable=Ie.enumerable||!1,Ie.configurable=!0,"value"in Ie&&(Ie.writable=!0),Object.defineProperty(Ce,Ie.key,Ie)}}return function(Ce,Le,Pe){return Le&&_e(Ce.prototype,Le),Pe&&_e(Ce,Pe),Ce}}(),oe=function _e(Ce,Le,Pe){Ce===null&&(Ce=Function.prototype);var Ie=Object.getOwnPropertyDescriptor(Ce,Le);if(Ie===void 0){var Fe=Object.getPrototypeOf(Ce);return Fe===null?void 0:_e(Fe,Le,Pe)}else{if("value"in Ie)return Ie.value;var qe=Ie.get;return qe===void 0?void 0:qe.call(Pe)}},de=re(0),ue=ge(de),ce=re(4),he=ge(ce),pe=re(25),fe=ge(pe);function ge(_e){return _e&&_e.__esModule?_e:{default:_e}}function be(_e,Ce,Le){return Ce in _e?Object.defineProperty(_e,Ce,{value:Le,enumerable:!0,configurable:!0,writable:!0}):_e[Ce]=Le,_e}function me(_e,Ce){if(!(_e instanceof Ce))throw new TypeError("Cannot call a class as a function")}function ve(_e,Ce){if(!_e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ce&&(typeof Ce=="object"||typeof Ce=="function")?Ce:_e}function ye(_e,Ce){if(typeof Ce!="function"&&Ce!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ce);_e.prototype=Object.create(Ce&&Ce.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),Ce&&(Object.setPrototypeOf?Object.setPrototypeOf(_e,Ce):_e.__proto__=Ce)}var we=function(_e){ye(Ce,_e);function Ce(){return me(this,Ce),ve(this,(Ce.__proto__||Object.getPrototypeOf(Ce)).apply(this,arguments))}return ne(Ce,[{key:"format",value:function(Pe,Ie){Pe===Se.blotName&&!Ie?this.replaceWith(ue.default.create(this.statics.scope)):oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"format",this).call(this,Pe,Ie)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(Pe,Ie){return this.parent.isolate(this.offset(this.parent),this.length()),Pe===this.parent.statics.blotName?(this.parent.replaceWith(Pe,Ie),this):(this.parent.unwrap(),oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"replaceWith",this).call(this,Pe,Ie))}}],[{key:"formats",value:function(Pe){return Pe.tagName===this.tagName?void 0:oe(Ce.__proto__||Object.getPrototypeOf(Ce),"formats",this).call(this,Pe)}}]),Ce}(he.default);we.blotName="list-item",we.tagName="LI";var Se=function(_e){ye(Ce,_e),ne(Ce,null,[{key:"create",value:function(Pe){var Ie=Pe==="ordered"?"OL":"UL",Fe=oe(Ce.__proto__||Object.getPrototypeOf(Ce),"create",this).call(this,Ie);return(Pe==="checked"||Pe==="unchecked")&&Fe.setAttribute("data-checked",Pe==="checked"),Fe}},{key:"formats",value:function(Pe){if(Pe.tagName==="OL")return"ordered";if(Pe.tagName==="UL")return Pe.hasAttribute("data-checked")?Pe.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function Ce(Le){me(this,Ce);var Pe=ve(this,(Ce.__proto__||Object.getPrototypeOf(Ce)).call(this,Le)),Ie=function(qe){if(qe.target.parentNode===Le){var Ae=Pe.statics.formats(Le),De=ue.default.find(qe.target);Ae==="checked"?De.format("list","unchecked"):Ae==="unchecked"&&De.format("list","checked")}};return Le.addEventListener("touchstart",Ie),Le.addEventListener("mousedown",Ie),Pe}return ne(Ce,[{key:"format",value:function(Pe,Ie){this.children.length>0&&this.children.tail.format(Pe,Ie)}},{key:"formats",value:function(){return be({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(Pe,Ie){if(Pe instanceof we)oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"insertBefore",this).call(this,Pe,Ie);else{var Fe=Ie==null?this.length():Ie.offset(this),qe=this.split(Fe);qe.parent.insertBefore(Pe,qe)}}},{key:"optimize",value:function(Pe){oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"optimize",this).call(this,Pe);var Ie=this.next;Ie!=null&&Ie.prev===this&&Ie.statics.blotName===this.statics.blotName&&Ie.domNode.tagName===this.domNode.tagName&&Ie.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(Ie.moveChildren(this),Ie.remove())}},{key:"replace",value:function(Pe){if(Pe.statics.blotName!==this.statics.blotName){var Ie=ue.default.create(this.statics.defaultChild);Pe.moveChildren(Ie),this.appendChild(Ie)}oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"replace",this).call(this,Pe)}}]),Ce}(fe.default);Se.blotName="list",Se.scope=ue.default.Scope.BLOCK_BLOT,Se.tagName=["OL","UL"],Se.defaultChild="list-item",Se.allowedChildren=[we],te.ListItem=we,te.default=Se},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(57),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="italic",pe.tagName=["EM","I"],te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(6),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return ne(me,null,[{key:"create",value:function(ye){return ye==="super"?document.createElement("sup"):ye==="sub"?document.createElement("sub"):oe(me.__proto__||Object.getPrototypeOf(me),"create",this).call(this,ye)}},{key:"formats",value:function(ye){if(ye.tagName==="SUB")return"sub";if(ye.tagName==="SUP")return"super"}}]),me}(ue.default);ge.blotName="script",ge.tagName=["SUB","SUP"],te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(6),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="strike",pe.tagName="S",te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(6),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="underline",pe.tagName="U",te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(0),ue=he(de),ce=re(27);function he(ve){return ve&&ve.__esModule?ve:{default:ve}}function pe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function fe(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function ge(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var be=["alt","height","width"],me=function(ve){ge(ye,ve);function ye(){return pe(this,ye),fe(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"format",value:function(Se,_e){be.indexOf(Se)>-1?_e?this.domNode.setAttribute(Se,_e):this.domNode.removeAttribute(Se):oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"format",this).call(this,Se,_e)}}],[{key:"create",value:function(Se){var _e=oe(ye.__proto__||Object.getPrototypeOf(ye),"create",this).call(this,Se);return typeof Se=="string"&&_e.setAttribute("src",this.sanitize(Se)),_e}},{key:"formats",value:function(Se){return be.reduce(function(_e,Ce){return Se.hasAttribute(Ce)&&(_e[Ce]=Se.getAttribute(Ce)),_e},{})}},{key:"match",value:function(Se){return/\.(jpe?g|gif|png)$/.test(Se)||/^data:image\/.+;base64/.test(Se)}},{key:"sanitize",value:function(Se){return(0,ce.sanitize)(Se,["http","https","data"])?Se:"//:0"}},{key:"value",value:function(Se){return Se.getAttribute("src")}}]),ye}(ue.default.Embed);me.blotName="image",me.tagName="IMG",te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(4),ue=re(27),ce=he(ue);function he(ve){return ve&&ve.__esModule?ve:{default:ve}}function pe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function fe(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function ge(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var be=["height","width"],me=function(ve){ge(ye,ve);function ye(){return pe(this,ye),fe(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"format",value:function(Se,_e){be.indexOf(Se)>-1?_e?this.domNode.setAttribute(Se,_e):this.domNode.removeAttribute(Se):oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"format",this).call(this,Se,_e)}}],[{key:"create",value:function(Se){var _e=oe(ye.__proto__||Object.getPrototypeOf(ye),"create",this).call(this,Se);return _e.setAttribute("frameborder","0"),_e.setAttribute("allowfullscreen",!0),_e.setAttribute("src",this.sanitize(Se)),_e}},{key:"formats",value:function(Se){return be.reduce(function(_e,Ce){return Se.hasAttribute(Ce)&&(_e[Ce]=Se.getAttribute(Ce)),_e},{})}},{key:"sanitize",value:function(Se){return ce.default.sanitize(Se)}},{key:"value",value:function(Se){return Se.getAttribute("src")}}]),ye}(de.BlockEmbed);me.blotName="video",me.className="ql-video",me.tagName="IFRAME",te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.FormulaBlot=void 0;var ne=function(){function Se(_e,Ce){for(var Le=0;Le<Ce.length;Le++){var Pe=Ce[Le];Pe.enumerable=Pe.enumerable||!1,Pe.configurable=!0,"value"in Pe&&(Pe.writable=!0),Object.defineProperty(_e,Pe.key,Pe)}}return function(_e,Ce,Le){return Ce&&Se(_e.prototype,Ce),Le&&Se(_e,Le),_e}}(),oe=function Se(_e,Ce,Le){_e===null&&(_e=Function.prototype);var Pe=Object.getOwnPropertyDescriptor(_e,Ce);if(Pe===void 0){var Ie=Object.getPrototypeOf(_e);return Ie===null?void 0:Se(Ie,Ce,Le)}else{if("value"in Pe)return Pe.value;var Fe=Pe.get;return Fe===void 0?void 0:Fe.call(Le)}},de=re(36),ue=ge(de),ce=re(5),he=ge(ce),pe=re(9),fe=ge(pe);function ge(Se){return Se&&Se.__esModule?Se:{default:Se}}function be(Se,_e){if(!(Se instanceof _e))throw new TypeError("Cannot call a class as a function")}function me(Se,_e){if(!Se)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e&&(typeof _e=="object"||typeof _e=="function")?_e:Se}function ve(Se,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _e);Se.prototype=Object.create(_e&&_e.prototype,{constructor:{value:Se,enumerable:!1,writable:!0,configurable:!0}}),_e&&(Object.setPrototypeOf?Object.setPrototypeOf(Se,_e):Se.__proto__=_e)}var ye=function(Se){ve(_e,Se);function _e(){return be(this,_e),me(this,(_e.__proto__||Object.getPrototypeOf(_e)).apply(this,arguments))}return ne(_e,null,[{key:"create",value:function(Le){var Pe=oe(_e.__proto__||Object.getPrototypeOf(_e),"create",this).call(this,Le);return typeof Le=="string"&&(window.katex.render(Le,Pe,{throwOnError:!1,errorColor:"#f00"}),Pe.setAttribute("data-value",Le)),Pe}},{key:"value",value:function(Le){return Le.getAttribute("data-value")}}]),_e}(ue.default);ye.blotName="formula",ye.className="ql-formula",ye.tagName="SPAN";var we=function(Se){ve(_e,Se),ne(_e,null,[{key:"register",value:function(){he.default.register(ye,!0)}}]);function _e(){be(this,_e);var Ce=me(this,(_e.__proto__||Object.getPrototypeOf(_e)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return Ce}return _e}(fe.default);te.FormulaBlot=ye,te.default=we},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.CodeToken=te.CodeBlock=void 0;var ne=function(){function Le(Pe,Ie){for(var Fe=0;Fe<Ie.length;Fe++){var qe=Ie[Fe];qe.enumerable=qe.enumerable||!1,qe.configurable=!0,"value"in qe&&(qe.writable=!0),Object.defineProperty(Pe,qe.key,qe)}}return function(Pe,Ie,Fe){return Ie&&Le(Pe.prototype,Ie),Fe&&Le(Pe,Fe),Pe}}(),oe=function Le(Pe,Ie,Fe){Pe===null&&(Pe=Function.prototype);var qe=Object.getOwnPropertyDescriptor(Pe,Ie);if(qe===void 0){var Ae=Object.getPrototypeOf(Pe);return Ae===null?void 0:Le(Ae,Ie,Fe)}else{if("value"in qe)return qe.value;var De=qe.get;return De===void 0?void 0:De.call(Fe)}},de=re(0),ue=me(de),ce=re(5),he=me(ce),pe=re(9),fe=me(pe),ge=re(13),be=me(ge);function me(Le){return Le&&Le.__esModule?Le:{default:Le}}function ve(Le,Pe){if(!(Le instanceof Pe))throw new TypeError("Cannot call a class as a function")}function ye(Le,Pe){if(!Le)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pe&&(typeof Pe=="object"||typeof Pe=="function")?Pe:Le}function we(Le,Pe){if(typeof Pe!="function"&&Pe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Pe);Le.prototype=Object.create(Pe&&Pe.prototype,{constructor:{value:Le,enumerable:!1,writable:!0,configurable:!0}}),Pe&&(Object.setPrototypeOf?Object.setPrototypeOf(Le,Pe):Le.__proto__=Pe)}var Se=function(Le){we(Pe,Le);function Pe(){return ve(this,Pe),ye(this,(Pe.__proto__||Object.getPrototypeOf(Pe)).apply(this,arguments))}return ne(Pe,[{key:"replaceWith",value:function(Fe){this.domNode.textContent=this.domNode.textContent,this.attach(),oe(Pe.prototype.__proto__||Object.getPrototypeOf(Pe.prototype),"replaceWith",this).call(this,Fe)}},{key:"highlight",value:function(Fe){var qe=this.domNode.textContent;this.cachedText!==qe&&((qe.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=Fe(qe),this.domNode.normalize(),this.attach()),this.cachedText=qe)}}]),Pe}(be.default);Se.className="ql-syntax";var _e=new ue.default.Attributor.Class("token","hljs",{scope:ue.default.Scope.INLINE}),Ce=function(Le){we(Pe,Le),ne(Pe,null,[{key:"register",value:function(){he.default.register(_e,!0),he.default.register(Se,!0)}}]);function Pe(Ie,Fe){ve(this,Pe);var qe=ye(this,(Pe.__proto__||Object.getPrototypeOf(Pe)).call(this,Ie,Fe));if(typeof qe.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var Ae=null;return qe.quill.on(he.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(Ae),Ae=setTimeout(function(){qe.highlight(),Ae=null},qe.options.interval)}),qe.highlight(),qe}return ne(Pe,[{key:"highlight",value:function(){var Fe=this;if(!this.quill.selection.composing){this.quill.update(he.default.sources.USER);var qe=this.quill.getSelection();this.quill.scroll.descendants(Se).forEach(function(Ae){Ae.highlight(Fe.options.highlight)}),this.quill.update(he.default.sources.SILENT),qe!=null&&this.quill.setSelection(qe,he.default.sources.SILENT)}}}]),Pe}(fe.default);Ce.DEFAULTS={highlight:function(){return window.hljs==null?null:function(Le){var Pe=window.hljs.highlightAuto(Le);return Pe.value}}(),interval:1e3},te.CodeBlock=Se,te.CodeToken=_e,te.default=Ce},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(J,te){J.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(J,te){J.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(J,te){J.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(J,te){J.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.BubbleTooltip=void 0;var ne=function Pe(Ie,Fe,qe){Ie===null&&(Ie=Function.prototype);var Ae=Object.getOwnPropertyDescriptor(Ie,Fe);if(Ae===void 0){var De=Object.getPrototypeOf(Ie);return De===null?void 0:Pe(De,Fe,qe)}else{if("value"in Ae)return Ae.value;var Me=Ae.get;return Me===void 0?void 0:Me.call(qe)}},oe=function(){function Pe(Ie,Fe){for(var qe=0;qe<Fe.length;qe++){var Ae=Fe[qe];Ae.enumerable=Ae.enumerable||!1,Ae.configurable=!0,"value"in Ae&&(Ae.writable=!0),Object.defineProperty(Ie,Ae.key,Ae)}}return function(Ie,Fe,qe){return Fe&&Pe(Ie.prototype,Fe),qe&&Pe(Ie,qe),Ie}}(),de=re(3),ue=ve(de),ce=re(8),he=ve(ce),pe=re(44),fe=ve(pe),ge=re(15),be=re(42),me=ve(be);function ve(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function ye(Pe,Ie){if(!(Pe instanceof Ie))throw new TypeError("Cannot call a class as a function")}function we(Pe,Ie){if(!Pe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ie&&(typeof Ie=="object"||typeof Ie=="function")?Ie:Pe}function Se(Pe,Ie){if(typeof Ie!="function"&&Ie!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ie);Pe.prototype=Object.create(Ie&&Ie.prototype,{constructor:{value:Pe,enumerable:!1,writable:!0,configurable:!0}}),Ie&&(Object.setPrototypeOf?Object.setPrototypeOf(Pe,Ie):Pe.__proto__=Ie)}var _e=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],Ce=function(Pe){Se(Ie,Pe);function Ie(Fe,qe){ye(this,Ie),qe.modules.toolbar!=null&&qe.modules.toolbar.container==null&&(qe.modules.toolbar.container=_e);var Ae=we(this,(Ie.__proto__||Object.getPrototypeOf(Ie)).call(this,Fe,qe));return Ae.quill.container.classList.add("ql-bubble"),Ae}return oe(Ie,[{key:"extendToolbar",value:function(qe){this.tooltip=new Le(this.quill,this.options.bounds),this.tooltip.root.appendChild(qe.container),this.buildButtons([].slice.call(qe.container.querySelectorAll("button")),me.default),this.buildPickers([].slice.call(qe.container.querySelectorAll("select")),me.default)}}]),Ie}(fe.default);Ce.DEFAULTS=(0,ue.default)(!0,{},fe.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(Ie){Ie?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var Le=function(Pe){Se(Ie,Pe);function Ie(Fe,qe){ye(this,Ie);var Ae=we(this,(Ie.__proto__||Object.getPrototypeOf(Ie)).call(this,Fe,qe));return Ae.quill.on(he.default.events.EDITOR_CHANGE,function(De,Me,Be,Ve){if(De===he.default.events.SELECTION_CHANGE)if(Me!=null&&Me.length>0&&Ve===he.default.sources.USER){Ae.show(),Ae.root.style.left="0px",Ae.root.style.width="",Ae.root.style.width=Ae.root.offsetWidth+"px";var Je=Ae.quill.getLines(Me.index,Me.length);if(Je.length===1)Ae.position(Ae.quill.getBounds(Me));else{var Ye=Je[Je.length-1],kt=Ae.quill.getIndex(Ye),Qe=Math.min(Ye.length()-1,Me.index+Me.length-kt),We=Ae.quill.getBounds(new ge.Range(kt,Qe));Ae.position(We)}}else document.activeElement!==Ae.textbox&&Ae.quill.hasFocus()&&Ae.hide()}),Ae}return oe(Ie,[{key:"listen",value:function(){var qe=this;ne(Ie.prototype.__proto__||Object.getPrototypeOf(Ie.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){qe.root.classList.remove("ql-editing")}),this.quill.on(he.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!qe.root.classList.contains("ql-hidden")){var Ae=qe.quill.getSelection();Ae!=null&&qe.position(qe.quill.getBounds(Ae))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(qe){var Ae=ne(Ie.prototype.__proto__||Object.getPrototypeOf(Ie.prototype),"position",this).call(this,qe),De=this.root.querySelector(".ql-tooltip-arrow");if(De.style.marginLeft="",Ae===0)return Ae;De.style.marginLeft=-1*Ae-De.offsetWidth/2+"px"}}]),Ie}(pe.BaseTooltip);Le.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),te.BubbleTooltip=Le,te.default=Ce},function(J,te,re){J.exports=re(64)}]).default})})(quill);var quillExports=quill.exports;const Quill=getDefaultExportFromCjs(quillExports),styles$1=':host{height:100%}.container{width:100%;height:100%;display:flex;flex-direction:column;flex:1}.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative;color:#000;overflow-y:auto}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word;font-size:1rem}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li{list-style-type:none}.ql-editor ul>li{list-style-type:disc}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1;counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-2{counter-increment:list-2;counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-3{counter-increment:list-3;counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-4{counter-increment:list-4;counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-5{counter-increment:list-5;counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-6{counter-increment:list-6;counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-7{counter-increment:list-7;counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-8{counter-increment:list-8;counter-reset:list-9}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px);background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none;line-height:26px}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Petita"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Gran"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Enorme"}button.ql-indent{display:none!important}.ql-undo{font-size:14pt;font-weight:900;display:flex!important;align-items:center}.ql-undo:after{content:"↺";transform:rotate(-135deg)}.ql-redo{font-size:14pt;font-weight:900;display:flex!important;align-items:center}.ql-redo:after{content:"↻";transform:rotate(135deg)}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border-bottom:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}',template=X=>ke$1`
|
|
6598
|
+
`)}return St}function mi(xt,St){var qt={},Dt=xt.style||{};return Dt.fontStyle&&Xe(xt).fontStyle==="italic"&&(qt.italic=!0),Dt.fontWeight&&(Xe(xt).fontWeight.startsWith("bold")||parseInt(Xe(xt).fontWeight)>=700)&&(qt.bold=!0),Object.keys(qt).length>0&&(St=Ge(St,qt)),parseFloat(Dt.textIndent||0)>0&&(St=new pe.default().insert(" ").concat(St)),St}function di(xt,St){var qt=xt.data;if(xt.parentNode.tagName==="O:P")return St.insert(qt.trim());if(qt.trim().length===0&&xt.parentNode.classList.contains("ql-clipboard"))return St;if(!Xe(xt.parentNode).whiteSpace.startsWith("pre")){var Dt=function(Gt,Wt){return Wt=Wt.replace(/[^\u00a0]/g,""),Wt.length<1&&Gt?" ":Wt};qt=qt.replace(/\r\n/g," ").replace(/\n/g," "),qt=qt.replace(/\s\s+/g,Dt.bind(Dt,!0)),(xt.previousSibling==null&&je(xt.parentNode)||xt.previousSibling!=null&&je(xt.previousSibling))&&(qt=qt.replace(/^\s+/,Dt.bind(Dt,!1))),(xt.nextSibling==null&&je(xt.parentNode)||xt.nextSibling!=null&&je(xt.nextSibling))&&(qt=qt.replace(/\s+$/,Dt.bind(Dt,!1)))}return St.insert(qt)}te.default=He,te.matchAttributor=ot,te.matchBlot=Ct,te.matchNewline=Kt,te.matchSpacing=ei,te.matchText=di},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(6),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return ne(me,[{key:"optimize",value:function(ye){oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"optimize",this).call(this,ye),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return oe(me.__proto__||Object.getPrototypeOf(me),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),me}(ue.default);ge.blotName="bold",ge.tagName=["STRONG","B"],te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.addControls=te.default=void 0;var ne=function(){function De(Me,Be){var Ve=[],Je=!0,Ye=!1,kt=void 0;try{for(var Qe=Me[Symbol.iterator](),We;!(Je=(We=Qe.next()).done)&&(Ve.push(We.value),!(Be&&Ve.length===Be));Je=!0);}catch(Fe){Ye=!0,kt=Fe}finally{try{!Je&&Qe.return&&Qe.return()}finally{if(Ye)throw kt}}return Ve}return function(Me,Be){if(Array.isArray(Me))return Me;if(Symbol.iterator in Object(Me))return De(Me,Be);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function De(Me,Be){for(var Ve=0;Ve<Be.length;Ve++){var Je=Be[Ve];Je.enumerable=Je.enumerable||!1,Je.configurable=!0,"value"in Je&&(Je.writable=!0),Object.defineProperty(Me,Je.key,Je)}}return function(Me,Be,Ve){return Be&&De(Me.prototype,Be),Ve&&De(Me,Ve),Me}}(),de=re(2),ue=ye(de),ce=re(0),he=ye(ce),pe=re(5),fe=ye(pe),ge=re(10),be=ye(ge),me=re(9),ve=ye(me);function ye(De){return De&&De.__esModule?De:{default:De}}function we(De,Me,Be){return Me in De?Object.defineProperty(De,Me,{value:Be,enumerable:!0,configurable:!0,writable:!0}):De[Me]=Be,De}function Se(De,Me){if(!(De instanceof Me))throw new TypeError("Cannot call a class as a function")}function _e(De,Me){if(!De)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Me&&(typeof Me=="object"||typeof Me=="function")?Me:De}function Ce(De,Me){if(typeof Me!="function"&&Me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Me);De.prototype=Object.create(Me&&Me.prototype,{constructor:{value:De,enumerable:!1,writable:!0,configurable:!0}}),Me&&(Object.setPrototypeOf?Object.setPrototypeOf(De,Me):De.__proto__=Me)}var Le="getRootNode"in document,Pe=(0,be.default)("quill:toolbar"),Ie=function(De){Ce(Me,De);function Me(Be,Ve){Se(this,Me);var Je=_e(this,(Me.__proto__||Object.getPrototypeOf(Me)).call(this,Be,Ve));if(Array.isArray(Je.options.container)){var Ye=document.createElement("div");qe(Ye,Je.options.container),Be.container.parentNode.insertBefore(Ye,Be.container),Je.container=Ye}else if(typeof Je.options.container=="string"){var kt=Le?Be.container.getRootNode():document;Je.container=kt.querySelector(Je.options.container)}else Je.container=Je.options.container;if(!(Je.container instanceof HTMLElement)){var Qe;return Qe=Pe.error("Container required for toolbar",Je.options),_e(Je,Qe)}return Je.container.classList.add("ql-toolbar"),Je.controls=[],Je.handlers={},Object.keys(Je.options.handlers).forEach(function(We){Je.addHandler(We,Je.options.handlers[We])}),[].forEach.call(Je.container.querySelectorAll("button, select"),function(We){Je.attach(We)}),Je.quill.on(fe.default.events.EDITOR_CHANGE,function(We,Fe){We===fe.default.events.SELECTION_CHANGE&&Je.update(Fe)}),Je.quill.on(fe.default.events.SCROLL_OPTIMIZE,function(){var We=Je.quill.selection.getRange(),Fe=ne(We,1),He=Fe[0];Je.update(He)}),Je}return oe(Me,[{key:"addHandler",value:function(Ve,Je){this.handlers[Ve]=Je}},{key:"attach",value:function(Ve){var Je=this,Ye=[].find.call(Ve.classList,function(Qe){return Qe.indexOf("ql-")===0});if(Ye){if(Ye=Ye.slice(3),Ve.tagName==="BUTTON"&&Ve.setAttribute("type","button"),this.handlers[Ye]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Ye]==null){Pe.warn("ignoring attaching to disabled format",Ye,Ve);return}if(he.default.query(Ye)==null){Pe.warn("ignoring attaching to nonexistent format",Ye,Ve);return}}var kt=Ve.tagName==="SELECT"?"change":"click";Ve.addEventListener(kt,function(Qe){var We=void 0;if(Ve.tagName==="SELECT"){if(Ve.selectedIndex<0)return;var Fe=Ve.options[Ve.selectedIndex];Fe.hasAttribute("selected")?We=!1:We=Fe.value||!1}else Ve.classList.contains("ql-active")?We=!1:We=Ve.value||!Ve.hasAttribute("value"),Qe.preventDefault();Je.quill.focus();var He=Je.quill.selection.getRange(),Ge=ne(He,1),Xe=Ge[0];if(Je.handlers[Ye]!=null)Je.handlers[Ye].call(Je,We);else if(he.default.query(Ye).prototype instanceof he.default.Embed){if(We=prompt("Enter "+Ye),!We)return;Je.quill.updateContents(new ue.default().retain(Xe.index).delete(Xe.length).insert(we({},Ye,We)),fe.default.sources.USER)}else Je.quill.format(Ye,We,fe.default.sources.USER);Je.update(Xe)}),this.controls.push([Ye,Ve])}}},{key:"update",value:function(Ve){var Je=Ve==null?{}:this.quill.getFormat(Ve);this.controls.forEach(function(Ye){var kt=ne(Ye,2),Qe=kt[0],We=kt[1];if(We.tagName==="SELECT"){var Fe=void 0;if(Ve==null)Fe=null;else if(Je[Qe]==null)Fe=We.querySelector("option[selected]");else if(!Array.isArray(Je[Qe])){var He=Je[Qe];typeof He=="string"&&(He=He.replace(/\"/g,'\\"')),Fe=We.querySelector('option[value="'+He+'"]')}Fe==null?(We.value="",We.selectedIndex=-1):Fe.selected=!0}else if(Ve==null)We.classList.remove("ql-active");else if(We.hasAttribute("value")){var Ge=Je[Qe]===We.getAttribute("value")||Je[Qe]!=null&&Je[Qe].toString()===We.getAttribute("value")||Je[Qe]==null&&!We.getAttribute("value");We.classList.toggle("ql-active",Ge)}else We.classList.toggle("ql-active",Je[Qe]!=null)})}}]),Me}(ve.default);Ie.DEFAULTS={};function Ne(De,Me,Be){var Ve=document.createElement("button");Ve.setAttribute("type","button"),Ve.classList.add("ql-"+Me),Be!=null&&(Ve.value=Be),De.appendChild(Ve)}function qe(De,Me){Array.isArray(Me[0])||(Me=[Me]),Me.forEach(function(Be){var Ve=document.createElement("span");Ve.classList.add("ql-formats"),Be.forEach(function(Je){if(typeof Je=="string")Ne(Ve,Je);else{var Ye=Object.keys(Je)[0],kt=Je[Ye];Array.isArray(kt)?Ae(Ve,Ye,kt):Ne(Ve,Ye,kt)}}),De.appendChild(Ve)})}function Ae(De,Me,Be){var Ve=document.createElement("select");Ve.classList.add("ql-"+Me),Be.forEach(function(Je){var Ye=document.createElement("option");Je!==!1?Ye.setAttribute("value",Je):Ye.setAttribute("selected","selected"),Ve.appendChild(Ye)}),De.appendChild(Ve)}Ie.DEFAULTS={container:null,handlers:{clean:function(){var Me=this,Be=this.quill.getSelection();if(Be!=null)if(Be.length==0){var Ve=this.quill.getFormat();Object.keys(Ve).forEach(function(Je){he.default.query(Je,he.default.Scope.INLINE)!=null&&Me.quill.format(Je,!1)})}else this.quill.removeFormat(Be,fe.default.sources.USER)},direction:function(Me){var Be=this.quill.getFormat().align;Me==="rtl"&&Be==null?this.quill.format("align","right",fe.default.sources.USER):!Me&&Be==="right"&&this.quill.format("align",!1,fe.default.sources.USER),this.quill.format("direction",Me,fe.default.sources.USER)},indent:function(Me){var Be=this.quill.getSelection(),Ve=this.quill.getFormat(Be),Je=parseInt(Ve.indent||0);if(Me==="+1"||Me==="-1"){var Ye=Me==="+1"?1:-1;Ve.direction==="rtl"&&(Ye*=-1),this.quill.format("indent",Je+Ye,fe.default.sources.USER)}},link:function(Me){Me===!0&&(Me=prompt("Enter link URL:")),this.quill.format("link",Me,fe.default.sources.USER)},list:function(Me){var Be=this.quill.getSelection(),Ve=this.quill.getFormat(Be);Me==="check"?Ve.list==="checked"||Ve.list==="unchecked"?this.quill.format("list",!1,fe.default.sources.USER):this.quill.format("list","unchecked",fe.default.sources.USER):this.quill.format("list",Me,fe.default.sources.USER)}}},te.default=Ie,te.addControls=qe},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(28),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(ve,ye){he(this,me);var we=pe(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,ve));return we.label.innerHTML=ye,we.container.classList.add("ql-color-picker"),[].slice.call(we.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(Se){Se.classList.add("ql-primary")}),we}return ne(me,[{key:"buildItem",value:function(ye){var we=oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"buildItem",this).call(this,ye);return we.style.backgroundColor=ye.getAttribute("value")||"",we}},{key:"selectItem",value:function(ye,we){oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"selectItem",this).call(this,ye,we);var Se=this.label.querySelector(".ql-color-label"),_e=ye&&ye.getAttribute("data-value")||"";Se&&(Se.tagName==="line"?Se.style.stroke=_e:Se.style.fill=_e)}}]),me}(ue.default);te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(28),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(ve,ye){he(this,me);var we=pe(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,ve));return we.container.classList.add("ql-icon-picker"),[].forEach.call(we.container.querySelectorAll(".ql-picker-item"),function(Se){Se.innerHTML=ye[Se.getAttribute("data-value")||""]}),we.defaultItem=we.container.querySelector(".ql-selected"),we.selectItem(we.defaultItem),we}return ne(me,[{key:"selectItem",value:function(ye,we){oe(me.prototype.__proto__||Object.getPrototypeOf(me.prototype),"selectItem",this).call(this,ye,we),ye=ye||this.defaultItem,this.label.innerHTML=ye.innerHTML}}]),me}(ue.default);te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ue(ce,he){for(var pe=0;pe<he.length;pe++){var fe=he[pe];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(ce,fe.key,fe)}}return function(ce,he,pe){return he&&ue(ce.prototype,he),pe&&ue(ce,pe),ce}}();function oe(ue,ce){if(!(ue instanceof ce))throw new TypeError("Cannot call a class as a function")}var de=function(){function ue(ce,he){var pe=this;oe(this,ue),this.quill=ce,this.boundsContainer=he||document.body,this.root=ce.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){pe.root.style.marginTop=-1*pe.quill.root.scrollTop+"px"}),this.hide()}return ne(ue,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(he){var pe=he.left+he.width/2-this.root.offsetWidth/2,fe=he.bottom+this.quill.root.scrollTop;this.root.style.left=pe+"px",this.root.style.top=fe+"px",this.root.classList.remove("ql-flip");var ge=this.boundsContainer.getBoundingClientRect(),be=this.root.getBoundingClientRect(),me=0;if(be.right>ge.right&&(me=ge.right-be.right,this.root.style.left=pe+me+"px"),be.left<ge.left&&(me=ge.left-be.left,this.root.style.left=pe+me+"px"),be.bottom>ge.bottom){var ve=be.bottom-be.top,ye=he.bottom-he.top+ve;this.root.style.top=fe-ye+"px",this.root.classList.add("ql-flip")}return me}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),ue}();te.default=de},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function qe(Ae,De){var Me=[],Be=!0,Ve=!1,Je=void 0;try{for(var Ye=Ae[Symbol.iterator](),kt;!(Be=(kt=Ye.next()).done)&&(Me.push(kt.value),!(De&&Me.length===De));Be=!0);}catch(Qe){Ve=!0,Je=Qe}finally{try{!Be&&Ye.return&&Ye.return()}finally{if(Ve)throw Je}}return Me}return function(Ae,De){if(Array.isArray(Ae))return Ae;if(Symbol.iterator in Object(Ae))return qe(Ae,De);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function qe(Ae,De,Me){Ae===null&&(Ae=Function.prototype);var Be=Object.getOwnPropertyDescriptor(Ae,De);if(Be===void 0){var Ve=Object.getPrototypeOf(Ae);return Ve===null?void 0:qe(Ve,De,Me)}else{if("value"in Be)return Be.value;var Je=Be.get;return Je===void 0?void 0:Je.call(Me)}},de=function(){function qe(Ae,De){for(var Me=0;Me<De.length;Me++){var Be=De[Me];Be.enumerable=Be.enumerable||!1,Be.configurable=!0,"value"in Be&&(Be.writable=!0),Object.defineProperty(Ae,Be.key,Be)}}return function(Ae,De,Me){return De&&qe(Ae.prototype,De),Me&&qe(Ae,Me),Ae}}(),ue=re(3),ce=Se(ue),he=re(8),pe=Se(he),fe=re(44),ge=Se(fe),be=re(27),me=Se(be),ve=re(15),ye=re(42),we=Se(ye);function Se(qe){return qe&&qe.__esModule?qe:{default:qe}}function _e(qe,Ae){if(!(qe instanceof Ae))throw new TypeError("Cannot call a class as a function")}function Ce(qe,Ae){if(!qe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ae&&(typeof Ae=="object"||typeof Ae=="function")?Ae:qe}function Le(qe,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ae);qe.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:qe,enumerable:!1,writable:!0,configurable:!0}}),Ae&&(Object.setPrototypeOf?Object.setPrototypeOf(qe,Ae):qe.__proto__=Ae)}var Pe=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],Ie=function(qe){Le(Ae,qe);function Ae(De,Me){_e(this,Ae),Me.modules.toolbar!=null&&Me.modules.toolbar.container==null&&(Me.modules.toolbar.container=Pe);var Be=Ce(this,(Ae.__proto__||Object.getPrototypeOf(Ae)).call(this,De,Me));return Be.quill.container.classList.add("ql-snow"),Be}return de(Ae,[{key:"extendToolbar",value:function(Me){Me.container.classList.add("ql-snow"),this.buildButtons([].slice.call(Me.container.querySelectorAll("button")),we.default),this.buildPickers([].slice.call(Me.container.querySelectorAll("select")),we.default),this.tooltip=new Ne(this.quill,this.options.bounds),Me.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(Be,Ve){Me.handlers.link.call(Me,!Ve.format.link)})}}]),Ae}(ge.default);Ie.DEFAULTS=(0,ce.default)(!0,{},ge.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(Ae){if(Ae){var De=this.quill.getSelection();if(De==null||De.length==0)return;var Me=this.quill.getText(De);/^\S+@\S+\.\S+$/.test(Me)&&Me.indexOf("mailto:")!==0&&(Me="mailto:"+Me);var Be=this.quill.theme.tooltip;Be.edit("link",Me)}else this.quill.format("link",!1)}}}}});var Ne=function(qe){Le(Ae,qe);function Ae(De,Me){_e(this,Ae);var Be=Ce(this,(Ae.__proto__||Object.getPrototypeOf(Ae)).call(this,De,Me));return Be.preview=Be.root.querySelector("a.ql-preview"),Be}return de(Ae,[{key:"listen",value:function(){var Me=this;oe(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(Be){Me.root.classList.contains("ql-editing")?Me.save():Me.edit("link",Me.preview.textContent),Be.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(Be){if(Me.linkRange!=null){var Ve=Me.linkRange;Me.restoreFocus(),Me.quill.formatText(Ve,"link",!1,pe.default.sources.USER),delete Me.linkRange}Be.preventDefault(),Me.hide()}),this.quill.on(pe.default.events.SELECTION_CHANGE,function(Be,Ve,Je){if(Be!=null){if(Be.length===0&&Je===pe.default.sources.USER){var Ye=Me.quill.scroll.descendant(me.default,Be.index),kt=ne(Ye,2),Qe=kt[0],We=kt[1];if(Qe!=null){Me.linkRange=new ve.Range(Be.index-We,Qe.length());var Fe=me.default.formats(Qe.domNode);Me.preview.textContent=Fe,Me.preview.setAttribute("href",Fe),Me.show(),Me.position(Me.quill.getBounds(Me.linkRange));return}}else delete Me.linkRange;Me.hide()}})}},{key:"show",value:function(){oe(Ae.prototype.__proto__||Object.getPrototypeOf(Ae.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),Ae}(fe.BaseTooltip);Ne.TEMPLATE=['<a class="ql-preview" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),te.default=Ie},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(29),oe=Tt(ne),de=re(37),ue=re(39),ce=re(65),he=re(66),pe=Tt(he),fe=re(67),ge=Tt(fe),be=re(68),me=Tt(be),ve=re(38),ye=re(26),we=re(40),Se=re(41),_e=re(57),Ce=Tt(_e),Le=re(69),Pe=Tt(Le),Ie=re(27),Ne=Tt(Ie),qe=re(70),Ae=Tt(qe),De=re(71),Me=Tt(De),Be=re(72),Ve=Tt(Be),Je=re(73),Ye=Tt(Je),kt=re(74),Qe=Tt(kt),We=re(13),Fe=Tt(We),He=re(75),Ge=Tt(He),Xe=re(76),Ke=Tt(Xe),je=re(58),Ze=Tt(je),nt=re(42),ot=Tt(nt),Ct=re(28),Lt=Tt(Ct),Bt=re(60),jt=Tt(Bt),Kt=re(61),ei=Tt(Kt),mi=re(62),di=Tt(mi),xt=re(109),St=Tt(xt),qt=re(63),Dt=Tt(qt);function Tt(Gt){return Gt&&Gt.__esModule?Gt:{default:Gt}}oe.default.register({"attributors/attribute/direction":ue.DirectionAttribute,"attributors/class/align":de.AlignClass,"attributors/class/background":ve.BackgroundClass,"attributors/class/color":ye.ColorClass,"attributors/class/direction":ue.DirectionClass,"attributors/class/font":we.FontClass,"attributors/class/size":Se.SizeClass,"attributors/style/align":de.AlignStyle,"attributors/style/background":ve.BackgroundStyle,"attributors/style/color":ye.ColorStyle,"attributors/style/direction":ue.DirectionStyle,"attributors/style/font":we.FontStyle,"attributors/style/size":Se.SizeStyle},!0),oe.default.register({"formats/align":de.AlignClass,"formats/direction":ue.DirectionClass,"formats/indent":ce.IndentClass,"formats/background":ve.BackgroundStyle,"formats/color":ye.ColorStyle,"formats/font":we.FontClass,"formats/size":Se.SizeClass,"formats/blockquote":pe.default,"formats/code-block":Fe.default,"formats/header":ge.default,"formats/list":me.default,"formats/bold":Ce.default,"formats/code":We.Code,"formats/italic":Pe.default,"formats/link":Ne.default,"formats/script":Ae.default,"formats/strike":Me.default,"formats/underline":Ve.default,"formats/image":Ye.default,"formats/video":Qe.default,"formats/list/item":be.ListItem,"modules/formula":Ge.default,"modules/syntax":Ke.default,"modules/toolbar":Ze.default,"themes/bubble":St.default,"themes/snow":Dt.default,"ui/icons":ot.default,"ui/picker":Lt.default,"ui/icon-picker":ei.default,"ui/color-picker":jt.default,"ui/tooltip":di.default},!0),te.default=oe.default},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.IndentClass=void 0;var ne=function(){function me(ve,ye){for(var we=0;we<ye.length;we++){var Se=ye[we];Se.enumerable=Se.enumerable||!1,Se.configurable=!0,"value"in Se&&(Se.writable=!0),Object.defineProperty(ve,Se.key,Se)}}return function(ve,ye,we){return ye&&me(ve.prototype,ye),we&&me(ve,we),ve}}(),oe=function me(ve,ye,we){ve===null&&(ve=Function.prototype);var Se=Object.getOwnPropertyDescriptor(ve,ye);if(Se===void 0){var _e=Object.getPrototypeOf(ve);return _e===null?void 0:me(_e,ye,we)}else{if("value"in Se)return Se.value;var Ce=Se.get;return Ce===void 0?void 0:Ce.call(we)}},de=re(0),ue=ce(de);function ce(me){return me&&me.__esModule?me:{default:me}}function he(me,ve){if(!(me instanceof ve))throw new TypeError("Cannot call a class as a function")}function pe(me,ve){if(!me)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve&&(typeof ve=="object"||typeof ve=="function")?ve:me}function fe(me,ve){if(typeof ve!="function"&&ve!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ve);me.prototype=Object.create(ve&&ve.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}),ve&&(Object.setPrototypeOf?Object.setPrototypeOf(me,ve):me.__proto__=ve)}var ge=function(me){fe(ve,me);function ve(){return he(this,ve),pe(this,(ve.__proto__||Object.getPrototypeOf(ve)).apply(this,arguments))}return ne(ve,[{key:"add",value:function(we,Se){if(Se==="+1"||Se==="-1"){var _e=this.value(we)||0;Se=Se==="+1"?_e+1:_e-1}return Se===0?(this.remove(we),!0):oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"add",this).call(this,we,Se)}},{key:"canAdd",value:function(we,Se){return oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"canAdd",this).call(this,we,Se)||oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"canAdd",this).call(this,we,parseInt(Se))}},{key:"value",value:function(we){return parseInt(oe(ve.prototype.__proto__||Object.getPrototypeOf(ve.prototype),"value",this).call(this,we))||void 0}}]),ve}(ue.default.Attributor.Class),be=new ge("indent","ql-indent",{scope:ue.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});te.IndentClass=be},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(4),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="blockquote",pe.tagName="blockquote",te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ge(be,me){for(var ve=0;ve<me.length;ve++){var ye=me[ve];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(be,ye.key,ye)}}return function(be,me,ve){return me&&ge(be.prototype,me),ve&&ge(be,ve),be}}(),oe=re(4),de=ue(oe);function ue(ge){return ge&&ge.__esModule?ge:{default:ge}}function ce(ge,be){if(!(ge instanceof be))throw new TypeError("Cannot call a class as a function")}function he(ge,be){if(!ge)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be&&(typeof be=="object"||typeof be=="function")?be:ge}function pe(ge,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof be);ge.prototype=Object.create(be&&be.prototype,{constructor:{value:ge,enumerable:!1,writable:!0,configurable:!0}}),be&&(Object.setPrototypeOf?Object.setPrototypeOf(ge,be):ge.__proto__=be)}var fe=function(ge){pe(be,ge);function be(){return ce(this,be),he(this,(be.__proto__||Object.getPrototypeOf(be)).apply(this,arguments))}return ne(be,null,[{key:"formats",value:function(ve){return this.tagName.indexOf(ve.tagName)+1}}]),be}(de.default);fe.blotName="header",fe.tagName=["H1","H2","H3","H4","H5","H6"],te.default=fe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.ListItem=void 0;var ne=function(){function _e(Ce,Le){for(var Pe=0;Pe<Le.length;Pe++){var Ie=Le[Pe];Ie.enumerable=Ie.enumerable||!1,Ie.configurable=!0,"value"in Ie&&(Ie.writable=!0),Object.defineProperty(Ce,Ie.key,Ie)}}return function(Ce,Le,Pe){return Le&&_e(Ce.prototype,Le),Pe&&_e(Ce,Pe),Ce}}(),oe=function _e(Ce,Le,Pe){Ce===null&&(Ce=Function.prototype);var Ie=Object.getOwnPropertyDescriptor(Ce,Le);if(Ie===void 0){var Ne=Object.getPrototypeOf(Ce);return Ne===null?void 0:_e(Ne,Le,Pe)}else{if("value"in Ie)return Ie.value;var qe=Ie.get;return qe===void 0?void 0:qe.call(Pe)}},de=re(0),ue=ge(de),ce=re(4),he=ge(ce),pe=re(25),fe=ge(pe);function ge(_e){return _e&&_e.__esModule?_e:{default:_e}}function be(_e,Ce,Le){return Ce in _e?Object.defineProperty(_e,Ce,{value:Le,enumerable:!0,configurable:!0,writable:!0}):_e[Ce]=Le,_e}function me(_e,Ce){if(!(_e instanceof Ce))throw new TypeError("Cannot call a class as a function")}function ve(_e,Ce){if(!_e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ce&&(typeof Ce=="object"||typeof Ce=="function")?Ce:_e}function ye(_e,Ce){if(typeof Ce!="function"&&Ce!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ce);_e.prototype=Object.create(Ce&&Ce.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}}),Ce&&(Object.setPrototypeOf?Object.setPrototypeOf(_e,Ce):_e.__proto__=Ce)}var we=function(_e){ye(Ce,_e);function Ce(){return me(this,Ce),ve(this,(Ce.__proto__||Object.getPrototypeOf(Ce)).apply(this,arguments))}return ne(Ce,[{key:"format",value:function(Pe,Ie){Pe===Se.blotName&&!Ie?this.replaceWith(ue.default.create(this.statics.scope)):oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"format",this).call(this,Pe,Ie)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(Pe,Ie){return this.parent.isolate(this.offset(this.parent),this.length()),Pe===this.parent.statics.blotName?(this.parent.replaceWith(Pe,Ie),this):(this.parent.unwrap(),oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"replaceWith",this).call(this,Pe,Ie))}}],[{key:"formats",value:function(Pe){return Pe.tagName===this.tagName?void 0:oe(Ce.__proto__||Object.getPrototypeOf(Ce),"formats",this).call(this,Pe)}}]),Ce}(he.default);we.blotName="list-item",we.tagName="LI";var Se=function(_e){ye(Ce,_e),ne(Ce,null,[{key:"create",value:function(Pe){var Ie=Pe==="ordered"?"OL":"UL",Ne=oe(Ce.__proto__||Object.getPrototypeOf(Ce),"create",this).call(this,Ie);return(Pe==="checked"||Pe==="unchecked")&&Ne.setAttribute("data-checked",Pe==="checked"),Ne}},{key:"formats",value:function(Pe){if(Pe.tagName==="OL")return"ordered";if(Pe.tagName==="UL")return Pe.hasAttribute("data-checked")?Pe.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function Ce(Le){me(this,Ce);var Pe=ve(this,(Ce.__proto__||Object.getPrototypeOf(Ce)).call(this,Le)),Ie=function(qe){if(qe.target.parentNode===Le){var Ae=Pe.statics.formats(Le),De=ue.default.find(qe.target);Ae==="checked"?De.format("list","unchecked"):Ae==="unchecked"&&De.format("list","checked")}};return Le.addEventListener("touchstart",Ie),Le.addEventListener("mousedown",Ie),Pe}return ne(Ce,[{key:"format",value:function(Pe,Ie){this.children.length>0&&this.children.tail.format(Pe,Ie)}},{key:"formats",value:function(){return be({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(Pe,Ie){if(Pe instanceof we)oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"insertBefore",this).call(this,Pe,Ie);else{var Ne=Ie==null?this.length():Ie.offset(this),qe=this.split(Ne);qe.parent.insertBefore(Pe,qe)}}},{key:"optimize",value:function(Pe){oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"optimize",this).call(this,Pe);var Ie=this.next;Ie!=null&&Ie.prev===this&&Ie.statics.blotName===this.statics.blotName&&Ie.domNode.tagName===this.domNode.tagName&&Ie.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(Ie.moveChildren(this),Ie.remove())}},{key:"replace",value:function(Pe){if(Pe.statics.blotName!==this.statics.blotName){var Ie=ue.default.create(this.statics.defaultChild);Pe.moveChildren(Ie),this.appendChild(Ie)}oe(Ce.prototype.__proto__||Object.getPrototypeOf(Ce.prototype),"replace",this).call(this,Pe)}}]),Ce}(fe.default);Se.blotName="list",Se.scope=ue.default.Scope.BLOCK_BLOT,Se.tagName=["OL","UL"],Se.defaultChild="list-item",Se.allowedChildren=[we],te.ListItem=we,te.default=Se},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(57),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="italic",pe.tagName=["EM","I"],te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function be(me,ve){for(var ye=0;ye<ve.length;ye++){var we=ve[ye];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(me,we.key,we)}}return function(me,ve,ye){return ve&&be(me.prototype,ve),ye&&be(me,ye),me}}(),oe=function be(me,ve,ye){me===null&&(me=Function.prototype);var we=Object.getOwnPropertyDescriptor(me,ve);if(we===void 0){var Se=Object.getPrototypeOf(me);return Se===null?void 0:be(Se,ve,ye)}else{if("value"in we)return we.value;var _e=we.get;return _e===void 0?void 0:_e.call(ye)}},de=re(6),ue=ce(de);function ce(be){return be&&be.__esModule?be:{default:be}}function he(be,me){if(!(be instanceof me))throw new TypeError("Cannot call a class as a function")}function pe(be,me){if(!be)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:be}function fe(be,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);be.prototype=Object.create(me&&me.prototype,{constructor:{value:be,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(be,me):be.__proto__=me)}var ge=function(be){fe(me,be);function me(){return he(this,me),pe(this,(me.__proto__||Object.getPrototypeOf(me)).apply(this,arguments))}return ne(me,null,[{key:"create",value:function(ye){return ye==="super"?document.createElement("sup"):ye==="sub"?document.createElement("sub"):oe(me.__proto__||Object.getPrototypeOf(me),"create",this).call(this,ye)}},{key:"formats",value:function(ye){if(ye.tagName==="SUB")return"sub";if(ye.tagName==="SUP")return"super"}}]),me}(ue.default);ge.blotName="script",ge.tagName=["SUB","SUP"],te.default=ge},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(6),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="strike",pe.tagName="S",te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=re(6),oe=de(ne);function de(fe){return fe&&fe.__esModule?fe:{default:fe}}function ue(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function ce(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function he(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var pe=function(fe){he(ge,fe);function ge(){return ue(this,ge),ce(this,(ge.__proto__||Object.getPrototypeOf(ge)).apply(this,arguments))}return ge}(oe.default);pe.blotName="underline",pe.tagName="U",te.default=pe},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(0),ue=he(de),ce=re(27);function he(ve){return ve&&ve.__esModule?ve:{default:ve}}function pe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function fe(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function ge(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var be=["alt","height","width"],me=function(ve){ge(ye,ve);function ye(){return pe(this,ye),fe(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"format",value:function(Se,_e){be.indexOf(Se)>-1?_e?this.domNode.setAttribute(Se,_e):this.domNode.removeAttribute(Se):oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"format",this).call(this,Se,_e)}}],[{key:"create",value:function(Se){var _e=oe(ye.__proto__||Object.getPrototypeOf(ye),"create",this).call(this,Se);return typeof Se=="string"&&_e.setAttribute("src",this.sanitize(Se)),_e}},{key:"formats",value:function(Se){return be.reduce(function(_e,Ce){return Se.hasAttribute(Ce)&&(_e[Ce]=Se.getAttribute(Ce)),_e},{})}},{key:"match",value:function(Se){return/\.(jpe?g|gif|png)$/.test(Se)||/^data:image\/.+;base64/.test(Se)}},{key:"sanitize",value:function(Se){return(0,ce.sanitize)(Se,["http","https","data"])?Se:"//:0"}},{key:"value",value:function(Se){return Se.getAttribute("src")}}]),ye}(ue.default.Embed);me.blotName="image",me.tagName="IMG",te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0});var ne=function(){function ve(ye,we){for(var Se=0;Se<we.length;Se++){var _e=we[Se];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(ye,_e.key,_e)}}return function(ye,we,Se){return we&&ve(ye.prototype,we),Se&&ve(ye,Se),ye}}(),oe=function ve(ye,we,Se){ye===null&&(ye=Function.prototype);var _e=Object.getOwnPropertyDescriptor(ye,we);if(_e===void 0){var Ce=Object.getPrototypeOf(ye);return Ce===null?void 0:ve(Ce,we,Se)}else{if("value"in _e)return _e.value;var Le=_e.get;return Le===void 0?void 0:Le.call(Se)}},de=re(4),ue=re(27),ce=he(ue);function he(ve){return ve&&ve.__esModule?ve:{default:ve}}function pe(ve,ye){if(!(ve instanceof ye))throw new TypeError("Cannot call a class as a function")}function fe(ve,ye){if(!ve)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye&&(typeof ye=="object"||typeof ye=="function")?ye:ve}function ge(ve,ye){if(typeof ye!="function"&&ye!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ye);ve.prototype=Object.create(ye&&ye.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}),ye&&(Object.setPrototypeOf?Object.setPrototypeOf(ve,ye):ve.__proto__=ye)}var be=["height","width"],me=function(ve){ge(ye,ve);function ye(){return pe(this,ye),fe(this,(ye.__proto__||Object.getPrototypeOf(ye)).apply(this,arguments))}return ne(ye,[{key:"format",value:function(Se,_e){be.indexOf(Se)>-1?_e?this.domNode.setAttribute(Se,_e):this.domNode.removeAttribute(Se):oe(ye.prototype.__proto__||Object.getPrototypeOf(ye.prototype),"format",this).call(this,Se,_e)}}],[{key:"create",value:function(Se){var _e=oe(ye.__proto__||Object.getPrototypeOf(ye),"create",this).call(this,Se);return _e.setAttribute("frameborder","0"),_e.setAttribute("allowfullscreen",!0),_e.setAttribute("src",this.sanitize(Se)),_e}},{key:"formats",value:function(Se){return be.reduce(function(_e,Ce){return Se.hasAttribute(Ce)&&(_e[Ce]=Se.getAttribute(Ce)),_e},{})}},{key:"sanitize",value:function(Se){return ce.default.sanitize(Se)}},{key:"value",value:function(Se){return Se.getAttribute("src")}}]),ye}(de.BlockEmbed);me.blotName="video",me.className="ql-video",me.tagName="IFRAME",te.default=me},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.FormulaBlot=void 0;var ne=function(){function Se(_e,Ce){for(var Le=0;Le<Ce.length;Le++){var Pe=Ce[Le];Pe.enumerable=Pe.enumerable||!1,Pe.configurable=!0,"value"in Pe&&(Pe.writable=!0),Object.defineProperty(_e,Pe.key,Pe)}}return function(_e,Ce,Le){return Ce&&Se(_e.prototype,Ce),Le&&Se(_e,Le),_e}}(),oe=function Se(_e,Ce,Le){_e===null&&(_e=Function.prototype);var Pe=Object.getOwnPropertyDescriptor(_e,Ce);if(Pe===void 0){var Ie=Object.getPrototypeOf(_e);return Ie===null?void 0:Se(Ie,Ce,Le)}else{if("value"in Pe)return Pe.value;var Ne=Pe.get;return Ne===void 0?void 0:Ne.call(Le)}},de=re(36),ue=ge(de),ce=re(5),he=ge(ce),pe=re(9),fe=ge(pe);function ge(Se){return Se&&Se.__esModule?Se:{default:Se}}function be(Se,_e){if(!(Se instanceof _e))throw new TypeError("Cannot call a class as a function")}function me(Se,_e){if(!Se)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e&&(typeof _e=="object"||typeof _e=="function")?_e:Se}function ve(Se,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _e);Se.prototype=Object.create(_e&&_e.prototype,{constructor:{value:Se,enumerable:!1,writable:!0,configurable:!0}}),_e&&(Object.setPrototypeOf?Object.setPrototypeOf(Se,_e):Se.__proto__=_e)}var ye=function(Se){ve(_e,Se);function _e(){return be(this,_e),me(this,(_e.__proto__||Object.getPrototypeOf(_e)).apply(this,arguments))}return ne(_e,null,[{key:"create",value:function(Le){var Pe=oe(_e.__proto__||Object.getPrototypeOf(_e),"create",this).call(this,Le);return typeof Le=="string"&&(window.katex.render(Le,Pe,{throwOnError:!1,errorColor:"#f00"}),Pe.setAttribute("data-value",Le)),Pe}},{key:"value",value:function(Le){return Le.getAttribute("data-value")}}]),_e}(ue.default);ye.blotName="formula",ye.className="ql-formula",ye.tagName="SPAN";var we=function(Se){ve(_e,Se),ne(_e,null,[{key:"register",value:function(){he.default.register(ye,!0)}}]);function _e(){be(this,_e);var Ce=me(this,(_e.__proto__||Object.getPrototypeOf(_e)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return Ce}return _e}(fe.default);te.FormulaBlot=ye,te.default=we},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.CodeToken=te.CodeBlock=void 0;var ne=function(){function Le(Pe,Ie){for(var Ne=0;Ne<Ie.length;Ne++){var qe=Ie[Ne];qe.enumerable=qe.enumerable||!1,qe.configurable=!0,"value"in qe&&(qe.writable=!0),Object.defineProperty(Pe,qe.key,qe)}}return function(Pe,Ie,Ne){return Ie&&Le(Pe.prototype,Ie),Ne&&Le(Pe,Ne),Pe}}(),oe=function Le(Pe,Ie,Ne){Pe===null&&(Pe=Function.prototype);var qe=Object.getOwnPropertyDescriptor(Pe,Ie);if(qe===void 0){var Ae=Object.getPrototypeOf(Pe);return Ae===null?void 0:Le(Ae,Ie,Ne)}else{if("value"in qe)return qe.value;var De=qe.get;return De===void 0?void 0:De.call(Ne)}},de=re(0),ue=me(de),ce=re(5),he=me(ce),pe=re(9),fe=me(pe),ge=re(13),be=me(ge);function me(Le){return Le&&Le.__esModule?Le:{default:Le}}function ve(Le,Pe){if(!(Le instanceof Pe))throw new TypeError("Cannot call a class as a function")}function ye(Le,Pe){if(!Le)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pe&&(typeof Pe=="object"||typeof Pe=="function")?Pe:Le}function we(Le,Pe){if(typeof Pe!="function"&&Pe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Pe);Le.prototype=Object.create(Pe&&Pe.prototype,{constructor:{value:Le,enumerable:!1,writable:!0,configurable:!0}}),Pe&&(Object.setPrototypeOf?Object.setPrototypeOf(Le,Pe):Le.__proto__=Pe)}var Se=function(Le){we(Pe,Le);function Pe(){return ve(this,Pe),ye(this,(Pe.__proto__||Object.getPrototypeOf(Pe)).apply(this,arguments))}return ne(Pe,[{key:"replaceWith",value:function(Ne){this.domNode.textContent=this.domNode.textContent,this.attach(),oe(Pe.prototype.__proto__||Object.getPrototypeOf(Pe.prototype),"replaceWith",this).call(this,Ne)}},{key:"highlight",value:function(Ne){var qe=this.domNode.textContent;this.cachedText!==qe&&((qe.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=Ne(qe),this.domNode.normalize(),this.attach()),this.cachedText=qe)}}]),Pe}(be.default);Se.className="ql-syntax";var _e=new ue.default.Attributor.Class("token","hljs",{scope:ue.default.Scope.INLINE}),Ce=function(Le){we(Pe,Le),ne(Pe,null,[{key:"register",value:function(){he.default.register(_e,!0),he.default.register(Se,!0)}}]);function Pe(Ie,Ne){ve(this,Pe);var qe=ye(this,(Pe.__proto__||Object.getPrototypeOf(Pe)).call(this,Ie,Ne));if(typeof qe.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var Ae=null;return qe.quill.on(he.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(Ae),Ae=setTimeout(function(){qe.highlight(),Ae=null},qe.options.interval)}),qe.highlight(),qe}return ne(Pe,[{key:"highlight",value:function(){var Ne=this;if(!this.quill.selection.composing){this.quill.update(he.default.sources.USER);var qe=this.quill.getSelection();this.quill.scroll.descendants(Se).forEach(function(Ae){Ae.highlight(Ne.options.highlight)}),this.quill.update(he.default.sources.SILENT),qe!=null&&this.quill.setSelection(qe,he.default.sources.SILENT)}}}]),Pe}(fe.default);Ce.DEFAULTS={highlight:function(){return window.hljs==null?null:function(Le){var Pe=window.hljs.highlightAuto(Le);return Pe.value}}(),interval:1e3},te.CodeBlock=Se,te.CodeToken=_e,te.default=Ce},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(J,te){J.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(J,te){J.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(J,te){J.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(J,te){J.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(J,te){J.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(J,te,re){Object.defineProperty(te,"__esModule",{value:!0}),te.default=te.BubbleTooltip=void 0;var ne=function Pe(Ie,Ne,qe){Ie===null&&(Ie=Function.prototype);var Ae=Object.getOwnPropertyDescriptor(Ie,Ne);if(Ae===void 0){var De=Object.getPrototypeOf(Ie);return De===null?void 0:Pe(De,Ne,qe)}else{if("value"in Ae)return Ae.value;var Me=Ae.get;return Me===void 0?void 0:Me.call(qe)}},oe=function(){function Pe(Ie,Ne){for(var qe=0;qe<Ne.length;qe++){var Ae=Ne[qe];Ae.enumerable=Ae.enumerable||!1,Ae.configurable=!0,"value"in Ae&&(Ae.writable=!0),Object.defineProperty(Ie,Ae.key,Ae)}}return function(Ie,Ne,qe){return Ne&&Pe(Ie.prototype,Ne),qe&&Pe(Ie,qe),Ie}}(),de=re(3),ue=ve(de),ce=re(8),he=ve(ce),pe=re(44),fe=ve(pe),ge=re(15),be=re(42),me=ve(be);function ve(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function ye(Pe,Ie){if(!(Pe instanceof Ie))throw new TypeError("Cannot call a class as a function")}function we(Pe,Ie){if(!Pe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ie&&(typeof Ie=="object"||typeof Ie=="function")?Ie:Pe}function Se(Pe,Ie){if(typeof Ie!="function"&&Ie!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Ie);Pe.prototype=Object.create(Ie&&Ie.prototype,{constructor:{value:Pe,enumerable:!1,writable:!0,configurable:!0}}),Ie&&(Object.setPrototypeOf?Object.setPrototypeOf(Pe,Ie):Pe.__proto__=Ie)}var _e=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],Ce=function(Pe){Se(Ie,Pe);function Ie(Ne,qe){ye(this,Ie),qe.modules.toolbar!=null&&qe.modules.toolbar.container==null&&(qe.modules.toolbar.container=_e);var Ae=we(this,(Ie.__proto__||Object.getPrototypeOf(Ie)).call(this,Ne,qe));return Ae.quill.container.classList.add("ql-bubble"),Ae}return oe(Ie,[{key:"extendToolbar",value:function(qe){this.tooltip=new Le(this.quill,this.options.bounds),this.tooltip.root.appendChild(qe.container),this.buildButtons([].slice.call(qe.container.querySelectorAll("button")),me.default),this.buildPickers([].slice.call(qe.container.querySelectorAll("select")),me.default)}}]),Ie}(fe.default);Ce.DEFAULTS=(0,ue.default)(!0,{},fe.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(Ie){Ie?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var Le=function(Pe){Se(Ie,Pe);function Ie(Ne,qe){ye(this,Ie);var Ae=we(this,(Ie.__proto__||Object.getPrototypeOf(Ie)).call(this,Ne,qe));return Ae.quill.on(he.default.events.EDITOR_CHANGE,function(De,Me,Be,Ve){if(De===he.default.events.SELECTION_CHANGE)if(Me!=null&&Me.length>0&&Ve===he.default.sources.USER){Ae.show(),Ae.root.style.left="0px",Ae.root.style.width="",Ae.root.style.width=Ae.root.offsetWidth+"px";var Je=Ae.quill.getLines(Me.index,Me.length);if(Je.length===1)Ae.position(Ae.quill.getBounds(Me));else{var Ye=Je[Je.length-1],kt=Ae.quill.getIndex(Ye),Qe=Math.min(Ye.length()-1,Me.index+Me.length-kt),We=Ae.quill.getBounds(new ge.Range(kt,Qe));Ae.position(We)}}else document.activeElement!==Ae.textbox&&Ae.quill.hasFocus()&&Ae.hide()}),Ae}return oe(Ie,[{key:"listen",value:function(){var qe=this;ne(Ie.prototype.__proto__||Object.getPrototypeOf(Ie.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){qe.root.classList.remove("ql-editing")}),this.quill.on(he.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!qe.root.classList.contains("ql-hidden")){var Ae=qe.quill.getSelection();Ae!=null&&qe.position(qe.quill.getBounds(Ae))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(qe){var Ae=ne(Ie.prototype.__proto__||Object.getPrototypeOf(Ie.prototype),"position",this).call(this,qe),De=this.root.querySelector(".ql-tooltip-arrow");if(De.style.marginLeft="",Ae===0)return Ae;De.style.marginLeft=-1*Ae-De.offsetWidth/2+"px"}}]),Ie}(pe.BaseTooltip);Le.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),te.BubbleTooltip=Le,te.default=Ce},function(J,te,re){J.exports=re(64)}]).default})})(quill);var quillExports=quill.exports;const Quill=getDefaultExportFromCjs(quillExports),styles$1=':host{height:100%}.container{width:100%;height:100%;display:flex;flex-direction:column;flex:1}.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative;color:#000;overflow-y:auto}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word;font-size:1rem}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li{list-style-type:none}.ql-editor ul>li{list-style-type:disc}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1;counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-2{counter-increment:list-2;counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-3{counter-increment:list-3;counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-4{counter-increment:list-4;counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-5{counter-increment:list-5;counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-6{counter-increment:list-6;counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-7{counter-increment:list-7;counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-8{counter-increment:list-8;counter-reset:list-9}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px);background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none;line-height:26px}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Petita"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Gran"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Enorme"}button.ql-indent{display:none!important}.ql-undo{font-size:14pt;font-weight:900;display:flex!important;align-items:center}.ql-undo:after{content:"↺";transform:rotate(-135deg)}.ql-redo{font-size:14pt;font-weight:900;display:flex!important;align-items:center}.ql-redo:after{content:"↻";transform:rotate(135deg)}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border-bottom:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}',template=X=>ke$1`
|
|
6561
6599
|
<div class="container">
|
|
6562
6600
|
<div id="rte">
|
|
6563
6601
|
</div>
|
|
6564
6602
|
</div>
|
|
6565
6603
|
`,fixSpellCheckerIssue=X=>{const W=X.import("blots/inline");class J extends W{constructor(re,ne){super(re,ne);const oe=this.replaceWith(new W(W.create()));return oe.children.forEach(de=>{de.attributes&&de.attributes.copy(oe),de.unwrap&&de.unwrap()}),Object.keys(re.attributes).forEach(function(de){if(re.attributes[de].name!="style"){const ue=re.attributes[de].value;let ce=re.attributes[de].name;ce=="face"&&(ce="font-family"),oe.format(ce,ue)}}),this.remove(),oe}}J.blotName="customAttributes",J.tagName="FONT",X.register(J,!0)};var __defProp$1=Object.defineProperty,__decorateClass$1=(X,W,J,te)=>{for(var re=void 0,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=oe(W,J,re)||re);return re&&__defProp$1(W,J,re),re};fixSpellCheckerIssue(Quill);const Ki=class Ki extends h$q{constructor(){super(...arguments),this.availableOptions=["bold","italic","underline","strike","blockquote","code-block","image","video","link","color","background","ol","ul","subindex","superindex","size","header","font","align","undo","redo"],this.availableFormats=["background","bold","color","font","code","italic","link","size","strike","script","underline","blockquote","header","list","align","direction","code-block","formula","image","video"]}render(){return ke$1` ${template()} `}firstUpdated(){var W;this.quill=new Quill((W=this.shadowRoot)==null?void 0:W.querySelector("#rte"),this._getOptions()),this.quill.on("text-change",()=>this._emitTextChangeEvent()),this.quill.root.addEventListener("paste",()=>{this._emitTextChangeEvent()}),this.quill.on("text-change",(J,te,re)=>{const ne=this.quill.getText(),oe={html:this.shadowRoot.querySelector(".ql-editor").innerHTML,plain:ne},de=new CustomEvent("text-changed",{composed:!0,detail:oe});this.dispatchEvent(de),this.range=this.getCursorPosition()}),this.quill.on("selection-change",(J,te,re)=>{J&&(this.range=J)})}_emitTextChangeEvent(){var re,ne;const W=this.quill.getText(),J={html:(ne=(re=this.shadowRoot)==null?void 0:re.querySelector(".ql-editor"))==null?void 0:ne.innerHTML,plain:W},te=new CustomEvent("text-changed",{composed:!0,detail:J});this.dispatchEvent(te),this.range=this.getCursorPosition()}_getOptions(){let W=[];const J=this.availableOptions;this.options===void 0||this.options.length===0?W=[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge","20px"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["image"],["video"]]:(W=this.options.split(","),W.forEach(re=>{J.indexOf(re)<=-1&&W.splice(W.indexOf(re),1)}),W=W.map(function(re){return re=="color"?{color:[]}:re=="ol"?{list:"ordered"}:re=="ul"?{list:"bullet"}:re=="subindex"?{script:"sub"}:re=="superindex"?{script:"super"}:re=="size"?{size:["small",!1,"large","huge"]}:re=="header"?{header:[1,2,3,4,5,6,!1]}:re=="background"?{background:[]}:re=="font"?{font:[]}:re=="align"?{align:[]}:re}));let te=this.availableFormats;return this.formats&&(te=this.formats.split(",")),{modules:{toolbar:{container:W,handlers:{redo(){this.quill.history.redo()},undo(){this.quill.history.undo()}}},history:{delay:1e3,maxStack:50,userOnly:!1},keyboard:{bindings:{indent:{key:"Tab",format:["blockquote","indent","list"],handler(re,ne){var oe;return ne.collapsed&&ne.offset!==0||((oe=ne.format)==null?void 0:oe.list)==="ordered"?!0:(this.quill.format("indent","+1",Quill.sources.USER),!1)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*)$/,handler(re,ne){if(this.quill.scroll.query("list")==null)return!0;const{length:oe}=ne.prefix;return this.quill.getLine(re.index)[1]>oe?!0:(this.quill.insertText(re.index," ",Quill.sources.USER),this.quill.setSelection(re.index-oe,Quill.sources.SILENT),!1)}}}}},theme:"snow",formats:te}}getCursorPosition(){return this.quill.getSelection()}};Ki.styles=i$B`
|
|
6566
6604
|
${r$H(styles$1)}
|
|
6567
|
-
`;let PrimariaRichTextEditor=Ki;__decorateClass$1([n$w()],PrimariaRichTextEditor.prototype,"quill"),__decorateClass$1([n$w()],PrimariaRichTextEditor.prototype,"options"),__decorateClass$1([n$w({type:Object})],PrimariaRichTextEditor.prototype,"range"),__decorateClass$1([n$w({type:Array})],PrimariaRichTextEditor.prototype,"availableOptions"),__decorateClass$1([n$w({type:Array})],PrimariaRichTextEditor.prototype,"availableFormats"),__decorateClass$1([n$w()],PrimariaRichTextEditor.prototype,"formats");const styles=":host{margin:0 auto}.limit-
|
|
6568
|
-
<dss-
|
|
6569
|
-
class="limit-
|
|
6570
|
-
|
|
6605
|
+
`;let PrimariaRichTextEditor=Ki;__decorateClass$1([n$w()],PrimariaRichTextEditor.prototype,"quill"),__decorateClass$1([n$w()],PrimariaRichTextEditor.prototype,"options"),__decorateClass$1([n$w({type:Object})],PrimariaRichTextEditor.prototype,"range"),__decorateClass$1([n$w({type:Array})],PrimariaRichTextEditor.prototype,"availableOptions"),__decorateClass$1([n$w({type:Array})],PrimariaRichTextEditor.prototype,"availableFormats"),__decorateClass$1([n$w()],PrimariaRichTextEditor.prototype,"formats");const styles=":host{margin:0 auto}.limit-alert{padding-top:8px;padding-bottom:8px}";var __defProp=Object.defineProperty,__decorateClass=(X,W,J,te)=>{for(var re=void 0,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=oe(W,J,re)||re);return re&&__defProp(W,J,re),re};const Qi=class Qi extends h$q{constructor(){super(...arguments),this.characterCount=0,this.characterLimit=0,this.label=""}render(){return this.characterCount>this.characterLimit?ke$1`
|
|
6606
|
+
<dss-alert
|
|
6607
|
+
class="limit-alert"
|
|
6608
|
+
state="warning"
|
|
6571
6609
|
size="md"
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
outlined
|
|
6575
|
-
></dss-badge>
|
|
6610
|
+
message="${this.label} ${this.characterCount}/${this.characterLimit}"
|
|
6611
|
+
></dss-alert>
|
|
6576
6612
|
`:D$1}};Qi.styles=i$B`
|
|
6577
6613
|
${r$H(styles)}
|
|
6578
|
-
`;let PrimariaCharacterLimitBadge=Qi;__decorateClass([n$w({type:Number})],PrimariaCharacterLimitBadge.prototype,"characterCount"),__decorateClass([n$w({type:Number})],PrimariaCharacterLimitBadge.prototype,"characterLimit"),__decorateClass([n$w({type:String})],PrimariaCharacterLimitBadge.prototype,"label");const useSharedUI=()=>{t$i("primaria-content-switcher")(PrimariaContentSwitcher),t$i("primaria-nav-item")(PrimariaNavItem),t$i("primaria-rich-text-editor")(PrimariaRichTextEditor),t$i("primaria-nav-tree-menu")(PrimariaNavTreeMenu),t$i("primaria-character-limit-badge")(PrimariaCharacterLimitBadge)},registerLowerNavMenuViews=()=>{shellApi.regionManager.registerView(shellRegions.navigationLowerLeftMenu,{id:"configuration-center",factory:()=>{const X=new PrimariaNavItem({icon:"settings",label:"Centre de configuració",callbackFn:()=>{}});return Promise.resolve(X)}})},getPatientCip=async X=>await X.broker.send("get_patient_cip"),navigateToEcapWithoutClosingWithCip=async X=>{const W=await getPatientCip(shellApi);shellApi.ecapEventManager.publish(X,"NO_TANCAR",{CIP:W})},upperNavMenuItems=[{id:"landing",icon:"home",label:"Pàgina inici",type:"item",sortHint:"0010",callbackFn:()=>shellApi.broker.send(new ExitShell("OBRIR_PI"))},{id:"processes",icon:"account_tree",label:"Vies clíniques",type:"tree",sortHint:"0040",actionMenuItems:[{icon:"open_in_new",label:"ARES",callbackFn:()=>navigateToEcapWithoutClosingWithCip("PROCES_ATENCIO")},{icon:"open_in_new",label:"
|
|
6614
|
+
`;let PrimariaCharacterLimitBadge=Qi;__decorateClass([n$w({type:Number})],PrimariaCharacterLimitBadge.prototype,"characterCount"),__decorateClass([n$w({type:Number})],PrimariaCharacterLimitBadge.prototype,"characterLimit"),__decorateClass([n$w({type:String})],PrimariaCharacterLimitBadge.prototype,"label");const useSharedUI=()=>{t$i("primaria-content-switcher")(PrimariaContentSwitcher),t$i("primaria-nav-item")(PrimariaNavItem),t$i("primaria-rich-text-editor")(PrimariaRichTextEditor),t$i("primaria-nav-tree-menu")(PrimariaNavTreeMenu),t$i("primaria-character-limit-badge")(PrimariaCharacterLimitBadge)},registerLowerNavMenuViews=()=>{shellApi.regionManager.registerView(shellRegions.navigationLowerLeftMenu,{id:"configuration-center",factory:()=>{const X=new PrimariaNavItem({icon:"settings",label:"Centre de configuració",callbackFn:()=>{}});return Promise.resolve(X)}})},getPatientCip=async X=>await X.broker.send("get_patient_cip"),navigateToEcapWithoutClosingWithCip=async X=>{const W=await getPatientCip(shellApi);shellApi.ecapEventManager.publish(X,"NO_TANCAR",{CIP:W})},upperNavMenuItems=[{id:"landing",icon:"home",label:"Pàgina inici",type:"item",sortHint:"0010",callbackFn:()=>shellApi.broker.send(new ExitShell("OBRIR_PI"))},{id:"dinamic-monitoring",icon:"poll",label:"Monitoratge dinàmic",type:"item",sortHint:"0030",callbackFn:()=>navigateToEcapWithoutClosingWithCip("SIA_DEV")},{id:"processes",icon:"account_tree",label:"Vies clíniques",type:"tree",sortHint:"0040",actionMenuItems:[{icon:"open_in_new",label:"ARES",callbackFn:()=>navigateToEcapWithoutClosingWithCip("PROCES_ATENCIO")},{icon:"open_in_new",label:"Nen sa",callbackFn:()=>navigateToEcapWithoutClosingWithCip("NEN_SA")},{icon:"open_in_new",label:"ASSIR",callbackFn:()=>{}},{icon:"open_in_new",label:"Odontologia",callbackFn:()=>navigateToEcapWithoutClosingWithCip("ODONTOLOGO")},{icon:"open_in_new",label:"Situació d'especial cura",callbackFn:()=>navigateToEcapWithoutClosingWithCip("SIT_ESPEC_CURA_DEV")},{icon:"open_in_new",label:"Valoració social",callbackFn:()=>{}}]},{id:"unique-petition",icon:"playlist_add",label:"Petitori",type:"tree",sortHint:"0050",actionMenuItems:[{icon:"open_in_new",label:"Analítiques",callbackFn:()=>navigateToEcapWithoutClosingWithCip("LABORATORI")},{icon:"open_in_new",label:"Ordres Clíniques",callbackFn:()=>navigateToEcapWithoutClosingWithCip("RESULT_OC")},{icon:"open_in_new",label:"OC Exprés",callbackFn:()=>navigateToEcapWithoutClosingWithCip("OC_EXPRES")},{icon:"open_in_new",label:"Sol·licitud de trasllat",callbackFn:()=>navigateToEcapWithoutClosingWithCip("TRANSPORT")}]},{id:"analytics-monitoring",icon:"science",label:"Seguiment analític",type:"item",sortHint:"0060",callbackFn:()=>{}},{id:"results-reports",icon:"folder_shared",label:"Documents",type:"tree",sortHint:"0070",actionMenuItems:[{icon:"open_in_new",label:"Resultats i informes",callbackFn:()=>{}},{icon:"open_in_new",label:"Documents usuari",callbackFn:()=>setTimeout(()=>{navigateToEcapWithoutClosingWithCip("CRIDA_DOCS_USU")},0)},{icon:"open_in_new",label:"Informes clínics",callbackFn:()=>{}}]},{id:"test-cabinets",icon:"list_alt",label:"Gabinets de proves",type:"item",sortHint:"0080",callbackFn:()=>{}},{id:"prescriptions",icon:"pill",label:"Prescripció",type:"tree",sortHint:"0090",actionMenuItems:[{icon:"open_in_new",label:"Prescripció",callbackFn:()=>{}},{icon:"open_in_new",label:"Ordres de tractament",callbackFn:()=>{}},{icon:"open_in_new",label:"Dispensació material sanitari",callbackFn:()=>{}},{icon:"open_in_new",label:"Prescripció social",callbackFn:()=>{}}]},{id:"vaccines",icon:"vaccines",label:"Immunitzacions",type:"item",sortHint:"0100",callbackFn:()=>{}},{id:"it",icon:"history_toggle_off",label:"Incapacitat temporal",type:"item",sortHint:"0100",callbackFn:()=>navigateToEcapWithoutClosingWithCip("REV_IT")},{id:"communication",icon:"3p",label:"Comunicació",type:"tree",sortHint:"0120",actionMenuItems:[{icon:"open_in_new",label:"SMS",callbackFn:async()=>{const X=await getPatientCip(shellApi);shellApi.ecapEventManager.publish("MISSATGES_DEV","NO_TANCAR",{CIP:X||"",TipusMissatge:"SMS"})}},{icon:"open_in_new",label:"eConsulta",callbackFn:()=>{}},{icon:"open_in_new",label:"Mail",callbackFn:()=>{}},{icon:"open_in_new",label:"Veu IP",callbackFn:()=>navigateToEcapWithoutClosingWithCip("VOIP")},{icon:"open_in_new",label:"Videoconsulta",callbackFn:()=>{}}]},{id:"visits",icon:"event",label:"Visites",type:"item",sortHint:"0130",callbackFn:()=>navigateToEcapWithoutClosingWithCip("CONSULTA_VISITES")},{id:"visor",icon:"window",label:"Visor",type:"item",sortHint:"0140",callbackFn:()=>{}}],registerUpperNavMenuViews=()=>{for(const X of upperNavMenuItems)shellApi.regionManager.registerView(shellRegions.navigationMenu,{id:X.id,sortHint:X.sortHint,factory:()=>{const W=X.type==="item"?new PrimariaNavItem({icon:X.icon,label:X.label,callbackFn:X.callbackFn}):new PrimariaNavTreeMenu({icon:X.icon,label:X.label,actionMenuItems:X.actionMenuItems});return Promise.resolve(W)}})},registerMainViews=()=>{registerPDFVisorMainView()},useInternalViews=()=>{registerMainViews(),registerUpperNavMenuViews(),registerLowerNavMenuViews()},useUI=()=>{p$h.registerAdapterFactory("primaria-content-switcher",d$u),useSharedUI(),useComponents(),useInternalViews()},initializeShell=X=>{useLocalization(shellApi),useUI(),useFeatures(shellApi);const W=new PrimariaShell;X.appendChild(W)};class n extends HTMLElement{constructor(W,J,te={}){super(),this.jsx=W,this.styles=J,this.root=this.attachShadow({mode:"open"}),this.reactRoot=null,te&&(this.props=te)}connectedCallback(){const W=document.createElement("div");W.style.minHeight="100%",W.style.width="100%";const J=document.createElement("style");J.innerText=this.styles,this.root.appendChild(W),this.root.appendChild(J),this.reactRoot=r$N.createRoot(W),this.renderReact()}disconnectedCallback(){this.reactRoot&&this.reactRoot.unmount()}renderReact(){this.reactRoot&&this.reactRoot.render(c$r.createElement(this.jsx,{...this.props}))}}customElements.define("ux-react-web-component",n);const h=(X,W)=>(J={})=>Promise.resolve(new n(X,W,J));/**
|
|
6579
6615
|
* @license
|
|
6580
6616
|
* Copyright 2021 Google LLC
|
|
6581
6617
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -6587,5 +6623,5 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
6587
6623
|
* @license
|
|
6588
6624
|
* Copyright 2021 Google LLC
|
|
6589
6625
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6590
|
-
*/function leadingMargin(X){return X==="horizontal"?"marginLeft":"marginTop"}function trailingMargin(X){return X==="horizontal"?"marginRight":"marginBottom"}function offset(X){return X==="horizontal"?"xOffset":"yOffset"}function collapseMargins(X,W){const J=[X,W].sort();return J[1]<=0?Math.min(...J):J[0]>=0?Math.max(...J):J[0]+J[1]}class MetricsCache{constructor(){this._childSizeCache=new SizeCache,this._marginSizeCache=new SizeCache,this._metricsCache=new Map}update(W,J){var re,ne;const te=new Set;Object.keys(W).forEach(oe=>{const de=Number(oe);this._metricsCache.set(de,W[de]),this._childSizeCache.set(de,W[de][dim1(J)]),te.add(de),te.add(de+1)});for(const oe of te){const de=((re=this._metricsCache.get(oe))==null?void 0:re[leadingMargin(J)])||0,ue=((ne=this._metricsCache.get(oe-1))==null?void 0:ne[trailingMargin(J)])||0;this._marginSizeCache.set(oe,collapseMargins(de,ue))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(W,J){var te;return((te=this._metricsCache.get(W))==null?void 0:te[leadingMargin(J)])||0}getChildSize(W){return this._childSizeCache.getSize(W)}getMarginSize(W){return this._marginSizeCache.getSize(W)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}class FlowLayout extends BaseLayout{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new MetricsCache,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(W){this._metricsCache.update(W,this.direction),this._scheduleReflow()}_getPhysicalItem(W){return this._newPhysicalItems.get(W)??this._physicalItems.get(W)}_getSize(W){return this._getPhysicalItem(W)&&this._metricsCache.getChildSize(W)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(W){const J=this._metricsCache;if(this._first===-1||this._last===-1)return J.averageMarginSize+W*(J.averageMarginSize+this._getAverageSize());if(W<this._first){const te=this._first-W;return this._getPhysicalItem(this._first).pos-(J.getMarginSize(this._first-1)||J.averageMarginSize)-(te*J.averageChildSize+(te-1)*J.averageMarginSize)}else{const te=W-this._last;return this._getPhysicalItem(this._last).pos+(J.getChildSize(this._last)||J.averageChildSize)+(J.getMarginSize(this._last)||J.averageMarginSize)+te*(J.averageChildSize+J.averageMarginSize)}}_getPosition(W){const J=this._getPhysicalItem(W),{averageMarginSize:te}=this._metricsCache;return W===0?this._metricsCache.getMarginSize(0)??te:J?J.pos:this._estimatePosition(W)}_calculateAnchor(W,J){return W<=0?0:J>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((W+J)/2/this._delta)))}_getAnchor(W,J){if(this._physicalItems.size===0)return this._calculateAnchor(W,J);if(this._first<0)return this._calculateAnchor(W,J);if(this._last<0)return this._calculateAnchor(W,J);const te=this._getPhysicalItem(this._first),re=this._getPhysicalItem(this._last),ne=te.pos;if(re.pos+this._metricsCache.getChildSize(this._last)<W)return this._calculateAnchor(W,J);if(ne>J)return this._calculateAnchor(W,J);let ue=this._firstVisible-1,ce=-1/0;for(;ce<W;)ce=this._getPhysicalItem(++ue).pos+this._metricsCache.getChildSize(ue);return ue}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;const W=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=W,this._stable=!0}_getItems(){const W=this._newPhysicalItems;this._stable=!0;let J,te;if(this.pin!==null){const{index:ce}=this.pin;this._anchorIdx=ce,this._anchorPos=this._getPosition(ce)}if(J=this._scrollPosition-this._overhang,te=this._scrollPosition+this._viewDim1+this._overhang,te<0||J>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(J,te),this._anchorPos=this._getPosition(this._anchorIdx));let re=this._getSize(this._anchorIdx);re===void 0&&(this._stable=!1,re=this._getAverageSize());const ne=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,oe=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=ne),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-oe-re);let de=0;for(this._anchorPos+re+oe<J&&(de=J-(this._anchorPos+re+oe)),this._anchorPos-ne>te&&(de=te-(this._anchorPos-ne)),de&&(this._scrollPosition-=de,J-=de,te-=de,this._scrollError+=de),W.set(this._anchorIdx,{pos:this._anchorPos,size:re}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-ne,this._physicalMax=this._anchorPos+re+oe;this._physicalMin>J&&this._first>0;){let ce=this._getSize(--this._first);ce===void 0&&(this._stable=!1,ce=this._getAverageSize());let he=this._metricsCache.getMarginSize(this._first);he===void 0&&(this._stable=!1,he=this._metricsCache.averageMarginSize),this._physicalMin-=ce;const pe=this._physicalMin;if(W.set(this._first,{pos:pe,size:ce}),this._physicalMin-=he,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<te&&this._last<this.items.length-1;){let ce=this._getSize(++this._last);ce===void 0&&(this._stable=!1,ce=this._getAverageSize());let he=this._metricsCache.getMarginSize(this._last);he===void 0&&(this._stable=!1,he=this._metricsCache.averageMarginSize);const pe=this._physicalMax;if(W.set(this._last,{pos:pe,size:ce}),this._physicalMax+=ce+he,!this._stable&&!this._estimate)break}const ue=this._calculateError();ue&&(this._physicalMin-=ue,this._physicalMax-=ue,this._anchorPos-=ue,this._scrollPosition-=ue,W.forEach(ce=>ce.pos-=ue),this._scrollError+=ue),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=W)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){const{_first:W,_last:J}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===W&&this._last===J)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){const{averageMarginSize:W}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(W+this._getAverageSize())+W)}get _delta(){const{averageMarginSize:W}=this._metricsCache;return this._getAverageSize()+W}_getItemPosition(W){return{[this._positionDim]:this._getPosition(W),[this._secondaryPositionDim]:0,[offset(this.direction)]:-(this._metricsCache.getLeadingMarginValue(W,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(W){return{[this._sizeDim]:this._getSize(W)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}const flow=Object.freeze(Object.defineProperty({__proto__:null,FlowLayout},Symbol.toStringTag,{value:"Module"}));exports.ActivityHistoryFilterOperation=ActivityHistoryFilterOperation,exports.ActivityHistoryFilterType=ActivityHistoryFilterType,exports.EcapEventManager=EcapEventManager,exports.PrimariaContentSwitcher=PrimariaContentSwitcher,exports.PrimariaInteractionService=PrimariaInteractionService,exports.PrimariaNavItem=PrimariaNavItem,exports.PrimariaRegionHost=PrimariaRegionHost,exports.addAsyncHistoryItemsCommand=addAsyncHistoryItemsCommand,exports.addHistoryItemCommand=addHistoryItemCommand,exports.addHistoryItemsCommand=addHistoryItemsCommand,exports.bootstrapPlugins=bootstrapPlugins,exports.clinicalMonitoringRegions=clinicalMonitoringRegions,exports.createEcapEventManager=createEcapEventManager,exports.disposePlugins=disposePlugins,exports.disposeShell=disposeShell,exports.initializeShell=initializeShell,exports.isCommonFilterGroup=isCommonFilterGroup,exports.isNotCommonFilterGroup=isNotCommonFilterGroup,exports.primariaApiFactory=primariaApiFactory,exports.raiseCloseEvent=raiseCloseEvent,exports.raiseCustomCloseEvent=raiseCustomCloseEvent,exports.shellApi=shellApi,exports.shellEvents=shellEvents,exports.shellRegions=shellRegions,exports.updateHistoryItemCommand=updateHistoryItemCommand,exports.wrapReactViewFactory=h,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|
|
6626
|
+
*/function leadingMargin(X){return X==="horizontal"?"marginLeft":"marginTop"}function trailingMargin(X){return X==="horizontal"?"marginRight":"marginBottom"}function offset(X){return X==="horizontal"?"xOffset":"yOffset"}function collapseMargins(X,W){const J=[X,W].sort();return J[1]<=0?Math.min(...J):J[0]>=0?Math.max(...J):J[0]+J[1]}class MetricsCache{constructor(){this._childSizeCache=new SizeCache,this._marginSizeCache=new SizeCache,this._metricsCache=new Map}update(W,J){var re,ne;const te=new Set;Object.keys(W).forEach(oe=>{const de=Number(oe);this._metricsCache.set(de,W[de]),this._childSizeCache.set(de,W[de][dim1(J)]),te.add(de),te.add(de+1)});for(const oe of te){const de=((re=this._metricsCache.get(oe))==null?void 0:re[leadingMargin(J)])||0,ue=((ne=this._metricsCache.get(oe-1))==null?void 0:ne[trailingMargin(J)])||0;this._marginSizeCache.set(oe,collapseMargins(de,ue))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(W,J){var te;return((te=this._metricsCache.get(W))==null?void 0:te[leadingMargin(J)])||0}getChildSize(W){return this._childSizeCache.getSize(W)}getMarginSize(W){return this._marginSizeCache.getSize(W)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}class FlowLayout extends BaseLayout{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new MetricsCache,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(W){this._metricsCache.update(W,this.direction),this._scheduleReflow()}_getPhysicalItem(W){return this._newPhysicalItems.get(W)??this._physicalItems.get(W)}_getSize(W){return this._getPhysicalItem(W)&&this._metricsCache.getChildSize(W)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(W){const J=this._metricsCache;if(this._first===-1||this._last===-1)return J.averageMarginSize+W*(J.averageMarginSize+this._getAverageSize());if(W<this._first){const te=this._first-W;return this._getPhysicalItem(this._first).pos-(J.getMarginSize(this._first-1)||J.averageMarginSize)-(te*J.averageChildSize+(te-1)*J.averageMarginSize)}else{const te=W-this._last;return this._getPhysicalItem(this._last).pos+(J.getChildSize(this._last)||J.averageChildSize)+(J.getMarginSize(this._last)||J.averageMarginSize)+te*(J.averageChildSize+J.averageMarginSize)}}_getPosition(W){const J=this._getPhysicalItem(W),{averageMarginSize:te}=this._metricsCache;return W===0?this._metricsCache.getMarginSize(0)??te:J?J.pos:this._estimatePosition(W)}_calculateAnchor(W,J){return W<=0?0:J>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((W+J)/2/this._delta)))}_getAnchor(W,J){if(this._physicalItems.size===0)return this._calculateAnchor(W,J);if(this._first<0)return this._calculateAnchor(W,J);if(this._last<0)return this._calculateAnchor(W,J);const te=this._getPhysicalItem(this._first),re=this._getPhysicalItem(this._last),ne=te.pos;if(re.pos+this._metricsCache.getChildSize(this._last)<W)return this._calculateAnchor(W,J);if(ne>J)return this._calculateAnchor(W,J);let ue=this._firstVisible-1,ce=-1/0;for(;ce<W;)ce=this._getPhysicalItem(++ue).pos+this._metricsCache.getChildSize(ue);return ue}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;const W=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=W,this._stable=!0}_getItems(){const W=this._newPhysicalItems;this._stable=!0;let J,te;if(this.pin!==null){const{index:ce}=this.pin;this._anchorIdx=ce,this._anchorPos=this._getPosition(ce)}if(J=this._scrollPosition-this._overhang,te=this._scrollPosition+this._viewDim1+this._overhang,te<0||J>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(J,te),this._anchorPos=this._getPosition(this._anchorIdx));let re=this._getSize(this._anchorIdx);re===void 0&&(this._stable=!1,re=this._getAverageSize());const ne=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,oe=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=ne),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-oe-re);let de=0;for(this._anchorPos+re+oe<J&&(de=J-(this._anchorPos+re+oe)),this._anchorPos-ne>te&&(de=te-(this._anchorPos-ne)),de&&(this._scrollPosition-=de,J-=de,te-=de,this._scrollError+=de),W.set(this._anchorIdx,{pos:this._anchorPos,size:re}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-ne,this._physicalMax=this._anchorPos+re+oe;this._physicalMin>J&&this._first>0;){let ce=this._getSize(--this._first);ce===void 0&&(this._stable=!1,ce=this._getAverageSize());let he=this._metricsCache.getMarginSize(this._first);he===void 0&&(this._stable=!1,he=this._metricsCache.averageMarginSize),this._physicalMin-=ce;const pe=this._physicalMin;if(W.set(this._first,{pos:pe,size:ce}),this._physicalMin-=he,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<te&&this._last<this.items.length-1;){let ce=this._getSize(++this._last);ce===void 0&&(this._stable=!1,ce=this._getAverageSize());let he=this._metricsCache.getMarginSize(this._last);he===void 0&&(this._stable=!1,he=this._metricsCache.averageMarginSize);const pe=this._physicalMax;if(W.set(this._last,{pos:pe,size:ce}),this._physicalMax+=ce+he,!this._stable&&!this._estimate)break}const ue=this._calculateError();ue&&(this._physicalMin-=ue,this._physicalMax-=ue,this._anchorPos-=ue,this._scrollPosition-=ue,W.forEach(ce=>ce.pos-=ue),this._scrollError+=ue),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=W)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){const{_first:W,_last:J}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===W&&this._last===J)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){const{averageMarginSize:W}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(W+this._getAverageSize())+W)}get _delta(){const{averageMarginSize:W}=this._metricsCache;return this._getAverageSize()+W}_getItemPosition(W){return{[this._positionDim]:this._getPosition(W),[this._secondaryPositionDim]:0,[offset(this.direction)]:-(this._metricsCache.getLeadingMarginValue(W,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(W){return{[this._sizeDim]:this._getSize(W)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}const flow=Object.freeze(Object.defineProperty({__proto__:null,FlowLayout},Symbol.toStringTag,{value:"Module"}));exports.ActivityHistoryFilterOperation=ActivityHistoryFilterOperation,exports.ActivityHistoryFilterType=ActivityHistoryFilterType,exports.EcapEventManager=EcapEventManager,exports.PrimariaContentSwitcher=PrimariaContentSwitcher,exports.PrimariaInteractionService=PrimariaInteractionService,exports.PrimariaNavItem=PrimariaNavItem,exports.PrimariaRegionHost=PrimariaRegionHost,exports.addAsyncHistoryItemsCommand=addAsyncHistoryItemsCommand,exports.addHistoryItemCommand=addHistoryItemCommand,exports.addHistoryItemsCommand=addHistoryItemsCommand,exports.bootstrapPlugins=bootstrapPlugins,exports.clinicalMonitoringRegions=clinicalMonitoringRegions,exports.createEcapEventManager=createEcapEventManager,exports.diagnosticsfilterId=diagnosticsfilterId,exports.disposePlugins=disposePlugins,exports.disposeShell=disposeShell,exports.initializeShell=initializeShell,exports.isCommonFilterGroup=isCommonFilterGroup,exports.isCustomFilter=isCustomFilter,exports.isDiagnosticFilter=isDiagnosticFilter,exports.isNotCommonFilterGroup=isNotCommonFilterGroup,exports.isNotDiagnosticFilter=isNotDiagnosticFilter,exports.ownFilterId=ownFilterId,exports.primariaApiFactory=primariaApiFactory,exports.raiseCloseEvent=raiseCloseEvent,exports.raiseCustomCloseEvent=raiseCustomCloseEvent,exports.relevantFilterId=relevantFilterId,exports.shellApi=shellApi,exports.shellEvents=shellEvents,exports.shellRegions=shellRegions,exports.updateHistoryItemCommand=updateHistoryItemCommand,exports.wrapReactViewFactory=h,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|
|
6591
6627
|
//# sourceMappingURL=index.umd.cjs.map
|